KillerSites Blog

Book Review: Ajax In Action

May 3, 2006

Introduction:

AJAX In Action targets experienced programmers who may not be familiar with client side Web application development. As such, the book provides a ‘crash-course’ into the basic building blocks of AJAX scripting:

  • CSS for styling markup/HTML
  • CSS for page layout
  • How the DOM (document object model) is used to restructure the page dynamically.

A good book for experienced programmers but not a title for web designers wanting to jump into AJAX. For people with less programming experience (those who know a only little JavaScript,) you are better off with the excellent book for beginners: Head Rush AJAX published by O’reilly.

Then perhaps (with some programming experience behind you,) you can come back to AJAX in Action.

Stefan Mischook

WARNING: This review has a 5 star nerd-level … not for beginners.

In a word; a comprehensive book that covers as much ground as could be expected, given the pace of change in the Ajax sphere. Lots of detail here although perhaps a little too much at times – I had to fight to finish it and ended up skimming at times.

About Ajax

Chances are you’ve heard of Ajax – it’s getting a lot of press as the best thing since some other acronym (take your pick). Ajax essentially is a suite of web technologies that allow you to develop web sites that seem more like traditional desktop applications. The web metaphor of click-reload-from-server-click-again is replaced by a user interface that can selectively update itself as the user interacts with it.

There are a number of working Ajax applications in the wild, one prominent example being Google Maps (http://maps.google.com/). The promise of Ajax is of a new generation of distributed applications with better usability and hopefully lots of budgets for those who know how to make them happen.

Rethinking the Web

Part 1 of the book does an overview of Ajax with emphasis on how Ajax applications differ from traditional web sites. In addition the section covers some prominent examples, as well as looking at some alternative technologies such as Flash and Java.

The section then dives into some simple examples of using Ajax technologies like the HttpRequest object and DOM scripting. This provides a nice gentle introduction to the main ideas behind Ajax.

The final section of part 1 looks at some patterns that could/should be used in developing Ajax apps with emphasis on a Model-View-Controller (MVC) framework for client-side Ajax code.

Core Techniques

Having dipped our toe (if not our whole leg) in the water, the authors move on and cover the various patterns that one might expect to use in developing an Ajax application. Quite a lot is covered and there is a lot of code. The authors use some concrete examples that are mostly reasonable, although less experienced web developers may not see the relevance of some of the examples.

Professional Ajax

Part 3 is covers core issues involved in taking an application from the prototype stage to a production application. Issues such as responsiveness and scalability are treated, as are usability issues like providing user feedback (with some example re-usable frameworks provided as examples). In addition security and performance are covered with some good tips on third party tools that can be used to debug hard-to-find problems as you are developing your application.

Ajax by Example

The final part covers the lion’s share of the book and provides some examples of varying complexity. These include code for a double combo box, type ahead suggest (see Google Suggests), a web portal, and others. I did not actually spend a lot of time here as by this point I felt I understood enough of the technologies to use them as I needed. Which is not to say that the code examples are not worth looking at.

Round Up

The book also features some appendices that covers tools like IDEs, third party frameworks and libraries, and a section on JavaScript for object oriented developers. Note that the libraries section necessarily can only be a starting point as there are new contributions coming along fairly often.

All in all a lot of the information in the book can be found on the web, but the book does make it easy to kick back in bed and absorb.

The writing style is very clear although not as entertaining as some technical books I have read lately. I think you’ll find that once you understand the core technologies, stuff starts to get repetitive.

Still the book does a nice job of covering the ground extensively and I recommend it to anyone who wants to learn about writing Ajax applications.

Richard Mischook