Jason Salas' WebLog

On-air and online: making people laugh, making people think, pissing people off

Sponsors

ASP.NET sites that kick ass

Pals with blogs

Podcasts I listen to

November 2005 - Posts

Book Review: "Ajax in Action"
Let me first preface this review by saying this is the first technical book that I've read cover to cover TWICE prior to posting a review. I had to make sure the stuff stuck, because the material covered in Manning's very excellent "Ajax in Action" is really deep. But bringing the next evolution of user experience, giving your web applications a rich client feel, isn't completely easy. This won't scare you away from using Ajax in your existing applications, but make you aware of exactly what to expect.

The book first starts out by presenting a healthy discussion of the key components of remote scripting - CSS, the DOM, JavaScript's XmlHttpRequest object and client callbacks - and how they interact within the scope of your project. Before diving into full-on Ajax development, authors Dave Crane and Eric Pascarello discuss the need for object-oriented JavaScript programing, which will be foreign and awkward to most developers, even those coming from procedural backgrounds like Java and C++. The authors familiarize you with the various ways of composing the unconventional constructs available (JSON-RPC, prototypes) for optimizing remote scripting.

Best practices are encouraged throughout the chapters and enforced in all code snippets. The use of patterns like Observer, Command and MVC and refactoring and module-based programming (mainly .NET assemblies and Java servlets) permeate the entire work. The actual meat of the book doesn't get started until Chapter 9, which the authors clearly state, dealing with the aforementioned discussion of raw JavaScript programming that'll be completely new to most people. But for those not wanting to engage in the massive task of writing syntax by hand, the major libraries available are thankfully referenced.

The book also isn't a "copyist's" title, one that can provide working code right out of the gate. Also, the audience for this work should be fairly sopisticated and experienced with modern-day web programming, as the book assumes a certain level of competency and doesn't waste time with rudimentary concepts or examples. Crane and Pascarello take a platform-agnostic look at incorporating Ajax-style programming into web applications, citing examples in PHP, Java and .NET, and accordingly the examples are all partial and abstracted, to be implemented in whatever platform the developer/reader is familiar with.

This is also one of the few books that I've ever recommended people read the appendices in addition to the chapters. Most titles have supplementary info that doesn't match the flow of the chapters, or exclusionary stuff you can skip, but this book is really a tome of good reading. Appendix B is an outstanding discussion on JavaScript OOP, providing an introduction to and examples in JSON.

Ajax programming is a lot more complex than it lets on, but not as daunting as you might think. This book is critical in your understanding of how to make the next big thing in web development to work for you. A must-have.
More Posts