First look at the Dojo Toolkit

I'm evaluating Dojo Toolkit and thinking about abandoning (or rather blending) JSForms for the Dojo. I'm not sure yet if I'm going to do it. I have created JSForms out of necessity, to help me with other projects, but it's not something I have spare time for.

Before I started with JSForms, I looked at several different projects and documented what I found at similar projects section of JSForms documentation. None of them really satisfied me. I guess I could have tried to join one of the toolkits, but I felt none of them really met my requirements. I found JSOLait and really liked JavaScript OO language extensions it offered, but I don't want to reinvent the wheel. I'd rather use the toolkit that provides all functionality I need than re-write one on my own. I'd like to be able to contribute (or at least extend it for my needs) and there are several things I need from the library (no memory leaks, easy to use generate with XSLT).

I learned about Dojo Toolkit when it was in 0.1 and it wasn't quite what I was looking for. It might be now. I'm still learning about it and not sure if I'll switch, but I want to share what I know about it so far.

Dojo Toolkit is a JavaScript library. Well, kinda, it's more than just a library. It provides environment to develop with JavaScript. It has a lot of features, like language extensions.

What I like

Free and open source

First of all it's free and open source. It can be used in any commercial project and all the source code is available.

Rapidly developed

There are a lot of people working on the toolkit. Most of them are working on the Dojo part time (when they are not busy with their daily jobs). So releases are not very frequent, but each adds a lot of functionality.

Recognized and supported

Dojo Toolkit is slowly gaining recognition. Several big companies (IBM, Sun) extend it. There are tools to work with it (for example Eclipse has a plug-in to help with Dojo development).

There's a mailing list and an IRC support channel. People are very active, especially on the mailing list. If somebody has a question it is usually addressed quickly.

Feature Rich

Dojo Toolkit has a lot of features. It provides classes to work with different data types (arrays, strings, etc), to help with server communication (AJAX, IFrame, etc), and there are a lot of widgets. That's where my main interest lies, widgets. There's a layout manager, WYSIWYG HTML editor, a tree, a menu, a grid, tabs, tooltips and so on. It's very nice.

AOP events programming

Dojo uses an AOP programming style to program events. It lets developer to register a function to run before or after any other function in any object. It's a very powerful concept. I wonder what is the performance price... Probably not very large.

Declarative programming

Dojo supports declarative style of programming to describe widgets (controls) on the page. When the page is loaded Dojo parses it, and creates and initializes widgets from the HTML or custom tags on the page. This is really cool, but unfortunately it's quite slow. It's good to create common controls for the page, such as a menu or a tab, but if there's a tree, each node is a widget. If the tree is big, it takes a while to load the page.

What I dislike

Slow, slow, slow

Widgets are cool, but slow to load. I designed JSForms tree to handle large trees. Dojo dies pretty quickly as the tree size grows large (There's a new tree version in development. It's supposed to really improve the performance and I want to profile it before I compare).

Even the Dojo demo page (which I assume is optimized. I mean, it's their demo after all) takes from a second to several seconds to load and initialize different demonstrations.

Poor documentation

Documentation issues haunt all open source projects. Everybody likes to write code, but not describe it so that other people could use it. It's not always fun, but it's important.

API is often poorly documented (by poorly I mean there's often no documentation at all). There are examples, but most are in the form of tests developers wrote to verify that their code works correctly. The Dojo demo page does provide source for the demos. These examples are good starting points, but not good enough to understand how to do advanced things (tests, while advanced, have practically no documentation. It's hard to learn from them).

I really do hope documentation will improve in time. Until then, I'm glad the project is open source and I can look at the code to figure out how to do something.

Unstable. Frequent API changes.

The project is still young. There are a lot of cool things done by the developers, but developers are still trying to figure out the API. Things still break from time to time (although I'm glad there are a lot of tests to help with that problem).

I don't mind that the project might be unstable or API might change. I bet most of the core is stable and won't change much. In time, more and more parts of the project will mature. Until then I will have to spend more time on the maintenance, if I choose to switch to it.



Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: Slava
Posted on: 6/25/2006 at 4:11 PM
Categories: Web development
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Tuesday, January 06, 2009 6:39 AM