Thu 17 Aug 2006
I get lot of people asking me about AJAX and what library to use, so I will write up here my personal preferences on what to use and why.
First and foremost THE library to use is Prototype, I use a light version of prototype that comes with moo.fx lib.
Prototype is the `core` not the end means for doing ajax calls. For easy easy ajax work you need to look at moo.fx, the prototype lite and moo.ajax can be downloaded easily from here. The reason for using moo.fx is that it is a super small library which gets the job done.
AJAX calls in moo.ajax are so easy it is ridiculous and with prototype $(`ID`).property style work you can just plop whatever into whatever easy as pie.
For “full-featured” libraries for doing effects, I would suggest Rico which has nice smooth animations and scrolling and it`s drag and drop lib is really nice. Though, the reality is you will seldom ever really need this functionality so use sparingly.
The other popular lib is script.aculo.us which I personally like the list sorting portion of, but the library is big and chunky and in general I feel it is just over the top and moo.fx is generally a better choice.
Using small and tight javascript libraries is kind to your users, makes your page feel snappy (vrs that chunky web2.0 feel on sites that include 30 js libs because they just HAVE to have drag and drop on things) and it is also easier on you because you don`t need to read a book to use them. I was up and working with moo.ajax and moo.fx in no time, and any questions I had could be easily solved by either looking over the source (which is 3kb) or poking around in the documentation they have on their site.