I wrote this post a while back. The content can still be relevant but the information I've linked to may not be available.
- Author: Jeremy Keith
- Paperback: 216 pages
- Publisher: New Riders (March 2007)
- ISBN-10: 0321472667
- Amazon UK Typical price: £16.49
In more detail
Subsequently, there is a detailed explanation of the XMLHttpRequest object, which is the 'heart and soul of Ajax' for communicating between browser and server in Ajax applications, and a bulletproof method for creating an instance of the object with its request is described. Finally in this chapter, processing the server response is described with a simple example. Speaking as someone who often comes into these things as the result of a customer request, it's great to have a rock-solid basis as the starting point for any new methodology.
This section contains really useful summaries of the pros and cons of each format
The innerHTML property is used for the rest of the book. This definitely makes the book easier to understand but I would have liked other examples. In particular, the use of JSON which I have seen advocated by people on a few occasions recently.
The use of innerHTML is possibly a bit surprising considering that it is a proprietary method [so is the XMLHttpRequest object]. On the other hand, this is clearly a better way of processing the response in some cases.
Hijax it up!
This is the basis for the Hijax method and it is clearly explained
The next two chapters discuss the potential problems of Ajax methodology including backwards compatibility, bookmarking, the back button, how to provide user feedback when an Ajax request is underway [nice examples], and in particular, the accessibility of Ajax applications. I am not sure that there is a clear answer to the accessibility issue but the book does not sidestep this potential problem.
The final 'code' chapter builds on methods from previous chapters to construct a one-page shop called Bulletproof Books. Perhaps inevitably, this is a simple example but it pulls together a number of Ajax methods. Even allowing for the fact that it is quite simple, I found this a bit of a 'step-up' in understanding. It's a section that I need to re-read a few times. Additionally, I need to look at the code examples from the book in more detail.
A final quote from the last section "it makes sense to keep Ajax enhancements lightweight and subtle". And as bulletproof as you can make them, surely!
This book is a great introduction to Ajax methodology. It is clearly written and provides a solid basis for understanding Ajax. If you want to start adding Ajax enhancements to your website, read this book!
» Buy it from Amazon UK