The course enables existing developers to program using all the features of JavaScript, manipulate the DOM tree within an HTML document, validate information entered into HTML forms and send asynchronous requests to the server via XHR. There is a strong emphasis on writing maintainable, cross browser code and avoiding the common pitfalls associated with scripting languages in general and JavaScript in particular.

By default the course uses FireFox (plus FireBug) and Chrome for all the examples and exercises. The course can be extended by a day to add coverage of JavaScript frameworks such as DOJO and jQuery.


Introduction to JavaScript

  • How JavaScript began and grew in respectability
  • JavaScript as the assembly language of the internet
  • Cross-browser issues and JavaScript frameworks
  • Interoperability between Java and JavaScript
  • CoffeeScript as a better syntax for JavaScript
  • An overview of server-side coding with Node.js

Basic JavaScript Programming

  • The core JavaScript types and dynamic typing
  • Explicit and implicit variable declarations
  • Using typeof and instanceof to investigate types
  • Coming to terms with the lack of block scope
  • Understanding truth and equality in JavaScript
  • Making choices, basic iteration and the for…in loop
  • Manipulating strings and applying regular expressions
  • Working with single and multi-dimensional arrays

Object Orientation in JavaScript

  • Understanding the prototype based style of OO
  • Declaring objects using the Object type
  • Declaring objects using the literal syntax
  • Declaring objects using constructor functions
  • Different options for accessing members of objects
  • Implementing inheritance using the prototype chain

Functional Programming in JavaScript

  • How and why functions are ‘first class citizens’
  • Four patterns of invocation for calling JavaScript functions
  • Calling functions with fewer parameters or additional ones
  • Passing functions as arguments into other functions
  • Building and returning functions from functions
  • Understanding the binding of this in built functions
  • Other functional techniques supported by JavaScript

Manipulating the DOM Tree

  • Making sense of the Document Object Model
  • Different options for locating nodes in the DOM
  • Adding, manipulating and removing nodes from the tree
  • The three supported models for handling DOM events
  • Finding and validating the content of form elements
  • Working with hidden form elements and cookies
  • Using timers to schedule code for execution
  • Asynchronous JavaScript in HTML5 using WebWorkers

Applying AJAX

  • How AJAX was invented and popularised
  • Creating an XHR object on different browsers
  • Sending requests to the server via the XHR object
  • The stages in the lifecycle of an XHR request
  • Using onreadystatechange to monitor the progress of a request
  • Adding extra headers and cookies to the request
  • Handing HTTP errors and enforcing timeouts
  • The limitations of using XML with AJAX
  • An overview of the JSON formatting standard
  • Sending and receiving data via JSON
  • Processing JSON in Java via Jackson

An Overview of DOJO (Optional)

  • The organization of the Dojo toolkit
  • Including Dojo in your web application
  • Using the Dijit widgets to add richness
  • Customizing the framework using djConfig
  • Scheduling functions to run on startup with addOnLoad
  • Building and adding nodes to the tree with create and place
  • Detecting, adding and removing CSS classes on DOM nodes
  • JSON serialization in Dojo with toJson and fromJson
  • Using hitch to bind methods to contexts
  • Iterating over arrays with forEach, map, some and every
  • Attaching handlers to DOM nodes and working with events
  • Sending requests with xhrGet, xhrPost, xhrPut and xhrDelete
  • Processing content using the handleAs, load and handle properties
  • Adding Dijit widgets to HTML elements declaratively
  • Programatically adding and configuring widgets


  • Delegates should have 2 or more years programming experience in at least one of the following languages – Java, C#, C++, Perl, Python and Ruby