Summary

I came to the web in 2000; quite late compared to most of my peers. Having a background as a software engineer, I was immediately drawn to JavaScript, and was immediately turned off again by the examples I consistently came across. The examples were so bad, I started to dread coming across websites that used JavaScript for anything other than client-side validation. Fortunately, in amongst the vast majority of poor scripters from the late 90's, there were people who really did understand what they were doing, and one of the best was Christian Heilmann, whose online unobtrusive JavaScript tutorial has helped many people either correct their bad habits, or start off with good habits. With this in mind, I was delighted to get a copy of Christian's new book, Beginning JavaScript with DOM Scripting and Ajax.

Author: Gez Lemon

DOM Scripting

Beginning JavaScript with DOM Scripting and Ajax assumes no previous scripting experience. The book starts by explaining JavaScript's syntax and constructs, and continues at a comfortable pace, right through to more advanced topics such as back-end interaction with Ajax and working with third-party JavaScript libraries. At all points, Christian pays particular attention to best practice scripting principles, such as progressive enhancement, separating behaviour, object detection and browser independence, ensuring your scripts behave nicely with other scripts, accessibility, and standards compliance. The book has plenty of real-world examples throughout, and even has a complete modern JavaScript case study of a dynamic gallery at the end.

The section on Ajax explains the difference between asynchronous requests and traditional HTTP requests, techniques for parsing XML, and using JSON as a replacement for XHTML. Like all other sections of the book, the section is rich with examples, ending with two detailed examples for making connected select boxes and Ajax menus respectively.

Serious scripters need to have good strategies for debugging scripts, as it's notoriously difficult to trace bugs in JavaScript. Fortunately, this book has a whole appendix devoted to debugging JavaScript that includes common JavaScript gotchas, techniques for tracing errors, and using third-party tools to help validate your scripts.

You can get a feel for the quality of the book from its companion website, where you can download the code examples. The book is very well-written, and engages the reader. Whether you're a beginner or a seasoned scripter, if you care about standards and accessibility, then I can highly recommend this book.

Category: Scripting.

Comments

  1. [beginning-javascript-dom-scripting-ajax.php#comment1]

    I look forward to reading this book. I just finished DOM Scripting and DHTML Utopia, two excellent books on unobtrusive JavaScript.

    I have avoided JS for the longest time for the same reason you listed above - it was REALLY bad - programming wise, and from a usability/accessibility perspective.

    I am very excited to start with progressive enhancement on some of my projects.

    This book looks like it would be another great resource on extending JS and best practices.

    Thanks for the review!

    Posted by Nate K on

Comments are closed for this entry.