dotCMS and Dojo

$URLMapContent.title

Sep 29, 2009

dotCMS and Dojo

It’s been roughly two months since we  included Dojo as part of the dotCMS core javascript framework.  We chose Dojo after evaluating the most popular frameworks out there including JQuery, mootools, prototype/scriptaculous and YUI.

Each of these frameworks is pretty good but none is perfect. Although none of them met all our requirements, Dojo was clearly the best fit due to its extensive set of rich widgets and form controls.

Now that I have had the chance to work with Dojo, I realize how well thought out and developed this framework is.  Specifically, Dojo is divided  into three layers called base/core, dijit and dojox. Base/core, as you might infer, offers the main functionality in terms of DOM manipulation, CSS interaction and javascript class management, while smoothing out browser incompatibilities. Dijit is the layer that implements Dojo's rich set of widgets where you'll find text fields, text areas, wysiwyg, combo boxes, pickers, and any form control you can imagine. Layout widgets like tabs, accordions and containers are also available in this layer. The Dojox layer is what provides more “cutting edge” functionality.  Sometimes these are widgets, other times they might be js utilities which the Dojo team thinks don’t belong to their main core or widget layers.

However, as I mentioned, no framework is perfect. Unfortunately Dojo’s most lacking feature is its documentation which at present is scarce, sparse and sometimes confusing. Even books written for the framework lack specificity and leave out the most useful options and tricks that you'd expect to find there. For us, most of the time the best documentation has been the source code itself which we have had to read/decipher to figure out how to do what we wanted to do. In this respect we have sometimes struggled with the framework so here I give you some resources that might help you deal with the framework and in some cases, avoid end roads. I hope you find these useful:

  • Book – Dojo the definitive guide – A good book to start however it lacks  specificity and as you keep learning  about the framework you wish the book had mentioned all those “hidden” options and functionalities.
  • Dojo API - http://api.dojotoolkit.org/ - My recommendation just avoid this website, it is the most confusing and unhelpful api documentation I have seen.
  •  Dojo Campus - http://dojocampus.org/ - A good website to test out the widgets and see the basic configuration options, however most of the time it lacks documentation on most of the tools and widget options.
  • Dojo toolkit reference guide - http://docs.dojocampus.org/manual/index - So far the best and more complete site I have found in terms of documenting the different widgets options of the framework.

The source code – Unfortunately, I have to say that sometimes the only way to understand what the framework is doing is by reading the source itself. When doing this, make sure you look for the files named uncompressed which give you the human readable version of the code.

As a side note, we used to include EXT as our main js framework. Personally, I think there is no other framework out there that can beat the EXT widget set and documentation. However, sadly they've decided to change the licensing and make it a closed framework (it used to be GPL). We know they offer dual licensing where open source projects like dotCMS could include EXT under GPL3 license, however this move didn’t give us any confidence about the future of the framework as an open source project, so sadly we just decided to replace it.

Drawbacks aside, we are glad we have embraced the Dojo toolkit . It’s a pretty exciting moment at dotCMS and we are making sure to continually offer you a more streamlined and compelling experience when it comes to managing your website.


Recent Posts

Why The Modern Marketer Needs Less Code, But More Control

With new channels and consumer demands continually emerging, marketers are somewhat forced to become more tech-savvy in order to deliver relevant marketing campaigns and customer experiences at speed.

What Is An API, And How is it Changing Content Delivery?

APIs are changing the way brands deliver content across channels. But what is an API, and why is it so vital to brands in the age of IoT?

iIoT: the Internet of Things is About to Revolutionize Manufacturing

The Internet of Things isn’t just putting screens and voices into our favorite gadgets. It’s revolutionizing the very way those gadgets are made, delivered and monitored.

What is Account-based Marketing?

What is account based marketing, and how can B2B marketers use it to target their most ideal customers and clients?