DOM Scripting (Book review)

Back in the 1990s I did a whole lot of JavaScripting. I wrote ugly, inaccessible, browser-sniffing, non-standard scripts that didn’t really make things any better for the people using the sites I used those scripts on. Even at the time I had a feeling that something was wrong with the way I used scripting, and when I got into web standards and accessibility I more or less stopped using JavaScript. I am sure many others have been there too.

But web standards and accessibility do not prevent you from using JavaScript. You just have to use it right, and in DOM Scripting Jeremy Keith shows you how by explaining how to write unobtrusive and accessible cross-browser JavaScript that actually adds value to the site.

DOM Scripting is aimed specifically at web professionals who already know how to make proper use of CSS and (X)HTML by separating structural and presentational markup. This book expands on that concept and shows you how to use unobtrusive JavaScript to separate behaviour from structure.

While the book’s introduction states that you don’t need any previous knowledge of JavaScript, I do think it helps a lot if you have some programming experience, either with JavaScript or with some other language.

Jeremy starts off by explaining the basics of JavaScript syntax and then demystifies the Document Object Model (DOM), which is where the name of the book comes from. He then moves on to various techniques that can be used to enhance content and overcome limitations in today’s CSS implementations, and explains how to make an animated slideshow.

At the end of the book there is a chapter that ties the concepts and techniques explained in the previous chapters together by using them to enhance a website. Client-side form validation, which is a very common use for JavaScript, is also covered in this chapter.

Every script in the book is created with progressive enhancement and graceful degradation in mind. Those terms are explained in detail, and more or less define how modern JavaScript should be written.

The whole book is well-written and easy to follow. Like most really good hands-on books, DOM Scripting makes you eager to start putting what you’ve just read about into practice, making your own scripts more efficient and less obtrusive. Well, that’s speaking for myself anyway.

When I learn something new I want to make sure I learn it the right way, and that’s what this book will, so I highly recommend DOM Scripting to all web professionals who aren’t already JavaScript at DOM experts. Whether you have realised that it’s time to add modern JavaScript skills to your skillset or you think it’s time to upgrade your browser-sniffing era scripting skills, this book is for you.

DOM Scripting
Author: Jeremy Keith
ISBN: 1590595335

Posted on August 28, 2006 in Reviews