advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Partners & Affiliates
advertisement
advertisement
advertisement
 

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. 


advertisement
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

      Next Page: Pure JavaScript Libraries
    advertisement

          Register for free to read this and other premium DevX content!

          Already Registered? Click here to Login

    • About You

    • Contact Information

    • - -      Ext: (optional)
    • Company Information




    • Create Password

    Page 1: IntroductionPage 3: Server-based AJAX
    Page 2: Pure JavaScript Libraries 
    DevX is a division of Internet.com.
    © Copyright 2010 Internet.com. All Rights Reserved. Legal Notices
    advertisement