Visits to this blog

A new Demo engine for Dojo

A couple of weeks ago I saw a cool demo framework for an Ajax toolkit just released as open source. It’s a very slick implementation, with a tree listing all the various demos, and a tabbed area showing the implementation, and the widget in practice.

Tree navigation for the demos. Demos can be nested as deep as required.

View tab. This shows the widgets in action.

HTML tab. This shows how to instantiate the widget using HTML markup.

JS tab. This shows how to instantiate the widget using JavaScript code.

Links tab. This shows various hyperlinks to alternate content for that demo, e.g. the Dojo Book.

Demo description. Gives a text description of the demo.

Theme selector. This allows you to change from one CSS theme to another

Ability to link to standalone demos that open in a new page. This is useful for large demos that show the integration of many widgets together, and may not fit well within the demo framework itself. See the Dijit/Mail demo for an example of this.

A build system that takes a very simple naming scheme for the demos, and creates a JSON data store that the framework runs off of. So, whenever a user adds a new demo, they simply have to re-run the build step, and that’s it! No need for a server side script, so you can run this right off your hard drive.

This is still very much beta code, and there are a couple of errors floating around, but those will of course be hunted down. There are also some Internet Explorer issues that I’ll get to soon, so try this in Firefox for now (update Dec 05 2007 – most of these have been solved, with one or two small bugs remaining). I’m in discussions to get this into the Dojo toolkit, so that the community at large can start adding in demos. I’ve put in quite a few already, but it’s so easy to do that this could become a huge resource for the Dojo community.

Jeffsaid

Very nice.
Got a question on the dojox.layout.ScrollPane. I applied it in my dijit.layout.SplitContainer. The tree is being scrolled as I move the mouse but it won’t scroll to the bottom of the tree. In another word some of the bottom tree nodes are not scrolling into view. Any idea why that is?

This is probably something to do with the height of the tree’s container not being set correctly. You should send a message to the dojo-interest mail list about this, and mention Peter Higgins in it, he’s the author of the widget