Headrush Ajax: Book Review

I’ve just finished reading Headrush AJAX. Here’s my 40sec review!

Although some 350 pages, I found it a quick read (2 1/2 hours?), so I was really glad I borrowed it from the library rather than buying it.

The book whizzes you through the steps of converting an web app to an Ajax one: instead of interactions with a site being driven by page refreshes returning HTML, Ajax apps load the presentation once, and background requests seamlessly update the data on the page.

From a technical standpoint, in Ajax applications, clicking a button causes a data exchange to happen behind the scenes, each outbound request object bound to the name of the callback routine that will process the reply. That routine applies the data updates to the Document Object Model, leading the browser to duly respond by changing what’s shown to the user. In Ajax apps round-trip requests to the server carry just what’s changed (e.g. a single number) instead carrying the weight of the whole HTML page. That’ll lower the weight of each application.

Later chapters expand on the data format used to package the request and reply, first detailing that XML is a good for communicating structures and then explaining that passing a data structure in JSON (JavaScript Object Notation) - effectively a piece of JavaScript that can be evaluated - is lighter-weight for rectangular shaped arrays. The book usefully explains how the server side can be in PHP, Perl, JSP, etc, using a library to make the use of JSON transparent.

I was glad to see the perspectives on security. No application, client or server, should blindly run, using eval, a JSON data structure code passed from a co-operating process.

All in all the book is really well written, in its compelling visual style that inspires your right brain to do the comprehending whilst allowing your left brain to do think about the coding tasks.

I’d recommend it to all technology audiences, from students new to web technologies to those like me that have had extensive experience building distributed applications but have not necessarily kept abreast of the details of recent technologies.

(I’m sending a trackback to http://www.oreilly.com/catalog/headra/ - what are the chances I’ll get a link back?!)


Technorati : ,

Related Posts

Leave a Reply