+10  A: 

Hands Down - jQuery

scunliffe
Why do you think jQuery is better, and which of the others have you used?
Allan Wind
Everyone and their mom is jumping on the jQuery bandwagon, even if they don't know why they should do so. Popularity is perpetual.
Jason Bunting
Check out one of John Resig's video posts on "building" a JavaScript library. He explains what you would want in a library, and indicates how jQuery does it. Points out some of the pitfalls of other libs, and how jQuery avoided/overcame them. In general, most that try it, love it.
scunliffe
Found link: http://ejohn.org/blog/building-a-javascript-library/
scunliffe
certainly not for rich internet apps. maybe for mild animation on a portfolio page.
seanmonstar
@seanmonstar - why not?
Matt Huggins
@Matt - jQuery makes the DOM easier. That's their mission. But for a rich application, you need so much more, like a strong modular system, inheritance, utilities for things not part of the DOM.
seanmonstar
A: 

dojo

Alex
A: 

Ext-js has some great UI controls, but it isn't free. jQuery seems to have a good strong userbase (not sure if that's so important tho).

andyc
+1  A: 

It's a matter of personal preference obviously, but I found jQuery to be the easiest to use and deploy and it has a very powerful API.

Eran Galperin
+28  A: 

You will get a million answers here. The short one is: there are several, not a single one. They are all different in some ways and similar in others, and, in general, none of them are poor choices. The main frameworks that I would recommend are (in alphabetical order so as not to show any bias):

  • Dojo
  • jQuery
  • MooTools
  • Prototype (with Scriptaculous)
  • YUI
  • MochiKit

Each of these have different styles, different communities, and different focuses. Which one you should choose is mostly a matter of matching these frameworks' style with your own. Spend some time with the tutorials and demos of each and pick the one that makes the most sense for you.

As a disclaimer, I'll point out that I'm a developer for MooTools, and wrote a book on how to use it. I wouldn't say that MooTools is better than any of these other frameworks; only different.

Anutron
Alphabetical order for no bias, except for a _little_ negative bias for MochiKit? lol.
Nivas
+4  A: 

That depends. Dojo and jQuery are good answers, but I think the two solve different needs. jQuery is an extremely useful tool for manipulating the DOM in easy to read, quick, and powerful ways. Dojo is more of a robust set of tools (hence why it is a toolkit not a library/framework) and gives you widgets, built-in regex validations, AJAX support, all sorts of great stuff too numerous to name them all.

There is some overlap between the two, surely, but I think ultimately they seek to serve two different needs.

Yadyn
A: 

YUI is very complete but tends to be large (Container scripts tend to be almost 40k when compressed!). But it does let you do sliders, fades and containers with less lines of code than other libraries provided you don't mind it looking like a YUI app out of the box.

Personally, I'd suggest going with something smaller (jQuery, prototype) and doing more of the grunt work yourself if you have the time as you don't end up with as much crud as you might otherwise

marshall
+2  A: 

Dojo has the best widget system IMO.

Dojo has a great build system that compresses all your CSS and JS, is ARIA compliant, and has a great widget system that you can use to make your own widgets quickly and easily.

Ext is good too, but you're going to have a licensing nightmare if you use it in a corporate environment.

Psychcf
+2  A: 

Extjs is the richest of the ones I've used. The API documentation is extensive and well done. Extjs actually uses jsquery or prototype or yui at a lower level. (It works with all three).

Extjs has a very desktop-like orientation to web-app development. Windows, panels, components, etc. Lots widgets likes grids and progressbars and sliders are built it. For better or worse, working with Extjs feels much more like desktop app development than any other js libraries.

It's also commercial -- not OSS.

It's a pretty fat library. The js includes for all the extjs libraries are about a meg to download for users.

mshiltonj
A: 

One more vote for jQuery. It is very small, very fast and very logical (assuming you know your way with CSS selectors). It is build on the sound idea - get stuff, do something to stuff. If you haven't try it before - do that now.

Rimantas
A: 

Jquery is stable and has many examples. I know it's been mentioned, but I'll give it another vote.

Mike
A: 

JQuery man! JQuery is not only a great JavaScript library but the AJAX API provided in the JQuery is also pretty decent.

azamsharp
A: 

And another one for JQuery!

Victor Noagbodji
just vote up the jQuery answer, no need answering the same answer again and again, you're not adding anything to the conversation
Moak
+5  A: 

If the focus is on "rich internet applications" then jQuery alone won't get you very far. It is an excellent library, but "applications" (vague-quotes, not scare-quotes) tend to require things like undo commands. MVC is also popular as a GUI application design, but the support in jQuery is non-existant. Not to begrudge jQuery, it's just not designed for this.

YUI is a very nice (and well documented!) set of widgets, but is also not a an MVC stack.

The playing field is much smaller in terms of Javascript MVC frameworks. One of which is Javascript MVC, in fact.

At work we're building a thick JS client, and we just took a look at ExtJS, YUI, JavascriptMVC, Cappuccino, and SproutCore. Of those, the serious contenders were JavascriptMVC+YUI+EJS+LotsOfCustomCode or SproutCore+YUI+CustomCode. They actually complemented each other well: JavascriptMVC's weaknesses were SproutCore's strengths, and vice versa.

It pains me to use the metaphor, but JavascriptMVC is coding-to-the-metal compared to SproutCore. It was trivial to get it to do trivial things, and YUI/EJS integration is a snap. SproutCore brings us something we didn't know we could get in a package we can live with: KVO bindings (ripped straight from Cocoa), and a bunch of other Cocoa goodness besides.

The thing about bindings is that they have to be in from the beginning or they're never going to work right, and they're not in JavascriptMVC, and we can't port them without writing our own framework. And bindings are really, really slick. If SproutCore had an InterfaceBuilder, and decent documentation, it would change the web almost overnight. Not to hype the hell out of it or anything.

The crushing reality is that actually using it is a bit painful. When bindings go wrong, you're standing on a ravioli noodle trying to get to another one without crossing any of the boiling water: you just can't get there from here. I hope you're comfortable with grep, and even that'll only get you so far. This is nothing tools can't overcome, but those tools don't exist right now.

Documentation in the MVC frameworks, alas, is not a reasonable discriminator in this arena. It's all terrible, everywhere you look. But to be fair, these are all very young frameworks, and, much as i might pray, there's still no Documentation Fairy.

Brian Cully
I disagree with you on one point, the documentation for YUI is excellent, http://developer.yahoo.com/yui/3/api/
Phil C
I pointed that out in the second paragraph, but I can see how the last paragraph might confuse things. I've edited it to make it clearer.
Brian Cully
A: 

I voted Anutron's answers up as the best; but register my vote also for jQuery.

rp
should be a comment, not an answer...
Moak
A: 

I prefer MooTools. I think MooTools-based Javascript is the easiest to read and maintain. It's structured, and as close to OOP you can get with Javascript, I think.

Working with scopes in MooTools is a dream compared to standard JS.

If you're looking for a good arsenal of ready-to-use scripts though, I'd probably go with jQuery, for it's large community (just look at all these jQuery votes/comments :). If you're writing something from scratch, and isn't depending on others work, MooTools :)

Rexxars
A: 

I use Qooxdoo, I like it :) It has good set of widgets, and it is still emerging...

raffimd
A: 

jQuery. Nothing else matters. :)

Steven Rogers
A: 

Why isn't Cappuccino a serious contender?

Boog
well if you can't give us a reason why it should be, then why are you surprised?
Moak
+1  A: 

I had a look at the other answers and noticed that no one had mentioned GWT yet. GWT takes a different approach by having the source code in a subset of the Java language and then compiling it to Javascript to run on the browser.

Pros

  • It compiles different browser versions of its Javascript files leading to excellent cross browser compatibility.
  • Internationalization is built in.
  • The widget library is impressive, especially for "application" style interfaces.
  • The source code is written in Java so that things like automated unit tests, debugging and type checking are possible.
  • There is integration with other Javascript libraries so you can use GWT with other things if required.
  • GUI designers exist.

Cons

  • The source code is written in Java. If you are not used to Java this can be a hurdle.
  • The RPC mechanism back to the server, whilst being server agnostic, can be a little hard to understand, especially for non Java servers.

We have a UI written in Dojo with custom widgets and we are also prototyping a GWT replacement. Overall the process of implementing a custom widget in GWT beats Dojo hands down.

Peter Kelley
+1 for well thought out answer among a dozen 1 sentence answers
Moak
+1  A: 

I things JQuery is amazing for smaller projects and the like, but Dojo is amazing for everything else. I can't recomend prototype or mootools at all because of the way they add to or mess with too many things in the global namespace. ExtJS was great until they commercialized it, I was going to start contributing, but they closed it up. :(

So in the end, Dojo all the way.

A: 

With my whole heart, I have to say -- There is NOTHING ELSE like SproutCore out there.

SproutCore is a fantastic framework for building GUIs. Not "web pages", but GUIs. It just happens to be written completely in Javascript, but it is much more like GUI frameworks such as Cocoa, Swing, etc.

And it is fabulously well done. Its code is beautiful. It's View class hierarchy is very well-factored, so that when you need to create a custom view (aka, "control", conceptually), you will most likely find that you can inherit from a base class and make great use of what's already there, and express only the differences in your class.

It has intelligence about what appears on the screen where so it can only update, for example, the 3rd and the 7th row of a grid (if those are the only 2 rows that changed). And it has so much more I don't have room to go into here.

It truly is a "guerilla" tool, in that it puts such great expressive power in your hands, that one developer could take over and manage a UI that previously required 10 developers.

Charlie Flowers