O'Reilly logo

Ajax Bible by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5

Introducing Ajax Frameworks

IN THIS CHAPTER

  • Building the Ajax Utility Library
  • Creating the getText function
  • Creating the getXml function
  • Creating the postDatagetText function
  • Creating the postDatagetXml function
  • Using the libXmlRequest Ajax framework
  • Using the AJAXLib Ajax framework

Want to avoid the whole business of writing Ajax code yourself? If so, you're in luck because there are literally dozens of Ajax frameworks out there that will do the work for you. An Ajax framework contains the code you need to support Ajax, and that code has already been written for you. All you have to do to use an Ajax framework is download it and put it to work (most are free). Want to save time using Ajax? Use an Ajax framework.

The majority of Ajax frameworks, as you're going to see in this and the next chapter, are client-side JavaScript code libraries that you can add to your own pages. After doing so, all you do is call functions in those libraries to work with Ajax. The other types of Ajax frameworks are server-side frameworks, and you'll get a look at them in Chapter 7.

Because these Ajax frameworks are free, and are often developed by hobbyists, they're sometimes not developed with the best programming practices in mind. For that reason, this discussion starts with a special Ajax framework, the Ajax Utility Library, developed for this book, and which uses good programming practices. The Ajax Utility Library is easy to use and simple to install.

Using the Ajax Utility Library ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required