[wp-hackers] AJAX / JS libraries

Ryan Scheuermann ryan at concept64.com
Wed Apr 26 13:34:44 GMT 2006


Matt Mullenweg wrote:
> In addition to prototype, I think whoever takes ownership of this 
> should take a strong look at:
>
> http://www.mochikit.com/
> http://dojotoolkit.org/
>
> In addition to the Prototype cousins already mentioned.
>
I've read a few articles comparing Prototype with Dojo.  Based on the 
articles, Dojo seems a bit too new and under-tested.  As of this email, 
I couldn't even get to the Dojo Wiki - which is not a result of the JS 
library of course, but does say something about Dojo in general.  When I 
looked at their Wiki previously (which utilizes Dojo) it seemed to have 
more than a few quirks left to work out.

Word on the street seems to think it is over-designed while Prototype 
was built from the concerns of real-world apps (Basecamp and now 
Fluxiom) and tightly coupled with Ruby on Rails. 

A friend of mine was just at The Java Server Side Symposium in March, 
and although there didn't seem to be any talk about Mochikit, the 
general consensus comparing Dojo and Prototype was that Prototype is 
easier to use, more popular, and more lightweight.  But Dojo seemed to 
be marketing themselves well.  :-)

Dojo's AJAX package is 208KB uncompressed while Prototype weighs in at 
54KB.  But those may not include the same functionality; I had a hard 
time determining which Dojo package matched Prototype exactly.  The Dojo 
AJAX package may be comparable to Prototype w/ the Scriptaculous effects 
libary (which is still over 100KB less than Dojo).  And Prototype w/ 
moo.fx is even less.

Documentation wise, Dojo is probably better (when you can get to the 
Wiki) as Prototype's documentation is the source.  Though when browsing 
the source, it's not hard to feel at home with it once you understand 
the concepts.  And there are more third-party articles everyday on 
"Intro to Prototype" and even more examples.  "Intro to Dojo" articles 
are hard to come by.  Scriptaculous's Wiki also provides a lot of 
documentation on Prototype as well.

I've seen Prototype w/ either Scriptaculous, moo.fx, and/or Behaviour on 
small to medium-size sites and apps repeatedly, and I'm yet to come 
across Dojo being used even once (but I may be hanging out in the wrong 
circles for it).  For huge apps, Dojo may be more robust and modular, 
but for WP and WP-driven sites, I can't imagine it's bulk or modularity 
would be necessary.

So, as my preliminary opinion (I'm open to persuasion), I'd say 
Prototype over Dojo, and I haven't investigated Mochikit (just heard of 
it now myself).  Not what Matt calls a strong look, just my two cents 
thus far.  I'm willing to contribute to this endeavor when a solid plan 
is formulated.

Ryan Scheuermann


More information about the wp-hackers mailing list