The Web has always been a hotbed of innovation, and, in its short history, weve seen many examples of an invention being repurposed and reused in ways far beyond the intentions of the original inventor. A network-based document retrieval protocol was subverted by the Common Gateway Interface into serving up dynamically-generated documents delivering data from a database back-end, allowing online access to ones data from anywhere in the world. HTTP headers were leveraged to provide the continuity of a user session on top of this stateless protocol, opening the door to stateful applications such as reservation systems and online commerce. Encrypted layers were built on top of the core protocol, to give confidence to the customers of these new online stores and users of business applications.
These were truly disruptive technologies, changing the way we use the Web forever. And yet today, technologies like server pages, sessions, and SSL are just everyday building bricks, baked into the fabric of every web developers toolkit, to the point that we take them for granted. The pace of innovation is still relentless, though, with a new web framework appearing practically every week.
One of the biggest disruptions to the web development landscape in recent years has been Ajax. Through all the prior innovation, the basics of the web user interfacepoint and click, request, response, redrawhad not changed very much, until Microsoft quietly introduced the XMLHttpRequest (XHR) object with Internet Explorer 5 in 1999, using it to power their Outlook Web Access mail client to little fanfare.
The rest of the world suddenly sat up and took notice in 2005, when Google nailed their flag to the Ajax mast with their mail, maps, and suggest applications. Jesse James Garrett of Adaptive Path coined the term Ajax, providing the first banner that we could all gather under to discuss exactly what this new thing was, and what we could do with it.
It seemed as if the technology was just waiting for a name, and once it had one, a flurry of activity ensued, with people trying to get into the Ajax spirit. However, Ajax introduced a new and different way of writing web applications. With new issues needing to be addressed, the last two years have seen yet another boom of innovations as the web development community figures out how to push this new and exciting envelope.
Along the way, the fundamentals of Ajax, like the XMLHttpRequest object, are going the way of the server page, the session, and SSL. The collective unconscious of the web development community has grokked the basic technology of Ajax, and is moving on to the broader issues that use of the technology raises.
It is in order to address these issues that we decided to write Ajax in Practice. With this book, our mission is to help accomplished (and not-quite-so-accomplished) web developers get on board with Ajax and successfully create their own Ajax-type applications. It can be regarded as a second-generation Ajax book: the first generation showed you what Ajax is; the second generation shows you what you can do with it and how to do it.
The book got its start when Steve Benfield was contacted by Manning to be the editor of a second-generation book about Ajax, as a follow-up to Dave Cranes popular Ajax in Action book. Later, Steve had to excuse himself as editor and Jord Sonneveld, Bear Bibeault, and Dave Crane teamed up to bring you this book in its completed form.
As you finish reading this preface, we have completed our mission and can sit back and share a few well-deserved drinks. We hope you enjoy reading this book as much as we have enjoyed writing it!
DAVE, BEAR, and JORD