AdvancEd DOM Scripting – a book review

Quite recently I finished reading the book AdvancEd DOM Scripting by Jeffrey Sambells, together with Aaron Gustafson.

Don’t you hate it when you’re going to say something, or blog about a topic, and someone beats you to it (in this case, Roger’s review of this book)?

The book

Anyway, let me try and complement that review with my opinions and takes. AdvancEd DOM Scripting is for those who have dabbled some with DOM scripting, have gotten hooked, or at least curios enough, and want to delve deeper. The chapters are:

  • 1. Do It Right with Best Practices
  • 2. Creating Your Own Reusable Objects
  • 3. Understanding the DOM2 Core and DOM2 HTML
  • 4. Responding to User Actions and Events
  • 5. Dynamically Modifying Style and Cascading Style Sheets
  • 6. Case Study: A Photo Cropping and Resizing Tool
  • 7. Adding Ajax to the Mix
  • 8. Case Study: Enabling Asynchronous File Uploads with Progress Indicators
  • 9. Using Libraries to Increase Productivity
  • 10. Adding Effects to Enhance User Experience
  • 11. Mashups Galore! Using APIs to Add Maps, Searching, and Much More
  • 12. Case Study: Style Your select with the DOM

Read those chapter names carefully; taste them for a little while. Come to think of it, aren’t those topics basically everything you need to know and more to create compelling and modern web sites? And isn’t at least three of them hitting the nail on the head on what you wanted to learn, but haven’t had time for yet?

I’ve read the book, and I can give a strong yes to that! Jeffrey’s writing style and the book’s disposition, together with a chapter addition by Aaron Gustafson, cover the key parts about developing JavaScript code today, and things you really should learn if you’re developing JavaScript.

It makes me so happy to see JavaScript books covering closures and scope, all the different ways one can create objects, functions, applying methods etc. Hands up, how many times have you wondered when you assigned i in a loop to something, and it wasn’t what you expected? Here you will get the explanation, and not only that, but also a diagram explaining why it is so.

It builds up from the basics and how you can do things, and when going more advanced, it has established the foundations so there shouldn’t be any misunderstandings. It also goes through JavaScript libraries such as DOMAssistant, jQuery, MochiKit, Prototype and YUI, and dissects them. For my part, DOMAssistant has improved drastically since, but I still think it’s good to have all those JavaScript libraries compared in one place.

DOMAssistant support

A long time back, when doing research for this book, Jeffrey contacted me about DOMAssistant, analyzed it, and give me the small pointers needed to make sure it could run without any problem side-by-side with any other JavaScript library. That takes skill and genuine knowledge about the options, and is yet another reason why it is good to listen to Jeffrey.

The criticism (from others)

Roger mentioned some spelling errors, but I was more amused by great names like “fuction” (still trying to figure out what that actually means :-)), than disheartened.

Also, some HTML code isn’t the best you have ever seen, but really, just for a JavaScript developer to actually care about best practices, understanding that JavaScript is a part of a greater solution and not the only thing in the universe, is very relieving, and it sets a great example for people new to web development about doing your job professionally, instead of trying just to flash people with fancy illegible code.

(maybe I should shut up about this, since I and a colleague was actually comparing who had the longest (but as optimized as possible, of course) regular expression the other day…)

What’s great about his book

What I really like is that it takes the approach of teaching someone how to write a JavaScript library. Why that is so good is that I think it’s important for people to not download any of the major JavaScript libraries, without knowing what it does and why they want that particular one. Web developers need to learn about web browser inconsistencies, different implementations and weird bugs.

When they’ve learned that, they can either build their own JavaScript library, or they’re competent enough to choose which JavaScript library to choose, since they now know what they want in a library, and know that the library developer(s) have put the utmost attention to those tricky bits that are so important.

Who is this book for?

If you’re a medium skilled JavaScript developer, and hungry for more, this is a great book to get you going. If you consider yourself as advanced, it would rather fill some gaps, I think, rather than completely blowing your mind. But we can always learn something new, can’t we? πŸ™‚

One Comment

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.