Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Which AJAX Library Is Right for Me?

Free AJAX libraries are multiplying like bunnies in the spring. Here's some guidance to help you sift through the dozens of options and choose the one—or ones—that best suite your environment and objective.

o you want to jump into the AJAX (asynchronous JavaScript and XML) development fray, but you don't want to make the XMLHttpRequest calls directly by writing the XMLHttpRequest code yourself. Then you've no doubt noticed the new, freely available AJAX libraries that seem to appear every day and the plethora of commercial AJAX products seeking to make you fully buzzword compliant. All of them seem to abstract you from hand coding (although those developers who want to know every line of code their applications execute may prefer that), but how do you go about choosing the right one?

The first step is understanding the two basic types of library and the paths they each take to get AJAX functionality into your application:

  1. Pure JavaScript libraries provide core remote scripting.
  2. Server-based AJAX libraries generate the AJAX code from your server application.

Each type has its place depending on the type of application you're developing, but mixing and matching the two is an option also. In the end though, your personal preference plays the largest role in your choice (see Table 1. Pros and Cons of AJAX Library Types). To help you determine which is right for you, this article highlights the strengths and weaknesses of three popular pure JavaScript libraries and a few options offered by the server-based AJAX libraries for ASP.NET, PHP, and Java.

AJAX Library Type Pros Cons
Server Based
  • Can map native server objects such as database results to JavaScript equivalents
  • Minimizes the amount of JavaScript code you have to handle (depending on the library)
  • Ties the JavaScript code tightly to the server language
    Pure JavaScript
  • Capable of handling multiple server languages
  • Clearer separation of client and server code
  • Leaves you to manage how to translate your server-side return values to XML or JSON
    Table 1. Pros and Cons of AJAX Library Types

    Comment and Contribute






    (Maximum characters: 1200). You have 1200 characters left.



    Thanks for your registration, follow us on our social networks to keep up-to-date