[eluser]JayTee[/eluser]
I always enjoy reading threads like this because of the 'holy war' quality they often have. All-too-frustrating to the newbie is the simple '<library> is the best!' with little or no explanation as to why <library> is the best.
If I were to guess, I'd say the OP was trying to get some honest feedback as to why a particular library is preferred over another. Nick Husher had the best response with regards to the YUI; which was probably the only one I read that actually attempted to answer the OP.
I'm not trying to troll - I'm trying to convince some of you to give more thorough responses to "why" <library> is preferred.
Here's my take:
First, library size is irrelevant. I combine/gzip all of my js file when their sent to the browser. I can get the full prototype/scriptaculous library in about 13k to the user. Not too shabby.
Anyway like lay-z-cow mentioned, it's a matter of your own preference. I'm a fan of prototype's ruby-like syntax - its fun for me to use. When I compare jQuery against Prototype, there are some differences. For example, here's a function that does the same thing in both prototype and jquery - you decide which you like better.
jQuery:
Code:
//apply a click event to an element
$("id_of_element").bind("click", function(){
alert('Clicked');
});
Prototype:
Code:
//apply a click event to an element
$("id_of_element").observe("click",function() {
alert('Clicked');
});
You can see the difference between the two implementations of that particular method are subtle. There are other functions that are *very* different in terms of syntax; but both are able to achieve the same results.
Once again, it boils down to a syntax preference. I'd say jQuery is probably the knock-out champion for getting some good page effects/functions up and running with very little manual coding. If I'm having to code a bunch of stuff from scratch, I prefer the syntax of prototype easier to work with.