AJAX Frameworks - You choose!

AJAX Frameworks - You choose!

Hi, all!

It's time we open a topic on this. Everyone's using ajax frameworks more and more to better their websites. According to Pingdom (http://royal.pingdom.com/?p=305) «Prototype turned out to be the most-used framework in this survey, with JQuery not far behind.» Other popular tools were Mootools, Yahoo UI Library and Dojo.

Let me hear your opinion. Which framework is better and easier to work with? Which one is more complete?

Pedro Gonçalves
I like a lot jQuery. It's got an easy syntax and it's rather extensible (it has a rather complete core, and also has a lot of plugins) and is very self-contained.

PrototypeJS (+Scriptaculus) has huge user base but jQuery is catching up. It is a powerful library which can make your life a lot easier but has a huge drawback: Prototype pollutes your global JavaScript objects (such as the Array or the String) which may cause some trouble when you need to use other libraries because you decide to include some component on your page that was created by a third party and uses another library. jQuery is extremely self-contained: you can even load different versions into the same page without having clashes. Yahoo UI is also quite self-contained.

I don't like Dojo's philosophy in which you use non standard HTML tags and attributes for mostly every widget. Despite that it's a rather powerful and complete library too.

Yahoo UI Library is also very powerful and complete, but in my opinion it's more difficult to work with due to the level of object nesting you have. Writing all the time Yahoo.some.package.name.method() may seem cool and organized for a while but soon either you remember all those long names and got used to them, or it'll be a real pain.

Don't know Mootools enough, sorry :-)

All of these are very complete so it'll be more a matter of personal taste.
We have evaluated several options and chosen jQuery to go with due to the reasons explained by Ventura.
I really recommend using it for newer projects.

Lúcio Ferrão
This can turn out to be a religious war, and many things can be said about them all.

I'm a big fan of jQuery, but would go with YUI for the Yahoo's brand backing up the project. John Resig is brilliant, but I'm sure the project would end if he was to drop out just like it's happening now with the ReiserFS since the arrest of Hans Reiser.

Yahoo YUI is not an option. We need a smaller framework and we should really will stick with jQuery inside OutSystems. If everyone chooses a different framework we will be much less efficient.
Actually if by size we are comparing their footprints, we can come up with some numbers about the current releasese:

For JQuery, the uncompressed include file stands for 100K in size, while the minified is some 56K (I'm not taking the packed one into account as it's really not recommended to use).

Comparing with YUI we have an uncompressed file of 184K and an uncompressed of about 36K. So in a use of a normal compressed file, we can have a smaller footprint with YUI, plus I'm including in this simple comparation yahoo.js, dom.js and event.js files. Since we can load only the required modules per need basis, which is useful because YUI as lots of components, we can even lower this number.

But I think I was misunderstood, I'm not really trying to convince anyone to use it, I'm just debating an option and I actually prefer JQuery for it's syntax.
Microsoft (Scott Guthrie actually) announced yesterday:

«I'm excited today to announce that Microsoft will be shipping jQuery with Visual Studio going forward. We will distribute the jQuery JavaScript library as-is, and will not be forking or changing the source from the main jQuery branch. The files will continue to use and ship under the existing jQuery MIT license.»

This is probably a good indicator of the javascript framework to use.

Check: http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx

Gonçalo Borrêga

I'm also evaluating which Ajax framework to use and have been looking at Ext JS. Have you had any experience with this framework? They have a very comprehensive set of widgets for the UI,  with very good visual consistency and design. We are comparing that to JQuery so any insight would be helpful.


The other nice thing about Ext JS is that there is a bridge to - mobile development.