Learning Javascript, by Shelley Powers

Javascript is a regular part of the internet; most sites you see use it in one form or another. It's part of the magic of AJAX (Asynchronous Javascript and XML, and therefore is an important part of any serious web developer toolkit. It is, of course, no relation to a programming language of a similar name - Java.

But what does Javascript do? Some of the more common things Javascript is used for include form validation (those things which make you go back and fix forms when you screw up - or the programmers did), internet cookies (not to be confused with the homemade type) and keeping track of information or making decisions based on information.

With the establishment of AJAX, Javascript popularity has increased - and Javascript knowledge has become more important. It's probably no coincidence that 'Learning JavaScript' is out now - it even includes a section on AJAX. But I get ahead of myself.

In 327 pages, divided into 14 chapters, the basics of Javascript are covered with some explanations of things which would be in an experienced programmer's toolbox - but which make the learning curve for an inexperienced developer less steep. As for myself, I found it a welcome refresher for some items with all the AJAX running around. In all, the 14 chapters cover:

  • Chapter 1: The convoluted and interesting history of Javascript, which in it's own way is an important part of the history of the internet. Myths of cross-browser incompatibility (in the context of Javascript) and other Javascript myths are efficiently put to sleep and quietly rolled in a rug to be placed at the bottom of the lake. The Javascript Sandbox is introduced (keeps Javascript from being naughty on your machine). The definitive Javascript 'Hello World' will allow novice programmers their first smile of many (and confuse people around them). Accessibility and best practices are delved into to a great degree at this point.
  • Chapter 2: Data types and variables, the illustrious entities which make a lot of cool stuff possible, are declared early in the book. An elementary chapter, but very important for more than 'Hello World'.
  • Chapter 3: Methods of affecting the program flow through operators, statements and the almighty loop are covered, with an introduction to the syntax of Javascript statements starting the chapter off.
  • Chapter 4: Objects, objects, objects - from constructor to associative arrays. If it sounds impressive, it can be - but it's not a good way to start a discussion over dinner except in certain company. Trust me.
  • Chapter 5: Functions in their many forms are covered - from the callback function (don't call us...) to recursion, nesting functions, functions as objects, and everyone's favorite - memory leaks.
  • Chapter 6: When things happen, your code needs to react - a brief chapter on handling events at the DOM level.
  • Chapter 7: Dealing with forms and the validation that the pesky person (user) puts in. While many ills of software development are blamed on users, validation keeps the users from breaking code and so it is very important. It keeps developers from being called bad names (well, sometimes). Pay attention.
  • Chapter 8: Cookies, Connectivity and Piracy! No, it's not the tale of Captain Hook - it's about the Javascript Sandbox (introduced in Chapter 1) and what goes beyond it. Alternative storage techniques and Cross-site scripting (XSS are well covered.
  • Chapter 9: The basic browser objects are introduced, which covers the Window object, frames and locations, history, screen and navigator, and much more.
  • Chapter 10: DOM (Document Object Model) is explained with some pertinent history.
  • Chapter 11: Creating your very own custom Javascript objects is covered, including (but not limited to) object detection, encapsulation, cross browser objects, chaining constructors, Javascript inheritance and the ever important error handling techniques.
  • Chapter 12: Building dynamic web pages; DHTML, CSS and DOM as well as cosmetics for keeping your work presentable.
  • Chapter 13: AJAX - a relatively brief explanation and an AJAX 'Hello World', with some discussion of the AJAX object.
  • Chapter 14: All the fun stuff that you sweated through 13 chapters for is here. It's in a secret code that you can't unravel unless you've read the previous chapters; in other words, don't rush to it too quickly if you're new.

What I failed to mention in the description above is that this is a workbook. At the end of every chapter are Questions which will help reinforce what you hopefully learned in that chapter. In essence, you won't get a grounding in Javascript by putting all your bills on top of the book. The level of Javascript knowledge you gain will be really up to you - the book is not structured for anyone to become a Javascript Kung-fu master at the end of the book. No way, Grasshopper. You have to snatch the pebble from the author's hand 13 times.

This book is intended for people with some familiarity in web page technology - some HTML/XHTML and CSS is required. This is not the place to start if you're on your first book. However, this book should easily be in your first few books, as Javascript is an important part of web technology and will remain so for the forseeable future.

'Learning JavaScript' is as dangerously close to being like the first book on Javascript I read, except it's significantly better written than that forgotten book in the mid-1990s. You have to work with this book. As with any 'learning programming' book, it's the questions which do the teaching - the rest is just background. In the case of this book, the author gave a very supportive and readable background which should be no surprise to anyone familiar with her site, BurningBird.net.

If you're serious about learning Javascript, this book is well worth the price. It's efficient, slim and a good start with a relationship with one of the more powerful aspects of today's internet. Whether you are just trying to get a better grasp of web development or planning world domination through a web browser, this should be part of your library. On a KnowProSE.com scale, I am justified in saying that Learning JavaScript is an 8 out of 10. If you put in your own effort, the book becomes a 9 or higher. Web 2.0 becomes one step closer for the beginner.


Nov 28, 2006 by Taran Rampersad

If you're serious about learning Javascript, this book is well worth the price. It's efficient, slim and a good start with a relationship with one of the more powerful aspects of today's internet. Whether you are just trying to get a better grasp of web development or planning world domination through a web browser, this should be part of your library. On a KnowProSE.com scale, I am justified in saying that Learning JavaScript is an 8 out of 10. If you put in your own effort, the book becomes a 9 or higher. Web 2.0 becomes one step closer for the beginner.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Easily link to terms in various wikis. For help, see <a href="/interwiki/3">interwiki</a>.

More information about formatting options