DOM Scripting

Finally, I have my new web development book; Dom Scripting: Web design with JavaScript and the Document Object Model, by the UKs very own Jeremy Keith.

Jeremy Keith holding the Dom Scripting Book

But with great power comes great responsibility.

Dom Scripting, Page XXI

The introduction by Dave Shea starts off with the following rant...

JavaScript? No way. It's inaccessible, you know. Relying on it will make your site unusable, too. It's the root of many an evil pop-up window. I mean, it probably even kicked your dog when no one was looking.

Or so I thought...

Are you like me, a web designer or developer who has avoided JavaScript on prinicple

Dave Shea, Dom Scripting, Page XV

The main theme of the book is an introduction to JavaScript, but more specifically DOM scripting and the methodology of graceful degradation within websites. The book is exceedingly easy to read and teaches best practices in DOM scripting.

The way these best practices are described is the best thing about this book. First it teaches you the old way of achieving your desired effect, which has given rise to JavaScript getting a bad reputation. Then it follows up with the preferred method, with separation of structure, style and behaviour all joined together with graceful degradation.

The book is aimed at web designers who are interested in learning a bit more coding and who are often put off by JavaScripts complex syntax (compared to HTML and CSS). However, I would recommend the book to anyone who simply wants to learn the basic principles of how, when and why to use JavaScript.

The book introduces the basics of JavaScript, and therefore isn't really recommended for people wanting to learn about advanced techniques. The book sticks to teaching the basics and does a sterling job at that. Even if you're a veteran JavaScript programmer, you might be interested to read over some of the best practices preached in the book.

Because the book is aimed at the basics, it's not going to teach you how to build "AJAX" (XMLHTTPRequest) enhanced websites, but it does set in the right mindset to use it sensibly in the future, with graceful degradation.

I'd definitely recommend the book to anyone who wants to begin adding another weapon (DOM scripting) to their web-standards arsenal. Head over to the books website/blog site, run by the author Jeremy Keith, for more information.