
Exhaustive but flawedWhile "Ajax: The Definitive Guide" is certainly exhaustive, it's hard to have confidence in a text so riddled with errors. Other O'Reilly titles I've purchased in the last few years suffer from the same problem: very poor copy editing. In a "Definitive Guide," this is inexcusable.
Furthermore, he author's decision to rely on the Prototype framework is misguided. It saves a few lines of code per page, but one expects a "Definitive Guide" to define, explore, and use the actual objects and methods defined by the language itself, not those defined in one of many, many external libraries.
It is also somewhat comical to read on page 10 that developers, rather than browser vendors, "are to blame for not adopting standards" and that they are "stuck with the mentality of the 1990s, when browser quirks mode, coding hacks, and other tricks were the only things that allowed code to work in all environments," and then to read on page 191 that "Yes, there are always caveats in the world of standards compliance" and that "Example 7-2 will not work in Internet Explorer because Internet Explorer does not support the CSS2 rules that are used to make this work." And on page 187 that "Internet Explorer does not natively support :hover on elements other than . For this reason, instead of using the CSS that will work for all other browsers, we must use this...."
(It's hard not to laugh, too, at a sentence that begins with "To take the file menu example fully to the Web 2.0 level....")
By the time all the errata are corrected and a second edition issued, it might be appropriate for the author to wag his finger at developers who can't yet afford to to be totally standards-pure, but by then the faddish jargon will seem very dated.
And until O'Reilly starts employing copy editors, I'm not buying the first edition of any title they release.
Loads of Code; Good Value§
There is a LOT of code in this 950 page book. I guess there is something here for everyone because there is code not directly related to Ajax but is directed to HTML structure or CSS presentational aspects or to frameworks that may include Ajax conveniences.
In fact, the amount of code may interfere with the author's object of appealing to two very different types of people with this book: Web developers and project managers looking for a high-level view. Except for some intro chapters and the odd breather between 10-15 page code listings, I don't think any project managers *I* have worked with would extract much from the book.
The book has 4 sections:
Part 1 - Ajax Fundamentals: the basic technologies that could form the core of a typical Ajax application.
Part 2 - Ajax Foundations: approaches to standards-compliant structure, separation of the presentational layer and client-side behaviors. Code code code!
Part 3 - Ajax in Applications: describes the specific implementations of these technologies into Web applications. More code!
Part 4 - Wrapping Up: tips on optimization.
In addition, there are some reference appendices on XML and XSLT; on JavaScript frameworks; on Ajax implementation risks; and most interestingly, a catalog of freely available Web service APIs.
One thing I did not like about the code listings was the use of Prototype style $() function syntax. This means when I see something like:
var titleText = $('title').firstChild;
I had to check whether .firstChild was a reference to a Prototype object or a reference to the standard DOM object. If the standard object, it would have been a whole lot clear just to have written document.getElementById().
The book index is actually pretty good. With 950 pages stuffed with content, you will probably be thankful for that!
§
Very thorough treatment of AjaxIf you are looking for a book with thorough treatment of Ajax, you are in the right place. The book does justice to it's title. I appreciate all the code snippets. However, they tend to repititive. When presentig a variation of a code snippet already presented, the author repeats the whole code snippet, instead of just highlighting the differences.
Generally on the markLet me preface this review by saying that I have never been a fan of thick programming or computer books. If a book is 2 inches thick, I often find only 1/2 to 1 inch of it to be valuable. However, most of Ajax: The Definitive Guide seems to hit the mark. Since Ajax development is such an expansive, and rapidly changing, topic, it is perhaps a good idea to shoot for too much rather than too little information. Most developers will find this book not only a good learning guide, but also a handy reference for a wide variety of coding needs.
One thing you will notice when scanning through this book is that there is a *lot* of code. The author is not afraid to publish pages and pages of Ajax code for readers to consider, copy and hack up to create their own applications. Not all is useful in real-world applications, however, since some of it is not cross-browser compatible (most often failing in Internet Explorer).
The first three chapters are largely an introduction to Web technologies, and can be skipped by most developers. In Chapter 4, the author introduces the XMLHttpRequest object, the object that puts the "asynchronous" in Ajax (an acronym for "asynchronous JavaScript and XML"). He details how to make simple applications that pull information from server-based XML or JSON, an alternative data format well suited to Ajax. Chapter 5 deals with Document Object Model programming, a critical task that allows developers to change the look and content of Web pages that have already been rendered.
After these foundational concepts, Part 2 contains nine chapters that provide specific solutions to common Web programming needs. Readers learn the ins and outs of creating Ajaxified navigation, forms, lists, tables, frames, etc.
Part 3, called "Ajax in Applications," goes a step farther by showing the reader how to integrate Ajax with other applications. Chapter 16, for example, shows the reader how to incorporate Ajaxified Google search into a site and even include such dynamic features as search hinting. Other chapters in this section introduce Web services, Web APIs and even show how to create Ajax animated games.
Part 4 contains two chapters that show readers how to create more modular code, and how to create faster, more compressed code. This is critical considering the importance of speed to the user experience in Ajax.
One of the book's shortfalls is the lack of information about the various Ajax libraries. Libraries and frameworks provide solutions to common programming needs: ready-made widgets, improved JavaScript programming notation, useful objects and easy cross-browser compatibility. The author includes a brief introduction to the libraries in chapter 4 and a reference in Appendix B. There are also mentions of the major libraries scattered throughout the chapters. However, it would be worthwhile to include at least a chapter devoted to each of the major libraries such as Dojo, Prototype and jQuery.
AJAX'Ajax: The Definitive Guide' certainly is definitive. With 950+ pages of content, this book doesn't know the word brevity. Spanning 23 chapters and 4 appendixes, this book covers everything you would want to know about AJAX. From its history to how it's grown to where things are today and in the future, this text is very complete. If you are new to AJAX and want to learn how to use it in an extensive way, this is a great resource. My only qualm with this book is that I feel it is just TOO big in size. A 'Learning AJAX' book at around 200-300 pages would be a great companion book to have on the side, then switching over to this bible-size book would be a good transition. Overall this is written well, laid out in detail, and typical O'Reilly quality.
***** RECOMMENDED
really defenitive guidei always trust "The defenitive guide" titles from oreilly and this book is no exception , it covers everything in the Ajax world begin with the fundamentals and every related technology , then dive into how using these technologies for real world applications , then covers WEB dervices ,mashups and API , then end up with modular coding best practices during all app developements phases , and the most interesting part is the reference which covers the most popular ajax frameworks , popilar web services api , and what you need to know about Xpath and XSLT .
A nice addition to a RIA developer's bookshelfMy previous favorite, and most recommended, book on AJAX was the one by Crane et. al. because of it's completeness in covering the subject by taking a big picture view of Web 2.0 rather than just one technology. For developers though, the book by Holdener is probably the one to own.
This book has some excellent information that seems to escape other books on this subject or is found across multiple titles. So even though it is certainly a large volume, I think there is some definite value in having quite a bit of related material in one title. For example, there are insights into JavaScript and use of JSON in programming the DOM (to name a few) that in my opinion made sense to include.
If you are going to do rich, browser-based application work, you definitely want to consider this book.
Great Resource and Very ThoroughThis book was a bit intimidating and it took me a while to get through it. The nice thing is that all that reading was worthwhile because I gained a very thorough understanding of Ajax and its associated technologies. I would recommend this title to anyone who wants to know what Ajax is, how it works, etc. and is serious about it.
This book is not for someone looking for a quick and dirty intro. But it wont leave the reader wondering either - this is a deep dig into Ajax.
