In: Reviews > Book Reviews
Published on December 26, 2006
Who is the book for?
What will I learn?
In addition to the comprehensive introduction to object-orientation, Resig does well to cover concepts that sometimes feel a little ignored in other books on the subject. There is a simple, understandable explanation of event bubbling (which I’ve never seen explained clearly anywhere else) and how to treat the event object, different ways to approach packaging your code, and tips on code validation and compression.
He also does a nifty line in recursive functions—in fact, the book is littered with generous amounts of helper functions (some of which may be familiar to users of the jQuery library), providing convenient shortcuts to common functionality.
The latter half of the book is taken up with real-world examples of functionality in action, all clearly explained (although it might be nice if just for once a JS book didn’t feel the need to include an image gallery script). The AJAX example in particular is very thorough.
Reaching the middle of the book, I was left with the curious feeling that I had been reading it backwards. From the initial leap into the deep-end of object-oriented code, packaging, and all the rest, the central chapters slow right down for a leisurely look at navigating and manipulating the DOM, and event registration. Considering that anyone in need of this relatively basic level of knowledge would have given up reading long ago, the chapter ordering does seem a little strange, although there are some simple but useful functions to aid DOM navigation that rescue the chapter from a complete glossing over.
The book closes with three appendices, including a handy reference for all things relating to event detection and handling.