Book Review: Foundations of Ajax
- By Matt Stephens
Foundations of Ajax
By Ryan Asleson and Nathaniel T. Schutta
I was going to begin this review with something like “Ajax burst onto the web development scene in recent years...” But the book’s jacket blurb does the job nicely:
“Ajax burst onto the web development scene by offering highly interactive, desktop-like web applications that can be deployed through any modern web browser without the need for special plug-ins . . . Foundations of Ajax explains how to combine these technologies effectively to implement Ajax into your new or existing web applications.”
Ajax itself isn’t a specific language or framework, of course; but it’s a well-documented technique for improving the user experience for web-based applications.
The book starts with the obligatory brief history of browsers and web applications. Then it knuckles down and discusses that “great enabler” of Ajax as we know it, the XMLHttpRequest object. In fact a whole chapter is given over to XMLHttpRequest, meaning that by the time you’ve reached Chapter 3, you should already have an excellent grasp of the mechanics underlying asynchronous, interactive web apps: in particular, where the “asynchronous” part comes from.
Talking of examples, the book explores some compelling reasons to incorporate Ajax techniques on your next project; e.g. they provide an autocomplete function, modelled on the poster-child Ajax web-app, Google Suggest. Other examples include updating a list-box when you select something from some other list; creating an auto-refreshing page; and displaying a progress bar.
You might wonder why you should buy a book on Ajax development when so much information on the subject is freely available on the web. Of course, this is a question that book publishers are grappling to answer: to provide extra “value-add” in books that you just don’t otherwise get on-line. One of those “value-adds” is probably depth: in the book format, it’s possible to go into a greater level of detail than you’d find in a web article.
Noticeably, this book deftly avoids dwelling on any particular Ajax web framework, instead focusing on the low-level “nuts and bolts” of development. An increasing number of Ajax web frameworks promise to hide the developer from these low-level details: Google Web Toolkit, Prototype, Microsoft’s Atlas for ASP.NET 2.0 and so on. But even using a high-level framework, it pays to have a solid understanding of what’s really going on. This especially helps when your application goes wrong, and suddenly you’re plunged into the low-level plumbing in order to fix it.
Overall, this book is highly recommended. It's a year old already, but it remains highly relevant, as the underlying details that if focuses on haven't changed. It isn’t a giant doorstop of a book: it’s a mere 260 pages (definitely a good thing!), meaning that it won’t take you long to read and digest. However, it’s written using a crisp, minimal style, meaning that it packs a lot of detail into a small space, without being too terse.
After reading this book, you’ll be well equipped to start confidently building Ajax web applications.