views:

679

answers:

10

After the suggestion to use a library for my ajax needs I am going to use one, the problem is that there are so many and I've no idea how to even begin telling them apart.

Thus, can anybody A) Give a rundown of the differences or B) Point me (and others like me) somewhere that has such a list. Failing that plan C is to go with whichever gets mentioned the most here.

+9  A: 

To answer B:

Comparison of JavaScript frameworks


EDIT: Although everyone and their mom is apparently riding the jQuery bandwagon (I use MochiKit), there are many libraries which provide the same functionality - the problem set which most libraries solve (async client-server communication, DOM manipulation, etc.) is the same, and there are few that don't have what you will need to get the job done.

The important thing to determine for yourself is whether or not a library will fit your particular style and sensibilities. Wide-spread ignorance about how JavaScript, the language, actually works, coupled with the negative press resulting thereby, coupled with the now-immense popularity of jQuery leads most people down that road. Thankfully, it isn't a bad road to be on as there are a lot of travellers to keep you company when the abstractions leak and you need help. You probably can't go wrong choosing jQuery.

Jason Bunting
+3  A: 

Wikipedia?

+3  A: 

Stackoverflow uses jquery I think, and I hear that jquery is all the rage

svrist
+2  A: 

We are starting to use jQuery where I work. I'm not big on JavaScript, but everyone else likes it a lot. I don't know if that helps at all...

Thomas Owens
+4  A: 

jQuery, easy to learn, easy to use, small footprint, active plugin developer community. Can't go wrong with jQuery.

RedWolves
+4  A: 

For what its worth jQuery's website redesign launched this morning (Friday August 29, 2008). Good fun fact. And of course +1 to its mention.

Joseph Pecoraro
+1  A: 

I've been using Prototype + Scriptaculous.

They have good API documentation and work great for me! The biggest benefits are:

  • Cleans up messy javascript code
  • Cross browser compatibility
  • Simplifies AJAX handling
  • Smooth UI effects
yoliho
+3  A: 

I have to put in another vote for jQuery. It is dead-simple to use and makes your javascript much cleaner.

As an example, if you want to add an onclick event to all the divs inside an element with id "clickdivs", you just do this:

function clickedme(event) {
  alert('Someone clicked me!');
}
$('#clickdivs div').click(clickedme);

Your HTML would look like this:

<div id="clickdivs">
  <div>Click Here</div>
  <div>And Here</div>
  <p>Not here</p>
  <div>Click Here Too</div>
</div>

Viola!

Neall
+2  A: 

Related thread here, with some good contributions:

What JavaScript library would you choose for a new project and why?

Flubba
+1  A: 

I suggest restricting yourself to a library which can be pulled from a free CDN such as Google's AJAX CDN or Microsoft's AJAX CDN. Availability on a CDN indicates a certain minimum level of popularity and using one will allow you to load your web pages faster. jQuery is my preferred library and is available on both the Google and MS CDNs.

Andrew