Chapter 4. Using Prototype’s Advanced Ajax Features
In this chapter
- Prototype’s advanced Ajax classes
- Using HTML and Ajax
- Comparing data- and content-centric Ajax
- Measuring HTTP traffic
This chapter will conclude our examination of the different styles of Ajax, of what Ajax can bring to a web application, and how Prototype makes Ajax development easy. In chapter 2, we introduced the QuickGallery application, a non-Ajax web app that we were going to convert to use Ajax, in order to eliminate the full-page refresh associated with every request made to the server and change the stop-start pattern of user interaction. In chapter 3, we developed two Ajax-powered versions of the QuickGallery application, using XML and JSON. Both transmitted updates from the server as structured data, with the client-side JavaScript containing all the logic for parsing this data and generating updates to the user interface. In terms of the types of Ajax that we identified in section 3.1.1, the implementations that we presented in chapter 3 clearly fitted the content-centric model.