Pro JavaScript Techniques Book Review

Posted: December 08, 2008 Comments

Pro JavaScript Techniques Book Cover

Consistently for the past year or so, I’ve become increasingly interested in JavaScript and its capabilities. Each week I find myself using JavaScript in new and better ways to progressively enhance documents on the Web. Thankfully, there is a large group of terribly intelligent people consistently publishing not only their knowledge on the subject, but also new and improved tools with which to work.

Over time, I have experimented with a number of JavaScript libraries. I first started out working with Prototype but quickly became more comfortable using MooTools. I spent a short amount of time using MooTools in conjunction with other resources to learn a bit more about JavaScript. Then I discovered jQuery. jQuery has caught on like wildfire in recent months (years?) and rightfully so. One of the reasons I work primarily with jQuery is because of its author; John Resig. From what I can gather, he and I think alike. Although his knowledge of JavaScript is leaps and bounds ahead of mine, reading his articles still makes perfect sense. It should be no surprise that his book is written in the same way.

Pro JavaScript Techniques by John Resig

I’m a bit late in reading Pro JavaScript Techniques, since it was released two years ago this month. Many times, two years is quite a while to let a Web book get out of date before reading it. I was pleasantly surprised to see that was not the case at all with Pro JavaScript Techniques. If you take a glance at the table of contents you can plainly see the great selection of topics in the book.

Who is this book for?

This book is definitely not to be used as an introductory volume. If you’re just starting out with JavaScript, I would suggest perhaps DOM Scripting by Jeremy Keith. That’s not to say DOM Scripting is an introductory text, but more applicable for sure. This book is for a JavaScript author who has the basics down. Someone looking to take the next step in their JavaScript knowledge. In the first chapter, Resig dives right into objects in JavaScript, if that helps to put things in perspective.

What can you learn from this book?

Part 1: Introducing Modern JavaScript
From the first few pages you’ll be introduced to object-oriented JavaScript. From there, you’re shown some great techniques for testing your code & packaging your distribution. Part 1 also touches upon unobtrusive scripting, the DOM, events, Ajax, and cross-browser support.
Part 2: Professional JavaScript Development
The second part of the book focused on the particulars of object oriented JavaScript through the discussion of objects, object creation, overloading, and more. This part of the book did a great job in preparing the reader for what’s to come. There is a strong focus on creating code reusability; something valuable to all aspects of programming. Part two finishes with a chapter dedicated to testing and debugging your JavaScript, something that can be exponentially frustrating when first working with any programming language. To our benefit, modern JavaScript has made available a number of very robust tools which make working with JavaScript quite pleasant.
Part 3: Unobtrusive JavaScript
Part three discusses the Document Object Model, the foundation of modern JavaScript. After covering the basics surrounding the DOM, we’re guided through an introduction to events and how to work with them. Working with CSS via JavaScript is discussed in chapter 7, helping the reader to learn that JavaScript can do much more than interact with the DOM. Part three closes up with a couple examples which employ the techniques discussed in chapters previous, allowing the reader to see some of these methods in a functional real world environment.
Part 4: Ajax
Resig devoted an entire section of this book to Ajax, and not without good reason. Ajax is one of the primary reasons for the popularity of modern JavaScript. Ajax has done quite a bit to make the usability of documents much more interactive and effective. After discussing the basics of Ajax, a number of real-world examples are discussed. There are many good examples to work from and build upon in this section of the book.
Part 5: The Future of JavaScript
When working on the Web, it’s always important to consider whether your technology of choice has any viability in such a ‘hostile’ environment. This part of the book discusses where JavaScript is going and includes a few Web applications to check out.

There is an extensive appendix available at the conclusion of the book, which can be quite useful when trying to remember something you’ve read previously.

Summary

I thought this book was great. Reading this book really helped me to see why I like working with jQuery so much. It’s as though it can be looked at as a journal of sorts, providing a structure for a JavaScript library. Although I enjoy jQuery and it’s my library of choice, it’s only mentioned a very limited number of times, and always along other JavaScript libraries. This book was in no way a billboard for Resig’s library, instead it was meant as a way to improve your knowledge of JavaScript. If you’re looking to improve your knowledge of JavaScript from a basic level, Pro JavaScript Techniques is a great way to do it.

Get my newsletter

Receive periodic updates right in the mail!

  • This field is for validation purposes and should be left unchanged.

Leave a Reply

Your email address will not be published. Required fields are marked *