4.4. Summary

In this chapter, you learned about several Ajax communication libraries. These libraries facilitate Ajax communication by wrapping XHR behind methods that handle all of the details. All of the libraries mentioned in this chapter introduce different interfaces for Ajax designed to save developers from the mundane details.

The first library introduced was the Yahoo! Connection Manager. Created by Yahoo!, this open source library allows Ajax requests with a minimal amount of additional code. The library handles the determination of success and failure based on the HTTP status of a response as well as handling scoping issues with callback functions. The Yahoo! Connection Manager is a pure Ajax library that does only Ajax communication and nothing else.

Next, you learned about Prototype, an open source JavaScript library. Prototype, unlike the Yahoo! Connection Manager, is a complete JavaScript library that isn't solely used for Ajax communication. The library has several objects that make Ajax communication and monitoring much easier for developers.

The last library discussed was jQuery. Unlike the other two libraries previously mentioned, jQuery aims to change the way you write JavaScript. It wraps common DOM methods inside its own object structure, which allows advanced querying of DOM documents. The library also introduces several convenient methods to enable Ajax communication.

Choosing to use an Ajax library is a decision that must be based on requirements. One may be more appropriate for your project than another. Make sure to do some research into any library you choose before committing to it to ensure that it can grow and evolve with your application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset