Advance JavaScript

Duration: 2 Days

Course Overview

Advanced JavaScript training teaches experienced JavaScript developers the skills they need to build robust, scalable software. Creating modern, complex software with JavaScript requires understanding advanced patterns and usage idioms, as well as facilities for integrating with other systems and services. This course reviews some of the complex parts of the JavaScript language and goes on to discuss server programming in JavaScript with Node.js, as well as various other options for client-server integration.

Large software systems need to be planned and decomposed into small units and JavaScript has no built in facility for doing this. This course looks at various methods of supporting modularity and straightforward implementation of complex products throughout the lifecycle phases of design, development, build, and deploy.

Course Prerequisites

Advanced JavaScript training attendees should have a solid knowledge of HTML, simple CSS, and JavaScript. Attendees should be comfortable creating JavaScript objects and functions, DOM programming and working with browser events.

Course Objectives

  • Thoroughly understand core mechanisms of the JavaScript language, such as scope, closures, and inheritance
  • Start using Node.js for server-side JavaScript applications
  • Review client-side AJAX techniques and integrate to server-side services written with node.js
  • Learn about modern approaches to flow control with promises and deferreds
  • Design and build apps in small manageable modules and learn how to manage loading and using modules
  • Learn how to design JavaScript apps that properly support URLs, back-button, history, and deep-linking
  • Learn how to plan and build large JavaScript applications

Course Outline


  • Introduction
  • Review of difficult JavaScript topics
    • Scope
    • Context
    • Closures
    • Inheritance
      • New syntaxes
      • Old Syntax
      • Pseudoclassical inheritance
      • Patterns
  • AJAX and Intro to Node.js
    • What is node.js? Where did it come from? Why would we use it?
    • Serving files with node.js
    • JSON
    • Creating a basic JSON service with node.js
    • Loading data from node.js into the client via AJAX
  • Cross-domain communication
    • Cross-domain communication options and issues
    • Implementing JSONP on the client
    • Implementing JSONP on node.js
    • CORS on the client and server
  • Flow control
    • Asynchronous programming
    • Advantages and disadvantages of nested callbacks
    • The "pyramid of doom" and problems with try/catch
    • Using promises
    • Using deferreds
  • Modules
    • Module pattern
    • CommonJS modules and AMD modules
    • AMD modules with RequireJS
    • Compiled and compressed builds with RequireJS
  • History, Back-button, Deep-linking (and SEO)
    • What these features have in common: URLs
    • URLs and JavaScript applications
    • APIs and browser facilities for history and deep-links
    • State-based application design for history/deep-link support
    • Client-side routing in various frameworks
  • Patterns for clean extensible design in larger JavaScript applications
    • Namespaces
    • Service Locators
    • Dependency Injection
    • Inversion of Control
    • Messaging and event buses
    • Different types of events
    • Design tradeoffs