View Full Version : What Javascript/AJAX libraries exist?

03-17-2009, 05:00 PM
Hi all,

I normally usually just do PHP server-side coding, but think it is now essential to pick up some AJAX. I have read through some AJAX tutorials which teach how do it from ground up. Are there any libraries, though, which have encapsulated those usual functions so that I don't have to reinvent the wheel?

03-18-2009, 02:34 AM
jQuery (http://jquery.com/) has great ajax functions, take a peak.

I'm sure the following also have some ajax functions, but haven't ever used it (dont know if they have ajax)

MooTools (http://mootools.net/)
Prototype (http://www.prototypejs.org/)
Scriptaculous (http://script.aculo.us/)
jPop (http://webscripts.softpedia.com/script/Development-Scripts-js/jPOP-Framework-31900.html)

03-18-2009, 03:04 AM
I use the YUI library (http://developer.yahoo.com/yui/), which has a great ajax module called Connection Manager:


03-18-2009, 04:54 AM
In addition to the others already mentioned, there is DOJO:


Probably others. Personally, as far as libraries go, I have the most experience with jQuery, and believe it has some advantages. However, it is worth noting that jQuery recently adopted some of the selector code from DOJO, recognising that it was faster - more efficient.

In the final analysis though, it depends upon what you are doing. Often a custom routine will be most efficient, rather than adding an entire library for only one or two of its features. Also, most if not all libraries are nowhere near as backward compatible or cross browser as a custom routine may be. If supporting the maximum number of browsers and systems is part of your goals, custom code is still the way to go. A custom routine can be as forward (if not more so) compatible as any library, while at the same time supporting many older browsers that these libraries neglect.

For a very cross browser, backward and forward compatible basic AJAX routine, see:


Although authored by yours truly, it borrows from the best I could find in all the various approaches. It is basic though. This means that it cannot accomplish some of the more advanced AJAX objectives in and of itself. At the same time it points you in the right direction for code of that type, should you choose to custom code AJAX that is as universal as possible.

03-18-2009, 06:51 AM
Thanks a lot.

I have see a lot of neat effort done with AJAX (progress bar, in-browser pop-up) - does those libraries handle those, or are those custom coded with Javascript/DOM?

03-18-2009, 07:05 AM
Er, progress bars and pop-ups don't have anything to do with AJAX. They're just document effects — there's no communication at all with the server, much less the asynchronous XML-using kind.

I think Dōjō is one of the more up-and-coming kits, but jQuery is popular in some crowds nowadays. :) ExtJS (http://extjs.com/) is also worth looking at.

I think you (and we) should first understand exactly what it is you're doing. Javascript and AJAX are not synonymous. Javascript is a programming language. AJAX is a simple programming technique that involves passing data back and forth asynchronously between the server and client, using Javascript and formatted as XML.

If you're truly just looking for Javascript libraries, I find Functional Javascript (http://osteele.com/sources/javascript/functional/) very useful. I have a small assortment of my own libraries for various tasks, too.