SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru OfficeOfTheLaw's Avatar
    Join Date
    Apr 2004
    0 Post(s)
    0 Thread(s)

    Thoughts for a javascript training course?

    Hi All,

    I'm currently trying to put together a javascript training course together for co-workers s part of a "Web 2.0 / AJAX Training" course (basically a series of sessions related to javascript, CSS, HTML, and "ajax frameworks") and would like to get some ideas on what everyone thinks would be essential.

    I just started putting together some ideas, but here is what I have in a nutshell:

    Intro To Javascript - covers the basics of the language, functions as first class objects, DOM, and stuff like === .
    Events - covers just about everything related to events and attaching event listeners (cross browser too!)

    Object Oriented Javascript - Intro to the multiple ways of writing OO javascript and explores the concept of javascript as a prototype based language.

    Unobtrusive javascript - basically cover what it is, why it's important, etc.


    Various frameworks, including dojo, extJS, YUI, jQuery, etc.

    Unit testing javascript with jsUnit.

    Anything you guys think I'm missing? I'm just putting an outline together at the moment, so any feedback is welcomed.

    James Carr, Software Engineer

    assertEquals(newXPJob, you.ask(officeOfTheLaw));

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    2 Post(s)
    0 Thread(s)
    Your post made me think about what took me some time to figure out or simply to find out. I also included some things that occurred to me that I think you ought to mention because it seems to me they're popular misconceptions or not immediately obvious:
    • Variables initiated with var are only available in the current scope unless in the global scope. Functions are variables and variables defined in the global scope are members of the window object. Why using lots of globals isn't recommended.
    • Touch on closures and the this keyword, possibly by using something like this:
      for (var i = 0; i < x.length; i++) {
        x[i].onclick = function() {
          x[i].style.color = 'red'; // should use "this" here
    • Variables in the current scope can access variables in the parent scope(s)
    • Loops, how they work, when to use them, etc.
    • Use of object literals as "associative arrays" (no "length" property) and use of and Normal arrays cannot be associative but can contain pretty much anything
    • NodeLists are not arrays
    • You can access properties of objects using dot or array notation
    • using setTimeout and setInterval properly (closure issues here as well)
    • Graceful degradation as well as unobtrusiveness is important
    • Javascript in the HEAD gets parsed before the DOM is loaded, which is why use of DOM methods must wait for the window's onload event to fire.
    • Whitespace between tags counts as a text node. Text has its own node in the DOM and can be created using document.createTextNode.
    • Javascript is not Java
    • The DOM and Javascript are separate things but the DOM is accessed through Javascript
    • alert() is useful for debugging
    • IE's Javascript console is rubbish


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts