[Chicago] [OT] Dijit Widgets

Feihong Hsu hsu.feihong at yahoo.com
Tue Nov 6 18:51:38 CET 2007

Here's my comparison of ExtJS and Dojo, from my (limited) exposure to them. I actually took a look at Dojo a few years ago, but unfortunately back then my JavaScript was really pathetic and looking at the unit tests didn't get me anywhere.

Dojo doesn't have great documentation; the Dojo Book for 0.9 just covers the basics. The two demos on the Dojo site aren't enough, but if you look inside the dijit/tests directory you'll find a lot of good examples in there. One cool thing about Dojo is that you can use Amazon's edge-cached version, so you don't even have to serve the JS files from your own server. You can embed widgets directly into your page, without writing JavaScript, by using the dojoType attribute in your HTML tags. Dojo has a ton of stuff in it besides just widgets, you can use it for local storage, back button support, package management, unit testing, etc. One issue with Dojo is that there are some inconsistencies, probably because a lot of different people work on it. For example the onChange handler in dijit.ComboBox doesn't receive an Event object, it receives the value of the ComboBox instead (which is not how other handlers work). Also, and this is a matter of personal taste, I don't like the
 themes that are included with Dojo. For example in Firefox the Dojo tree widget's labels don't line up to the collapsers (the plus and minus buttons) like you would expect them to. Another drawback is that Dojo's stable release doesn't include a grid control, however there is one in 1.0 RC1 (don't know when it will become stable enough to be served by Amazon though).

ExtJS has really good documentation, and a solid set of examples that you can learn from. The actual JS files aren't served by any corporation, you'll have to put them on your own site. You can't embed your widgets directly in your page like you can with Dojo. This might make complex layouts a bit more painful to implement. ExtJS's API is really consistent and the widgets look pretty good in my opinion. The included themes hew closely to the look of Windows, and most widgets look like how you'd expect Windows widgets to look. All widgets that you would reasonably expect to use are there, including grid, tree, and form. In particular the Debug Console in ExtJS is really nice, it even includes a built-in DOM inspector. Although Dojo also includes support for drag 'n' drop, the examples are paltry compared to the ones for ExtJS. 

Overall, I'm more impressed by Dojo as a whole. The number of packages has gotten fairly big, it's starting to resemble the Java standard library. Its widget system is flawed but improving with each release. In constrast, ExtJS doesn't try to tackle everything, but focuses on providing a very complete and easy-to-use widget library. ExtJS includes adapters that can supplement the capabilities of its base libraries. Adapters include YUI, jQuery, and Prototype.

Currently I'm doing a project where I need to choose either ExtJS or Dojo for the widgets. At the moment, I'm leaning towards ExtJS, because I think its widgets are easier to work with. But the decision hasn't been finalized so I may switch to Dojo as the project progresses.

- Feihong

Kumar McMillan <kumar.mcmillan at gmail.com> wrote: On 11/1/07, Jeff Hinrichs - DM&T  wrote:
> ...When I get a minute to breathe I plan on trying out ExtJS.

I'm on a project now for an intranet / CMS type of site and we decided
to go with ExtJS (http://extjs.com/).  It's very easy to get started
with and the documentation is very thorough.  I believe the version
we're using is built on YUI but judging from the source files it seems
that this code has been merged into ExtJS itself.  All in all I'd
recommend this to anyone who wants to provide a more "desktop like"
interface for their users.  I wouldn't recommend using it for a public
facing site unless you have a Q.A. dept strictly dedicated to browser
testing.  However, it certainly promises to be cross-browser
compliant.  We have the luxury of forcing everyone to use Firefox.

The licensing is interesting.  It's actually LGPL 3.0, which is why we
can use it for an intranet application, but they also offer a
commercial license for purchase in case you want to sell the
application or if you need to satisfy some existing commercial license
requirement (or just want to support its development).  They kind of
push the latter on you which might turn some people off using it,
until you read the fine print that it is LGPL by default :)

Chicago mailing list
Chicago at python.org

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/chicago/attachments/20071106/d3af231e/attachment.htm 

More information about the Chicago mailing list