Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dojo vs YUI javascript framework

I want to know what you guys think of these 2 frameworks, in terms of:

  • robustness,
  • code quality,
  • core developers moving forward with new features,
  • cross browser problems,
  • module components,
  • easiest to learn and integrate

I already know and use jQuery, I recently found it lacking in terms of 'enterprise ready' components for large web app.

Now I don't want to start a debate on jquery, or why mootools is not in there, I want to know what you guys think of these 2 frameworks specifically.

Thanks!

like image 965
The Orca Avatar asked Jul 09 '10 16:07

The Orca


2 Answers

Disclaimer: I am a Dojo committer.

Somehow nobody presented the Dojo side in this comparison — it is not a comparison without one, is it? Let me go over your points.

Robustness

Dojo is used in many IT projects by major international corporations. I personally participated in projects for VMware, IBM, Cisco, Reuters Thomson to name a few. Instead of forwarding you to the "marketing literature" I can show you the actual list of contributors: http://docs.dojocampus.org/developer/contributors — scroll down to see corporations that contribute (and use) Dojo.

We keep the list of individual and corporate contributors so our users can be sure that the IP lineage of Dojo code is clean — every contributor signs a CLA stating that he/she/it wrote the contributed code and/or has a right to contribute it under dual AFL/BSD license. So far we didn't have any problems with that.

As far as I can tell YUI is mostly developed by one company: Yahoo! YUI started to accept external contributions only two years ago being in development since 2005 and now requires CLA too.

I am not a stock market expert but something is always up with Yahoo!: one day it tries to forge an alliance with Google, next day it kills its search business and goes with Microsoft, even selling the whole company to Microsoft was discussed back in 2008 — who can predict what it will do tomorrow. Now in 2010, the share price went down since 2008 — is it going to be on sale again? OTOH some say that Microsoft would be a better mother for YUI, if it decides to keep it. Then again, Microsoft has its own software properties and not exactly a backer of open source JavaScript projects.

Unlike YUI Dojo is backed by several companies with IBM being the most influential one — several prominent committers were hired by this company. While Dojo has a strong corporate support, it is still a project driven by its community, by individuals. If any company or even several companies will experience market hiccups we will still plow ahead.

Dojo is distributed under dual AFL/BSD license and free for all uses. All officially released versions of Dojo are served by AOL and Google CDNs.

Code quality

I am biased :-) and I consider the code to be of a very good quality. As Dojo is an open source project you can always judge it for yourself, and improve it, if you feel up to it.

The source code is kept in Subversion with official mirrors maintained on Github (git), and Bitbucket (hg). For convenience there is a mirror on Launchpad (bzr).

Core developers moving forward with new features

Dojo has an active vibrant community, which keeps the wheel moving so to speak. Being one of the core developers I assure you personally that we will continue to move forward pushing the proverbial envelop even further.

Dojo has a proven track record of innovations, and we are not going to stop.

Cross browser problems

Currently Dojo 1.4 supports following browsers:

  • Firefox 2 support dropped. Firefox V3 and V3.5 supported.
  • Latest Safari (Safari v4) and latest Chrome (Chrome v3) supported, but not previous versions.
  • IE6, IE7, IE8 all supported.
  • Latest Opera (Opera v10) (Dojo core only).

The upcoming Dojo 1.5 (will be released in a few days) was extensively tested with following browsers:

  • Firefox 3.5/3.6
  • Safari 4/Safari 5 and Chrome 5
  • IE6, IE7, IE8
  • Opera 10.53 and later (Dojo core only)

To highlight the differences with YUI's A-grade browsers:

  • Dojo supports Linux in addition to Windows and Mac.
  • Dojo supports Google Chrome on all supported OSes.
  • Dojo supports Firefox on all supported OSes.
  • Dojo Core supports Opera on all supported OSes.

Personally I can add that I still test dojox.gfx (the cross-platform graphics package) on Firefox 2 — it involves Dojo Core and it works as expected. And I test Dojo Core on several exotic browsers like Midori.

Another difference is that Dojo can be used (and it is used) in desktop and server environments. Obviously browser-specific components are not used by those environments.

Module components

From day one Dojo provided classes, modules, and packages (collections of modules). Dijit provides widgets: packaged HTML + JavaScript with unified interface.

All building blocks are exposed to users, so they can create their own components, which will be 1st class citizens: they can be loaded like any other modules, processed by the builder (dependencies tracked, minified, CSS preprocessed, and so on), even exotic CDN builds can be done by users. Anything you can do with stock Dojo components you can do with your own components.

Dojo itself is split into 3 subprojects, which can be used separately:

  • Dojo (including Dojo Base as a single file)
  • Dijit: a collection of widgets
  • DojoX: even more widgets, and ~50 packages covering everything from cross-platform charting to encryption.

Easiest to learn and integrate

Dojo is just JavaScript and regular HTML/DOM (for widgets). It does not pretend to be something else, it is not a cult with a fuhrer at helm, it is not a "framework", which takes control of your app and forces you to do some bizarre things, Dojo doesn't want to "improve" "imperfect" JavaScript, Dojo doesn't want to masquerade a browser to be something else. Instead Dojo provides practical tools to make a programmer more productive, to facilitate RAD, to solve common problems, and to support useful techniques and methodologies.

Every experienced programmer usually has a mini-library of things that worked well for him/her in previous projects. He or she knows what to avoid and what to use. It "clicked" in my head when I realized that Dojo is this library on steroids — like several experts got together and carefully combined their personal libraries. Sure, it has a lot of different modules, but I can use only what I want for my specific project — I am not forced to use everything, and I don't pay for things I don't use. Not even an abstraction penalty.

If you know JavaScript and familiar with HTML, CSS, and DOM — you'll be right at home.

like image 164
Eugene Lazutkin Avatar answered Sep 20 '22 15:09

Eugene Lazutkin


I think your reason for rejecting jquery sounds suspicious, and recommending a framework as "enterprise ready" is a backhanded compliment in my book.

However, I have a lot of experience with YUI (2 and 3) and I think it might fit your use-case.

  • Robust - YUI is used internally by Yahoo, so that should give some clues as to its robustness.
  • Code Quality - I'm a contributor to the project, and the code quality is very good. As it is open source you can take a look for yourself.
  • Moving Forward - It is backed by Yahoo (but also incorporates community contributions) so moving forward it is pretty safe. Again, you can track development and community involvement yourself.
  • Cross Browser - it supports all the Yahoo A-grade browsers
  • Modules - there are a ton, and (especially in YUI 3) it is easy to incorporate just the pieces you need. If you want mostly GUI modules, you'll still need to mix in some YUI 2 (which is easy to do). Widgets in YUI3 are coming soon, though.
  • Easy to learn and integrate - YUI has probably the best documentation of any JS library I've seen. However, YUI 3 is very opinionated about how you write your javascript. It is opinionated in a good way and gives you a lot of bang for your buck, but to just "drop in" to an existing project YUI 2 may be easier.
like image 24
Gabe Moothart Avatar answered Sep 18 '22 15:09

Gabe Moothart