Monday, July 9th, 2007

Why choose Dojo?

Category: Dojo, Framework

Choosing a platform for your Ajax applications isn’t a trivial task. There are more choices than you have had hot dinners, and new ones pop up on a daily basis. If a framework wants adoption, it helps to have a story on why a developer should choose that library.

Dojo has just gone out and written up its thoughts on why you may want to choose their framework, which includes the following analysis, and a set of comparisons to Prototype, jQuery, Ext, MochiKit, GWT, and YUI. Give it a read, and let us know your thoughts.

Breadth and Depth: Dojo is the “full stack”. Instead of cobbling together components from several different sources, Dojo allows each component to build on a trusted set of high-quality building blocks by providing integrated infrastructure and a wide variety of optional modules. These components provide good solutions to common user experience problems and can be easily tweaked to meet your needs. From pane-based layouts to client-side charting and graphing to data binding to a time-tested module system, Dojo is solid infrastructure for delivering great experiences.
Quality: Infrastructure for internationalization and accessibility is woven through the entire fabric of Dojo. Keystrokes are hinted correctly. The components all fit together as a cohesive whole. Everything is customizable easily with CSS, but very little needs to be tweaked to get a great looking UI nearly everywhere. These are the hallmarks of a system which has been designed and tested to deliver great experiences, not only to users, but also to designers and developers.

Performance: Dojo is used on high-profile, high-traffic sites every day and Dojo’s build tools are a key reason why. Dojo’s package system makes it easy to manage large-scale UI development projects and the build system layers on top to make your applications scream; all without code changes. Dojo also packs high-performance implementations of common utilties into its core, and the rebuild of Dojo for 0.9 focuses heavily on performance and reduced code footprint. The result is a small, tight toolkit that is blazing fast. Dojo’s performance alone makes it an ideal platform to extend and build on.

Community: Dojo is an open community. As a result many individuals and companies have been able to come together on a level playing field to build tools that benefit everyone. The licensing of the toolkit is designed to be as apolitical as possible and we work hard to ensure that getting your itches scratched is easy if you are willing to get involved. All development happens in the open and the barriers to entry are intentionally very low. We don’t care where you work or how “qualified” you are, all we care is that you want to build products that makes user experiences better. Designer or developer or doc writer, the community Dojo values contributions of every kind and position in the community is commensurate with the quality of the work you do, not political wrangling. We’re working to change the notions of who can be contributors in Open Source and we invite you to join us in charting a new path. If you want to build a great product and think you can help us, we want to hear from you.

Posted by Dion Almaer at 12:01 am
42 Comments

++---
2.8 rating from 101 votes

42 Comments »

Comments feed TrackBack URI

Very Interesting!

Comment by Калоян К. Цветков — July 9, 2007

Anybody compare Dojo with the MS Ajax framework? Anybody tried to combine these two framework and used it together? I am looking for the master of it.

Comment by AsiaPartTime — July 9, 2007

If you dont really care about the offline capability that Dojo provides, I believe that jQuery and Ext is the best of all, and they make a perfect combination as well.

Comment by Timothy Dang — July 9, 2007

I especially like the part about “Community.”

The last framework I used was Mootools… The “Community” for that seems very snooty (i.e. the Mootools forums.) I will avoid Mootools for future projects.

Comment by M — July 9, 2007

yet again, another “big review” without comparing against Mootools (they barely mention it in the jQuery item)…

I hope that as moo 1.2 rolls out it will get as much attention as it deserves.

Comment by gonchuki — July 9, 2007

I work on a OSS project and we jumped around from framework to framework (we started off in dojo, then prototype/script, now jquery+yui).

The blog post, although a good effort, doesn’t really address the real reasons why people avoid Dojo like the plague.

Dojo is written for software engineers for people who want to engineer full apps in Javascript. Most webdevs just want to hack together something *that works*. Going to the Dojo website gives me a link to a 8MB tar. knothnxbye. At that point, I’m already searching for Prototype, which *links* to the JS file.

For all this talk about “Dojo 0.9” being “comparable” in size with Prototype and other libs, I still find Dojo’s code incredibly hard to follow. Load both Prototype and Dojo’s core JS and see which one gets you developing faster.

I have lots of friends who aren’t webdevs, but are having to start doing some light webdev for their grad thesis. For DOM manipulation, I refer them to jQuery, because most are familiar with XPath and they love the chaining of jQuery. I understand Dojo 0.9 has CSS3 selectors, but nothing else (correct me if I’m wrong). Am I the only one who thinks using selectors that design monkeys are most familiar with kind of silly?

So I’m not really sure who Dojo is geared towards, and this is why Dojo has such a bad rep. It’s too heavy for 99% of what’s done on the web, and the 1% it’s really geared towards handling doesn’t work that much better than YUI + jQuery. Sure, they’ve made some good technical decisions (Prototype’s manipulation of the Array() object KILLS me) on paper, but it clearly doesn’t seem to translate into winning the developers over.

Comment by r — July 9, 2007

really, after reading the whole post at Dojo’s web, still not convinced why to choose Dojo

Comment by ajaxus.net — July 9, 2007

“[YUI] targeted at a population of professional PHP developers”

Not too sure where they got that from. Despite the fact Yahoo uses PHP, YUI is not targeted at any particular server-side technology…

Comment by Cyril — July 9, 2007

I don’t really get the benefits of widgets that Dojo seems to promote as one of their main features…
I really like the packaging system and namespacing – something that prototype lacks – but YUI does that without any extra overhead…

Comment by kangax — July 9, 2007

I choose dojo because of it’s license and because from my experience, it’s easier to integrate with EXT and other frameworks. As a developer, what I hope in the future are proposals and/or frameworks stepping up to integrate well with each other.

Comment by Jonathan — July 9, 2007

What I gather from all these excellent comments is that Dojo can be used to build medium to large scale webapps with great results, but can be a bit hefty sometimes (esp as a reply to gonchuki’s points).

If you want to send form values and display a response with YFT, use prototype the functionality and script.aculo.us for the visual effects. Easy, light weight, and it does the job.
AJAX on Prototype: http://www.petefreitag.com/item/515.cfm
YFT quickie: http://www.ryboe.com/2007/01/10/dhtml-yellow-fade-technique.html
YFT demo: http://www.ryboe.com/2007/01/10/dhtml-yellow-fade-technique.html

However, if you are to make a tree widget with RPC to a backend server, you have lots of browser incompatabilities to worry about. Why reinvent the wheel? Dojo already has a fully functional and increadibly slick implementation. API: http://archive.dojotoolkit.org/dojo-2007-05-15/checkout/documents/tree_tutorial/src/main.html and Tutorial: http://dojo.jot.com/WikiHome/Tutorials/Using%20PHP%20and%20MySQL%20to%20populate%20a%20Dojo%20Tree%20Widget

Comment by narcvs — July 9, 2007

There should be a corollary post on why not to choose Dojo. This would definitely include lack of documentation, one of the most important aspects of developing a rich API. Browsing around their API docs doesn’t really provide anything fruitful because they doesn’t explain what some objects do nor have an example of what they do. Even the Dojo Book 0.9 has an under construction image.

Comment by Hank — July 9, 2007

@r: you get an 8MB tarball because you are also getting all of the tools used to create compact builds for your own use. Of all of that code, if you are looking to deploy something comparable to Prototype, all you need is the dojo directory–and the dojo.js file *is* comparable to Prototype in terms of size. We use CSS3 selectors because we’re painfully aware that XPath has not gained the kind of community acceptance we would have liked to have seen. Personally I’m finding the CSS3 syntax to be more than enough for all of my needs (though like you, I wish we could have the full axis capability of XPath). I also think that you’re still thinking about the 0.4.x branch as being “too heavy”; the Dojo Core (0.9) is pretty light to me.
@Cyril: not completely sure but I have a feeling that the reason why Alex said that is because that’s the impression he got directly from the YUI team.
@kangax: there is a lot more interest in the ability to declare widgets using markup than you’d think, and questions regarding Dijit completely dominate the majority of discussion we have on the Dojo Forums.
@Hank: yes, we know. Yes, we’re working on it. The biggest problem is the same problem every other software project shares: we all want to write slick code and don’t want to spend the time documenting it. There’s a new API doc tool coming (http://redesign.dojotoolkit.org is its temporary home while we iron out the wrinkles), and we keep the under construction icons around so that it’s also painfully obvious to us what we have yet to do.

Comment by Tom Trenka — July 9, 2007

I was introduced to the dojotool kit at Lotusphere 2007. I may not be as a senior developer like most of you, but I’ve got to admit that it was pretty easy to integrate dojo and a custom portal application we developed for Lotus Notes/Domino….

I’m slowly brainwashing all of our IBM Domino Web Developers to take interest in the Dojo Toolkit.

My only complaint is documentation.

But let’s face it, since it’s the ‘kitchen sink’,
everyone knows how to turn on the faucet……

Gentlemen, keep up the good work……..

Comment by Darby Flanagan — July 9, 2007

@r – Prototype has had chaining for some time now.
$(‘tab’).hide().addClassName(‘something’).update(‘inner text is neat’);

Comment by Randy — July 9, 2007

Can someone provide some examples of the “high-profile, high-traffic” sites using dojo – preferably ones making extensive use of dojo widgets. would be invaluable for an evaluation I’m doing at the moment. thanks

Comment by steve heron — July 9, 2007

I’ve been using dojo (0.4) at various projects and finally decided not to use dojo mainly for 2 reasons:
1.- very very bad documentation
2.- Bad performance. Using a simple component needs to download a huge amount of js files, making the page load very slow.

Maybe the new version is better…

Comment by Albert — July 9, 2007

@Albert, that’s exactly the point of Dojo 0.9: http://ajaxian.com/archives/dojo-09-the-next-generation-is-here

@steve: Off the top of my head, bloglines.com,renkoo.com, aol’s web mail beta and aim pages, and the apple store. Most of the more interesting uses of Dojo that I have seen to date are either in development, or are relatively new and not highly trafficked (yet). I think that Dojo 0.9s size and performance improvements should make this less of an issue.

Comment by Dylan Schiemann — July 9, 2007

@Dylan:

Don’t forget ebay, via shopping.com.

Comment by Jesse Kuhnert — July 9, 2007

In terms of the documentation issue with Dojo, for Dojo Offline I’ve definently tried to provide high quality docs for that part of the system. We have a new full tutorial and reference work for Dojo Offline:

http://docs.google.com/View?docid=dhkhksk4_8gdp9gr

Hopefully it both helps new users while providing lots of advanced usage info for developers that need to go deeper.

Best,
Brad Neuberg

Comment by Brad Neuberg — July 9, 2007

@tom, thanks for the response. as a response to the tarball thing, i know that download is the kitchen sink. the point i was trying to make, was as a potentially new developer to dojo, it doesn’t bode well when the first thing i have to do is download a 8mb tar and figure out exactly what i need. this isn’t an issue with dojo itself but more of a way you’re presenting the download on your site. a minor annoyance, but i really love how prototype just links to the js file itself. that’s a bit oversimplified for a project as technically complex as dojo, but i’m sure you guys can figure out something :) (and please, do not put yourself in the mess a long time ago where you had like 20 different versions to download.)

@randy, didn’t know dojo had chaining. guess i’ll give dojo another run after 0.9 comes out.

Comment by r — July 9, 2007

I really like the support for SVG but the other day I went to the web site to see how I could use Dojo, especially with Rails – was totally confused in looking for simple examples. To capture users, Dojo needs quick examples like:
How to use Dojo with PHP, or Rails, or Django in 3 minutes
How to add a graph component on your web site in 3 minutes
How to add a popup dialog box in 3 minutes

Most users don’t have time to experiment or figure out documentation to even see if it’s something we want – we need solutions fast and some quick, easy tutorials get us going

Comment by John — July 9, 2007

I agree with everybody here about he documentation problem with dojo. However the lack of documentation seems to be inversely proportional to the amount of code in the framework. While most frameworks have pretty web pages and cute examples, they don’t do very much. Dojo on the other hand provides very little in the way of examples and prettiness but an amazing amount of functionality, far more than anybody else out here even comes close to. Sure you can piece together 30 libraries based on prototype and get something that kinda resembles dojo but do you really want to keep track of 30 libraries from 30 different people?
The biggest problem with the Dojo Foundation is that they don’t sell themselves very well. But then they are programmers not marketing people… so I guess that comes with the territory.

Comment by Vance Dubberly — July 9, 2007

John, I really like your list of what kinds of ‘how-to’ tutorials you would want with Dojo; do you have more? What other kinds of “In 3 minutes” docs would folks want to see?

Best,
Brad Neuberg

Comment by Brad Neuberg — July 9, 2007

My response to this post : http://www.jroller.com/page/sjivan?entry=ext_vs_dojo

Comment by Sanjiv Jivan — July 9, 2007

I tried to use Dojo in the past and it was such a hog and crashed my browser every time it loaded. I’ll take you’re word that 0.9 is great and stick with jQuery.

The one thing that I never did like about Dojo was the fact that it was soooooo bloated. I like jQuery because it extremely small and I can extend it with the plugins that I need to get the job done.

This entire post for the Dojo camp sounds like desperation in my book to win back people since they pushed them away. Pathetic.

Comment by rip747 — July 9, 2007

I selected YUI for our team about 5 months ago. We are really happy with it.

It just seemed the most polished. The docs are great. That is more important than people realize. I want to get it working, tell me how, fast, and give me examples. YUI does this. Feature wise all of these guys have useful stuff so no real winner. YUI also is organized very well. Dojo was a close second though. And we aren’t opposed to using other libs on a case by case bases.

Comment by landmammal — July 9, 2007

@r: Ah. You’re referring to the 0.4 branch. AFAIK we’re only providing one download for 0.9, and we’ll be working hard to try to make it remain that way (since I completely agree with you about the whole 20 editions thing ;)

@John: please don’t hesistate to go the Dojo Forums and post that comment in a big way. More people that work on Dojo pay attention there than they do here.

@Vance: tell me about it :)

@rip747: You are always entitled to your own personal preferences. But don’t make a judgement like “sounds like desperation” when you don’t know anything about what went on internally with the Dojo group. We heard all of the complaints, we took a step back–and a very long, hard look–and finally we had the example of Firefox as inspiration. In short, we responded to the complaints. The problem (as I see it) is that we didn’t respond instantly, and while that’s a problem it’s also inevitable that it takes a while to turn a project around as radically as we did. If you felt that we pushed you away, we’re sorry about that–but we’re all volunteers and can’t respond to everyone and everything that someone says instantly (though I’d admit that some of us try, usually to the detriment of the project).

Comment by Tom Trenka — July 9, 2007

Speaking to the concerns about download size and getting up and running with the toolkit:

If you do not like downloading and unpacking Dojo on your drive, you can use the Dojo 0.9 beta from the AOL CDN. Just add a script tag and start experimenting. The xdomain 0.9 Dojo core served from the CDN is just 26KB gzipped too.

I definitely feel that pain on the lack of documentation and not having the API tool updated yet. I understand it is in the works, so hopefully that will get fleshed out sooner rather than later.

Comment by James — July 9, 2007

thanks to all the dojo guys for taking the time to respond – i know how hard it can be when the peanut gallery wants instant change but the pace of development never matches :)

i’ll be watching with interest to see how dojo 0.9 goes … such a shame you guys didn’t address this at an earlier stage, cause the last 3-4 months is when all the frameworks really took off.

Comment by r — July 9, 2007

I think DOJO is too slow to load. It gives good functionality, but for a simple web UI, I think it is too much. I have an https page that requires DOJO, and in the absense of browser side caching, dojo takes forever to load.

Mukul.

Comment by Mukul Kumar — July 10, 2007

@Mukul: you’re referring to the 0.4.x branch. Try any of these:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/
…and see if that’s still too slow for you to load.

Comment by Tom Trenka — July 10, 2007

Why nobody never write posts like “Why NOT chose Dojo”? I will never use frameworks like this, especialy on JS with a lot of code which i will never use, but user should load this code to browser anyway.

Comment by Vladimir — July 10, 2007

@ppl (like Vladimir) that don’t investigate their options thoroughly:

I have tried all the frameworks, and have had the pleasure of building a full fledged JS app.The Dojo ppl simply try to make good code in my opinion. It IS loading only the minimum bytes needed ON DEMAND, supporting DEBUG mode. It supports all mechanisms that I want as an evolved programmer (mixins, inheritance etc). It’s event mechanism is THE ONLY ONE for me.

In my opinion YUI is somewhere in the middle of hardcore JS coders and JS newbies trying to hack something fast. I think they’re appeasing to ppl who like swing and such, doing things the programmatic way. Dojo provides for extendible markup, so it becomes the CONFIGURATION for your application. Simply have your html/css experts hack together a demo for your customers and add behaviour/ajax afterwards. Time to market improves drastically.

Just take what you want from it, when you want it, without the overhead :)

Alright, some critique I have too:
– I must say that I prefer Dean Edward’s Base class over Dojo’s inheritance scheme, but only because it’s too defferent from the way programmers are used to do inheritance.
– I also prefer Dean’s css-query, for it abides to standards and supports css2 and css2.

Comment by morriz — July 10, 2007

as a dojo example , please checkout one of the nicest sites on the net imho, http://www.imeem.com

also, not an advice for everyone, but if you checkout the dojo core, or some tiny widgets, you ll appreciate how cross-browser written it is. i ve touched some points, re-written some widgets for my app. it s even better for me.

again, imho , jquery is fine, prototype is cool i love all of em. they may be faster also.

but dojo is a package. it s solid, runs in opera even in safari(well i know the editor2 ), you can re-compress the source online , after using the mighty shrinksafe(it rules). i m using many widgets on my app, so does imeem.com if you checkout. but, finally i agree that dojo is not for all. not for the moment at least.

Comment by exoska — July 12, 2007

As for the argument that Dojo has too many components: nonsense! A problem with, for example jQuery or the CPAN load of user-contributed files for perl, is that there is a lot of junk and untested code mixed in with the few good pieces; figuring out what is useful can waste a lot of time. Far better to have more (tested) functionality, especially since a lot of it is optional in Dojo.
The argument of old dojo (

Comment by RH — July 12, 2007

(cont.)… (

Comment by RH — July 12, 2007

(1 more try) … (0.4.x) being bloated is correct, though, and the argument of it having bad documentation is, if anything, understated! The lack of documentation, especially in light of the size of the code, was killer and the main reason people ‘avoided it like the plague’.
Dojo 1.0 will correct all of this –IF– it works out as planned. It is undergoing a major/complete rewrite, and has to be completely documented (which, going by the mailing list, was fiercely resisted by the contributors before). So, we can’t really evaluate Dojo yet…we’ll have to wait for 1.0. Hopefully it will be as great as the design specifies!

Comment by RH — July 12, 2007

Some thoughts on what would help the marketing of Dojo… I hope the Dojo devs seriously consider publishing “sneak preview apps/samples” of Dojo 0.9 live on their site (ideally, under the “Demos” link). I had to dig into the 0.9 beta release’s code to find some test pages which illustrated some but not all of the new stuff (which does look very nice to me, I might note). If you want to convince people of how good your candy is, you should really show them the goods and give ’em a taste, even if it is still a bit limited at this point.

They should also seriously consider creating a page (easily found from the top-level page) of “here’s where it’s used” links and screenshots, to really get people thinking not just about “well, what can you do”, but “who’s using it?”

Comment by DT — July 13, 2007

I’ve only tried the examples on the Dojo homepage now and then, and they take forever to load and start (first one, then the other). If the developers themselves can’t make responsive example applications, chances are noone else can, either.

Comment by Stoffe — August 19, 2007

Why does dojo insist on the type of loading that completely seizes up firefox for a few seconds? I hate sites using it for that reason alone.

Comment by ziggy — September 10, 2007

As a web-designer (and not web-developer) I’m just trying to find me the perfect solution for some basic AJAX functionality and I’m very, very puzzled whether I should choose Mootools, Prototype, JQuery, YUI…I used Mootols for its SlimBox image popup, but what I’m really seeking is a framework which has more , erm, features, add-ons – call it whatever you want. And one other thing – why noone mentions Spry from Adobe – because there is no official release yet or you guys just didn’t had the time to test it? I would love to hear some comments on Spry, as it is integrated into DW CS3 – something that makes us, poor web-designers relatively happy :)

Comment by Ivan Philipov — October 3, 2007

Leave a comment

You must be logged in to post a comment.