This week, I’ve switched favorite Javascript frameworks. I was a heavy jQuery user, and still think that the framework is very nice. As part of a discussion on the Satchmo-Developers list about what Javascript framework to use as the default for the Satchmo web shop framework, I ended up doing a survey of the best ones available.
This is highly debatable, of course. In the end, I simply ended up trying to optimize my based on these desires.
- It should be nice to the global namespace. I dislike frameworks that pollute the air with all kinds of function names.
- It should be fast.
- It should have nice, easy to use effects.
- It should have extremely capable DOM manipulation.
- It should have great CSS selectors.
- It should have a good window.onLoad mechanism.
- It should not modify the base language. Prototype is right out! I really really hate that.
Based on these requirements, I narrowed my choices down to:
I then made a web page, loaded each of these in, and tried out various DOM manipulations and effects using the FireBug console. This was a fair way to do it, because it is how I prefer to explore a new framework. I like good docs, of course, but I also like being able to exercise the framework in an intuitive manner.
My results, in very short nutshell descriptions:
jQuery
Intuitive, easy to use, fast, great DOM manipulation, good effects. Great window.onLoad handler. Give it an A- grade.
ExtJs
Intuitive, very very extensive, great DOM manipulation, solid effects. The fastest to get things done when puzzling out on the commandline. Give it an A.
Mochikit
Very terse, much more “functional” in approach rather than class-oriented. Not good about polluting the global namespace. Yes, this is runtime-optional, but the alternative is very wordy. The functional approach (i.e. map(set, func) rather than $(selector).each(func)) is a bit off-putting actually. It makes it much harder to know what functions are appropriate to use with what objects. Give it a score of B+ due to my highly subjective sense of style.
Dojo
Too wordy. I dislike their framework for building widgets. I love their inclusion mechanism, but dislike that the reason for it is that Dojo is so huge. Give it a C.
The winner: ExtJs
In the end, I went with ExtJs. I am happily converting my existing code to use the framework, and encountering little resistance. It is a very easy conversion. I’ll still use jQuery for deployed clients, but all my new library code is going to be Ext based.
Technorati Tags: javascript, jquery, extjs, mochikit, dojotoolkit, dojo
















30 responses so far ↓
1 John Resig // Aug 20, 2007 at 11:24 pm
Hey - Sorry for missing this post before. I’m sorry to see you leaving - I’ve enjoyed your jQuery blog posts in the past. Is there anything that we can do to help you in the future, with jQuery? I wasn’t sure what our shortcomings were, other than that Ext was “very extensive”. Does this mean that you liked their selection of widgets? But yeah, yeah feedback you can provide will be helpful to us! Thanks!
2 Takis K. Bouyouris // Sep 5, 2007 at 2:57 am
Hi there!
Here is a quick thought: I have been lingering upon the same things lately - which Javascript framework to favour! I really like Ext for all the things you mention. But, firstly, it is more of a widget-framework than a Javascript framework, right? And, secondly, how may one integrate easily custom look-n-feel in it.
I mean, jQuery has simple functions to make your life easier and does not force you to adopt any kind of look-n-feel, thus letting this entirely up to you. Ext, on the contrary, has many widgets and a few choices for look-n-feel.
(of course these thoughts touch the visual parts of the frameworks and not their functional ones)
3 Raf // Sep 9, 2007 at 2:55 pm
That’s all nice but ExtJ has a commercial license. Price: $249 for the developer version. Is it really worth it?
4 Simon // Sep 19, 2007 at 4:14 am
Hi! What does it mean that Prototype modifies the base language? Is Prototype not appropriate solution for anything?
5 Bruce // Sep 19, 2007 at 9:14 am
Raf, you can use ExtJS with no commercial license. See http://extjs.com/ext-oss-software-license
You just get no developer support without one. ExtJS is licensed in a number of different ways, the most convenient of which is the LGPL license.
Simon,
Prototype modifies the base language, which makes it “not play nice” with other frameworks. See the excellent discussion at: http://blog.metawrap.com/blog/WhyIDontUseThePrototypejsJavaScriptLibrary.aspx
6 Ryan Zec // Oct 20, 2007 at 10:57 am
I am also been working with more javascript and javascript frameworks in the past 5-6 months. I first used mootools but after a month moved to jquery and i still love jquery. I have recently been shown what extjs can do(in term of web applications
7 JasonMichael // Oct 26, 2007 at 7:32 am
I have used ExtJs since it was once called Ext-YUI back in December of 2006. Even without the commercial license, the support forum is phenomenal. There’s probably a group of 12-30 Ext veterans available to answer your questions, throughout the day. The Ext fan base has probably quadrupled since then, but the veterans are still very good at helping with questions (though they seem tired of answering the same ones all the time… they say, ‘Search is your friend.’, but they’ll still point folks in the right direction). The knowledgeable folks who assist the newcomers truly keep ExtJS alive and growing. At the top levels, Jack is a gentleman and scholar, and the commercial license is definitely worth it, if you’re using ExtJS for a project and need the priority help - they really give it! The whole staff, etc, are just some of the best group of guys I’ve ever met in one place on the Internet.
-Enough said.. Nice blog by the way!
8 James // Oct 26, 2007 at 10:18 pm
You have been able use the jQuery adapter for quite a while with Ext… so did you choose to go with the YUI adapter, the Ext core or are you going to stick with jQuery + dimension for that?
Ext is slightly smaller if you go with the Ext core and of course with YUI you get the most mature setup but I prefer being able to bind an event or function to a class, which at least in Ext 1+ was not so elegant to do, whereas with jQuery $(”a.external”).onclick for instance is very clean and quick to implement plus you get the much more diverse range of plugins that comes with jQuery… Ext is very consistent and slick but not a lot of 3rd party plugins from what I’ve seen, mostly people just extending what Jack & team start (which are all awesome but beside the point).
any comments?
9 Ilia Masia // Oct 29, 2007 at 8:49 am
I like jQuery ‘cos I can touch the DOM in the way I want, in a very logic manner. Unfortunately my target is to make dynamic web application, and I have to give more attention to the business logic and not to work a lot to the interface.
ExtJS can build very easy and in a logic way the interface, the .js file it’s very easy to read.
Looking over the .js (behaviour.js) in the jQUI demo I got stoned. Come on, do you think I want to spend so much time on interface, and to have as a result a so hard to understand file?
Indeed, the jQUI looks more promising and it’s very flexible, but ExtJS it’s very easy to use.
I’m waiting for a easier way to make jQUI interfaces.
Thanks, and keep up the good work.
10 Michael Sync // Nov 8, 2007 at 6:51 pm
“The winner: ExtJs”
Why? jQuery and ExtJs got A-grade, right?
11 憂記絵 // Nov 9, 2007 at 6:59 am
和歌山県完全無料出会いの決定版地域に密着した出会い
12 Mike // Nov 26, 2007 at 1:30 am
I have been considering ExtJs for a while now, but what’s holding me back is a few things. Version 2 is still in beta and the custom builder that makes it a reasonable download (ie not 500K for the full thing) is still working with version 1. Also, I feel like ExtJs is doing too much user interface manipulation, that I take on too much risk by using them. If I decide to change something, then it would be much more difficult to modify their code, then if I maintain it myself. I feel like jQuery is a little safer choice, because that way I have better control over the client scripting that’s adding behavior to my asp.net controls. If I decide I need a new widget added to my controls, then no problem, because I’m maintaining it myself. Also, I get worried when I add something that is pushing the limits of what’s easy to do in Javascript, because it gets really tricky when the client says there’s a bug and it needs to be fixed ASAP. In my experience, javascript takes a lot of testing in a lot of browsers, with a lots of hacks to get things to work like you’d expect. Anway, I’m not trying to discourage anyone, but it’s something to consider when doing commericial deveopment.
13 Jake // Dec 4, 2007 at 7:26 am
All the Javascript frameworks have gotten very powerful .. however, prime reason these frameworks exist is to make Dynamic and slick user interfaces. I don’t know of anyone using Javascript on the server side. So, good and solid UserInterface Widgets are a must and I didn’t find any other JS Library (other than extjs) which have such good collection of widgets..even GWT is not that extensive. So, I think, in the end, if you want to compete with those slick looking commercial and super expensive ASP.Net web controls, you’ve no choice but to use something like ext.
14 Burcu // Dec 4, 2007 at 10:23 am
Well, all of the Javascript framework wars should end. I’m both an experienced user of jQuery and ExtJS but I couldnt understand your point to compare them. One is a tiny, easy Javascript library and the other is a heavy UI provider.
The purpose of the ExtJS team was to build a fast rich gui elements framework for web environment. I couldnt find any way to relate those libraries.
15 nitinpai // Dec 14, 2007 at 1:38 am
What about the rest of the frameworks which also have a good UI. For example Backbase, ZK etc
16 Nicolas BUI // Dec 24, 2007 at 6:23 am
Sure that jQuery is a damn good library just missing the Widgets part like ExtJS.
There are JQuery IU that try to have something similar but the objectives still far for the moment…
Backbase seem to be very professionnal but I can’t understand the expansive license price when comparing with ExtJS … And I don’t really like to mix the proprietary xml syntax to learn…
They also show an example how to integrate with ExtJS , well, I found it horrible.
What I found clearly good with ExtJS is how you can extend it and how you can customize it (almost no limits…).
17 Balloon guy // Feb 4, 2008 at 1:05 am
After reading this article I’ll look into
ExtJS for the next project. I was am, using jQuery at the moment
18 Gilbert // Feb 6, 2008 at 3:21 am
Don’t you find the file size of ExtJS makes it very unweildy?
19 Joe // Mar 10, 2008 at 12:53 am
ZK is a different animal. In additions to richness, it focuses more on the simplicity of Web programming. It, from my viewpoint, shifts the Web programming to a truly event driven programming model.
If you bring some ajax feature to existent Web application, ExtJS or GWT is a good choice. If your Web application needs a lot of communication between the client and the server, ZK, the so-called server-centric solution is better.
ZK published an article to address this. I think it is a good reference.
http://www.zkoss.org/smalltalks/gwtZk/
20 alex // Apr 12, 2008 at 1:42 am
I have used jquery before i knew extjs exist. But extjs is faster than jquery (inherent delay). Extjs is huge size and jquery is only 15kb. Extjs has lots of nice widgets. Jquery widgets are slow!.
21 Philip Weaver // Apr 26, 2008 at 10:00 pm
Bruce, do you have any feelings about the ExtJS license change? What concerns me are a couple of scenarios: 1. What if I wanted to publicly DEMO some work I’m done before I purchase a commercial license, does that mean I could lose rights to work I wish to publicly demo. 2. One factor in me choosing a development framework is to add a popular, marketable skill to my skillset - this Ext license change may make Ext less valuable in this regard.
22 Jonah Dempcy // May 7, 2008 at 1:31 pm
Care to comment more as to why you dislike Prototype (and other languages which modify the base classes of JavaScript like MooTools)?
At my old job for a Fortune 500 e-commerce company we went around in circles over this. I was part of a special team tasked with deciding which JS framework to adopt and one argument that kept coming up was “Prototype and MooTools break for/in loops” by adding methods and properties to base classes. Well, that is a pretty minor complaint if that’s all there is. What other reasons are there? Is it too “messy” to add methods and properties to existing base classes?
Personally, I would rather do:
obj.addEvent()
than
namespace.addEvent(obj)
as it is shorter and supposedly performs faster as well. Thoughts?
23 Jonah Dempcy // May 7, 2008 at 1:36 pm
@Simon: To follow up on your question about Prototype modifying the base language, it doesn’t really change the language per se, just the base classes. So base classes like String, Number, Boolean, Array and so on have methods added to them.
The difference is that in jQuery, to modify a String, you would do something like:
jQuery.method(str);
whereas in MooTools or Prototype, you would do:
str.method();
This is because in jQuery, all of the methods exist as part of the jQuery object (similar to a namespace), which is shortened to the $ sign, although this functionality can be disabled if you so desire. So, to use jQuery functions you need to call jQuery.method(obj) or $.method(obj), whereas in MooTools and Prototype the method exists on the object itself, i.e. obj.method().
Make sense?
24 Taken // May 8, 2008 at 4:43 am
Just found your site, amidst reading about the ExtJS license issue currently brewing.
Look again this issue. You might have to change your license for Satchmo from the BSD license to GPL.
25 neo // Jun 4, 2008 at 7:35 am
I was thinking, and I’m curious why do you argue about which framework to use next. I’m a beginner in JQuery and ExtJS and have used prototypeJS for a while. Isn’t there any way to make a bridge utility that would integrate them altogether? I mean in PrototypeJS, e.g there’s the method bind that exists also in jquery. If we could somehow rename the conflicting methods, wouldn’t that bring the best of all worlds?
26 Bruce // Jun 4, 2008 at 3:29 pm
Neo, I wouldn’t want to use a bridge like that. Frankly, learning any framework well is a time investment. Learning more than one thoroughly is a waste of time that I could be using for paid client work or for learning a new language.
27 Bruce // Jun 4, 2008 at 3:56 pm
Please see my followup article where I discuss why I really didn’t move from jQuery.
http://coderseye.com/2008/why-i-didnt-switch-from-jquery-to-extjs-after-all.html
28 senthil // Jun 11, 2008 at 3:57 am
This is a stunning framework.. Very fast, and the its equivalent to a professional framework..
I am yet to explore this.. but i should say i am most impressed with this..
29 adam // Jun 13, 2008 at 5:31 pm
you are heavy jquery user and don’t know extjs has nothing to with jquery. it is like apple and oranges. you can not move from one to other.
you should delete this enrty it shows you how ignorant you are on this subject.
30 Bruce // Jun 13, 2008 at 6:35 pm
Adam, I don’t appreciate the “ignorant” remark. Yes, they are both incredibly useful frameworks. I am not attacking either. What I am pointing out in this post and its follow-up http://coderseye.com/2008/why-i-didnt-switch-from-jquery-to-extjs-after-all.html is exactly your point.
They are useful for different things, and for 95% of my paid and unpaid development efforts, jQuery is the better (which means more useful) choice for me.
Leave a Comment