You are previewing Professional Ajax, 2nd Edition.
O'Reilly logo
Professional Ajax, 2nd Edition

Book Description

Professional Ajax 2nd Edition provides a developer-level tutorial of Ajax techniques, patterns, and use cases. The book begins by exploring the roots of Ajax, covering how the evolution of the web and new technologies directly led to the development of Ajax techniques. A detailed discussion of how frames, JavaScript, cookies, XML, and XMLHttp requests (XHR) related to Ajax is included. After this introduction, the book moves on to cover the implementation of specific Ajax techniques. Request brokers such as hidden frames, dynamic iframes, and XHR are compared and contrasted, explaining when one method should be used over another. To make this discussion clearer, a brief overview of HTTP requests and responses is included.

Once a basic understanding of the various request types is discussed, the book moves on to provide in-depth examples of how and when to use Ajax in a web site or web application. Different data transmission formats, including plain text, HTML, XML, and JSON are discussed for their advantages and disadvantages. Also included is a discussion on web services and how they may be used to perform Ajax techniques. Next, more complex topics are covered. A chapter introducing a request management framework explores how to manage all of the requests inside of an Ajax application. Ajax debugging techniques are also discussed.

The last part of the book walks through the creation of two full-fledged Ajax web applications. The first, FooReader.NET, is an Ajax-powered RSS reader. The second, called AjaxMail, is an Ajax-enabled email system. Both of these applications incorporate many of the techniques discussed throughout the book.

Professional Ajax 2nd edition is written for Web application developers looking to enhance the usability of their web sites and web applications and intermediate JavaScript developers looking to further understand the language. Readers should have familiarity with XML, XSLT, Web Services, PHP or C#, HTML, CSS. This book is not aimed at beginners without a basic understanding of the aforementioned technologies. Also, a good understanding of JavaScript is vitally important to understanding this book. Those readers without such knowledge should instead refer to books such as Beginning JavaScript, Second Edition (Wrox, 2004, ISBN: 978-0-7645-5587-9) and Professional JavaScript for Web Developers (Wrox, 2005, ISBN: 978-0-7645-7908-0).

Professional Ajax 2nd edition adds nearly 200 pages of new and expanded coverage compared to the first edition. Some of the new topics covered here include:

  • Ajax Libraries including the Yahoo! Connection Manager, Prototype, and jQuery

  • Request Management with Priority Queues and the RequestManager Object

  • Comet push-based web systems and HTTP streaming

  • Maps and Mashups with Geocoding, Google Maps API and Yahoo! Maps API

  • Ajax Debugging with FireBug and Microsoft Fiddler

ASP.NET AJAX Extensions (formerly code-named "Atlas")

And of course the Second Edition retains and updates the core first edition content including:

  • the range of request brokers (including the hidden frame technique, iframes, and XMLHttp) and explains when one should be used over another

  • different Ajax techniques and patterns for executing client-server communication

  • Ajax patterns including predictive fetch, page preloading, submission throttling, incremental field and form validation, periodic refresh, multi-stage download and more

  • Syndication with RSS, Atom, and XParser

  • JSON and creating an autosuggest textbox example

  • web site widgets for a news ticker, weather information, web search, and site search

  • Ajax Frameworks JSpan, DWR, and Ajax.NET Professional

  • A Web-based RSS/Atom aggregator case study

  • An AjaxMail case study

This book is also available as part of the 4-book JavaScript and Ajax Wrox Box (ISBN: 0470227818). This 4-book set includes:

  • Professional JavaScript for Web Developers (ISBN: 0764579088)

  • Professional Ajax 2nd edition (ISBN: 0470109491)

  • Professional Web 2.0 Programming (ISBN: 0470087889)

  • Professional Rich Internet Applications: Ajax and Beyond (ISBN: 0470082801)

Table of Contents

  1. Copyright
  2. Dedication
  3. About the Authors
  4. Credits
  5. Acknowledgments
  6. Introduction
  7. What Is Ajax?
    1. Ajax Is Born
    2. The Evolution of the Web
    3. The Real Ajax
    4. Ajax Principles
    5. Technologies behind Ajax
    6. Who Is Using Ajax?
    7. Confusion and Controversy
    8. Ajax and Web 2.0
    9. Summary
  8. Ajax Basics
    1. HTTP Primer
    2. Ajax Communication Techniques
    3. Cache Control
    4. Summary
  9. Ajax Patterns
    1. Communication Control Patterns
    2. Fallback Patterns
    3. Summary
  10. Ajax Libraries
    1. The Yahoo! Connection Manager
    2. Prototype
    3. jQuery
    4. Summary
  11. Request Management
    1. Priority Queues
    2. The RequestManager Object
    3. Using RequestManager
    4. Summary
  12. XML, XPath, and XSLT
    1. XML Support in Browsers
    2. XPath Support in Browsers
    3. XSL Transformation Support in Browsers
    4. Summary
  13. Syndication with RSS and Atom
    1. RSS
    2. Atom
    3. XParser
    4. Creating a News Ticker
    5. Web Search with RSS
    6. Summary
  14. JSON
    1. What Is JSON?
    2. JSON versus XML
    3. Server-Side JSON Tools
    4. Creating an Autosuggest Textbox
    5. Summary
  15. Comet
    1. HTTP Streaming
    2. Connection Management
    3. Server-Side Support
    4. Summary
  16. Maps and Mashups
    1. The Rise of Mashups
    2. Geocoding
    3. Google Maps API
    4. Yahoo! Maps API
    5. Other Mapping APIs
    6. Summary
  17. Ajax Debugging Tools
    1. The Problem
    2. FireBug
    3. Microsoft Fiddler
    4. Summary
  18. Web Site Widgets
    1. Creating a Weather Widget
    2. Watching Stocks
    3. Creating a Site Search Widget
    4. Summary
  19. Ajax Frameworks
    1. JPSpan
    2. DWR
    3. Ajax.NET Professional
    4. Summary
  20. ASP.NET AJAX Extensions (Atlas)
    1. Requirements and Setup
    2. The AJAX Client Library
    3. The UpdatePanel Control
    4. SiteSearch Revisited
    5. Summary
  21. Case Study: FooReader.NET
    1. The Client Components
    2. The Server Application
    3. Setup and Testing
    4. Summary
  22. Case Study: AjaxMail
    1. Requirements
    2. Architecture
    3. The User Interface
    4. Tying It All Together
    5. The Last Step
    6. Summary
  23. Licenses for Libraries and Frameworks
    1. Ajax.NET Professional
    2. DWR
    3. JPSpan
    4. jQuery
    5. JSON-PHP
    6. Prototype
    7. YUI Library
  24. GNU General Public License