So when Keith wrote Bulletproof Ajax, which he calls “the sequel to DOM Scripting“, you can imagine with what level of anticipation it was met, by not just myself, but many others who were also inspired by Keith’s first book. Ajax was just a casual mention in the back of DOM Scripting. With his new book, I wondered if I were going to feel that sense of empowerment again, by getting to know and understand this elusive and oft-misunderstood technology. I can’t speak for others when I talk about Bulletproof Ajax, but I’d like to give my impressions. Because the author refers to it as “sequel to DOM Scripting,” much of my review will reference both books.
The first thing I noticed was that the book was thin – less than 200 pages of content (compared to DOM Scripting‘s 300+ pages of content). That could mean one of two things – either Ajax will be much easier than I thought, or this book is not going to be as thorough as anticipated.
Chapter 3 is where the real meat begins – an introduction to the XMLHttpRequest object. Keith walks the reader through what goes on with the XMLHttpRequest between the server and client. It’s informative and clear, though I am hardheaded enough that I will probably have to give it a third and fourth read.
Chapter 4 is another nice, meaty chapter – an explanation of the different data formats that Ajax can use, including pros and cons of each. The reader can look over these options and view which options are more suitable for their tasks. I was certain that Keith would advocate XML over the other formats (after all, it was originally the “x” in Ajax), but he doesn’t. I was partly disappointed with his explanation with the data format he chose to use for the duration of the book. He uses HTML with the innerHTML property rather than XML. innerHTML is quicker and requires less code than formatting XML. However, after having read DOM Scripting, I had been under the impression that I should probably shy away from it, since the browser is blind to the elements of code entered using innerHTML. From DOM Scripting:
… the standardized DOM can be used instead of innerHTML. It may take slightly more code to achieve the same results but, as you’ll see, it offers more precision and power.
I guess “power” is relative to what your book is about. In Bulletproof Ajax, Keith repeats his concerns about innerHTML, warns against careless usage, and states he will use it anyway for the sake of brevity. It’s understandable, but I would’ve enjoyed more examples that follow in the footsteps of DOM Scripting. What if I wanted to do more DOM manipulation on the snippets of code that are injected into our AJAX examples? With innerHTML, the DOM is blind to the code within that mark-up.
Don’t worry if you don’t understand PHP. Understanding the language I’m using isn’t as important as following the underlying concepts.
If you’re a front-end developer, this is the book for you. You’re probably well-versed in Web Standards. I trust you’re using semantic markup and CSS, perhaps even some rudimentary DOM Scripting. If so, read on.
As stated, I would add to that list that any potential reader should also have some basic-to-intermediate PHP knowledge especially if you’re wanting to implement the examples. Be capable of writing a form in PHP that has server-side field validation to get the most from this book. Chances are if you know how to do that, you can implement the rest of the examples and be ready to cater them to your own site. Ajax can be applied to any server-side language, not just PHP, but I think it would be helpful when following his examples if the reader could grasp PHP syntax.
Bulletproof Ajax excels at covering the accessibility challenges of Ajax. Web Standards are upheld and encouraged throughout the book. Keith constantly asks, “Is Ajax the best way to do this?”. He recognizes how enthusiastic designers can get at the mention of this buzzword, and he feels responsible enough to keep the reader’s excitement in check, and remind them that Ajax is just one tool out of many that can be used to enhance web sites without sacrificing accessibility.
As for Ajax concepts in the world of Web Standards, Bulletproof Ajax is an essential read. However, rather than refer to it as “the sequel to DOM Scripting“, I would instead think of it as the third book in the following trilogy:
- DOM Scripting
- Some server-side language beginner book, PHP preferred
- Bulletproof Ajax