Pro JavaScript Techniques

Reviewed February 21st, 2007 @ 10:36PM

[Book Cover] Pro JavaScript Techniques

Pro Javascript Techniques by John Resig was a very in-depth look at Javascript and its capabilities. I loved this book for the simple fact that the first chapter started by introducing you to objects in Javascript. No time was wasted on the basics, you were diving in deep right from the beginning. Also, even though John is the creator and lead developer of the jQuery Javascript library, this book was not about pushing his framework. He did a great job of introducing many of the different frameworks and listing their strengths and purposes.

The entire book had you building a library of usable scripts that allow for great portability while using Javascript in your applications (or even your personal website). Each chapter discussed the scripts, their functionality, their support, and giving great details to how they worked. Most chapters also gave you examples of the scripts in a working environment. A quick breakdown looks like this:

  • The first part of the book discussed Object Oriented Javascript. This included information related to creating your own objects and extending the core javascript objects. He then moved on to discussing testing of your code and how to package it for distribution. This is especially helpful for those working in an environment with multiple developers and programmers. Thankfully, he discussed unobtrusive DOM scripting, which still may be new to some developers. The first part closed with discussions related to AJAX and browser support, both of which we would see more of later. All of part one was a brief introduction to what we would read through the rest of the book.

  • Part two discussed Object Orient Javascript in more detail. This included things such as basics of objects, object creation, references, overloading, scope, and closures. I found this chapter to provide a solid foundation for the rest of the chapters to come, as well as very descriptive related to objects. The next few chapters discussed creating reusable code and shined some light on several of the libraries available. Also, we got a glimpse into the wonderful world of debugging Javascript and were introduced to some great tools to help you as you build.

  • Part three dives into unobtrusive Javascript and intricate details related to the DOM and how to manipulate the DOM. Once we learn how to properly manipulate and traverse the DOM, we move on to attaching events to elements. All of this was discussed in light of progressive enhancement and making sure content is always available. The last three chapters of this section discussed Javascript and CSS, how to improve forms (which is also a topic for another discussion), and a practical example of building an image gallery.

  • Part four pushes ahead to AJAX. The first chapters discussed the history of AJAX and some of its common uses. With a foundation of understanding what AJAX is, the next chapters were spent with practical examples of enhancing your blog (quick access to all posts dynamically on scroll), building an auto-complete search field, and creating an AJAX Wiki. I found that the blog and auto-complete were a little more valuable than the Wiki.

  • The final part looks to the future of Javascript. This section was very educational as we move forward. This is very important to be aware of what will be available in the near (hopefully) future.

The appendixes were extremely valuable, and I will use it as a quick reference as I begin developing more Javascript. A full listing of the DOM reference, Events reference, and the Browsers.

Overall, this book was an incredible read and is highly recommended for those who want to take their Javascript skills to the next level.