Book review: Beginning Ajax with PHP by Lee Babin
Submitted by Nola Stowe on Wed, 2006-12-13 11:41.
Apress: Beginning Ajax with PHP by Lee Babin
The book starts out exactly how I would write it -- SIMPLE! The first time I did Ajax with XHR (xml http request), I used a plain text file, which I then read into a DIV at the click of a link. This takes a similar approach and has data stored in an array which is then accessed with a simple call to a PHP file. The following chapter, takes it a step further and this building upon previous chapters is a common theme in the book.
After the reader has confidence on how to use AJAX, the book gives the warning, "Whoa! Wait a minute! AJAX isn't appropriate for EVERYTHING!" It gives examples of when AJAX would be a good idea and when it would not. I think this is pretty important as each CEO now wants Ajax everywhere in their application but it's not always the best solution! And it talks about the classic, "THE BACK BUTTON", problem. Then, in the same chapter, the book takes sort of a funny turn (in my opinion) and gives an introduction to PEAR. The book explains how to use PEAR's HTML_TABLE class to illustrate a good use for Ajax in creating an Excel-like grid that sums columns. This is a very cool class but would have been better suited for an appendix.
The rest of the book seems to be a random splattering of interesting topics: web services, map applications, cross-browser issues (touches again on the back button problem - but a solution this time!). There is also a brief mention of security. This should have been more in the middle of the book (see above for skipped last chapters syndrome). What then follows is a testing and debugging chapter which would have been more effective as the 3 or 4th chapter in the book. Finally there is a chapter about the browser DOM.
A great minor addition to the book would be an overview of some Ajax libraries such as Prototype, JQuery, Dojo, etc.