Pro JavaScript Techniques (Book review)

Despite the seemingly endless stream of new JavaScript books to hit the shelves in the last year or two, I haven’t seen any books that cover the really advanced stuff. Until reading Pro JavaScript Techniques, that is.

The author’s name, John Resig, should be very familiar to all JavaScript library/framework fans out there. That’s right, this book is written by the creator of jQuery, one of the most popular libraries around. That actually worried me a little before I started reading this book – I was afraid it would be a book about jQuery, not JavaScript. If you have similar concerns, relax. There is very little jQuery pimping going on.

The “Pro” in the book’s title is there for a reason. This is hardcore stuff unless you have extensive programming experience. After a bit of introduction, John dives straight into object-oriented JavaScript, which can be really hard to wrap your head around. I know I had a hard time following everything in that chapter. I think it could have been easier to grasp if things had been explained in a different order. Or it could just be because I am not a hardcore programmer.

The book consists of six parts:

  1. Introducing Modern JavaScript
  2. Professional JavaScript Development
  3. Unobtrusive JavaScript
  4. Ajax
  5. The Future of JavaScript
  6. Appendixes

The meat of the book is in the “Professional JavaScript Development” and “Unobtrusive JavaScript” parts. The former explains advanced concepts (such as the object-oriented JavaScript I mentioned) that really require you to focus if you’re going to understand any of it. Again, if you are an experienced hardcore programmer it is probably much easier, but for a front-end developer or a designer this can be intimidating. That said, the information is excellent, so it is worth spending the extra brain cycles to make sure you follow along.

The “Unobtrusive JavaScript” part is good to see in a book like this that is likely to be picked up by people who have more experience programming applications than creating code that will be consumed by Web browsers. The importance of unobtrusive scripting is explained throughout the book, while going through the Document Object Model, event handling, how to use JavaScript with CSS, and how to improve the usability of forms.

I do have two complaints about this book. First of all, and this unfortunately goes for a lot of books, there are many typos. It’s one thing if a novel contains misspellings or omitted words, but when you see several typos in a book about programming, especially in code listings, you really start feeling hesitant to trust the information.

My second complaint is about the jQuery-like syntax used by many of the helper functions described throughout the book. Maybe it’s just me, but I find normal, more verbose, JavaScript syntax much more comfortable and easy to read than jQuery syntax.

Anyway, this is a great book if you’re ready to take a step towards learning the really advanced JavaScript stuff. Just make sure you don’t skim it or you will risk not actually understanding what you’ve just read.

Pro JavaScript Techniques
Author: John Resig
ISBN-10: 1590597273
ISBN-13: 978-1590597279

Posted on June 13, 2007 in JavaScript, Reviews

Comments

  1. June 14, 2007 by DougWig

    Roger, thanks for the review!

    I found the WROX book “Professional Javascript by ZAKAS” to be a great reference on Javascript. It’s 600 pages long and has a chapter on everything from Regular Expressions to Web Services to Advanced DOM scripting. Unfortunately the book is devoid of wit or humor, but it’s well organized and presented and I keep it handy.

  2. Thanks for the review — after reading this post a few weeks ago I went out and bought the book, and it really changed my world.

    I’m a front end designer with only a bit of “real” coding experience, and I was recently tasked with taking on Javascript and Ajax on a new project. After spending a weekend with this book, I was pumping out object-oriented, unobtrusive javascript, that is now super-fun to work with.

    So thanks again for the review — this really is the best book on JS I’ve seen.

  3. Maybe it’s just me, but I find normal, more verbose, JavaScript syntax much more comfortable and easy to read than jQuery syntax.

    I am in this same camp. I loved this book for many reasons, but when it comes to JS frameworks - well - I would rather write for my own needs. I know it can make things so easy, but the syntax (chaining) doesn’t really excite me. I would rather write the Javascript and make it more ‘javascripty’ if that makes sense.

    I think that is one of the biggest barriers to people learning JS in the first place. They see the frameworks available, all of which use different syntax and have different preferences. 4 libraries could do the same task, but write it completely different (object literal, JSON, etc). I think this causes confusion to beginners - which is why I am in the same camp with your view.

  4. Thanks for the review I’m currently reading the book Beginning JavaScript with DOM Scripting and Ajax and thinking about digging deeper into JavaScript so your review is very useful to me.

  5. Great review Roger. I’ve been looking for a more ‘advanced’ JavaScript book for some time now.

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.