Archive for March, 2008

Read more

Extending a widget to make it data-aware

In the cookie about dojo.data, I extolled the virtues of data-driven widgets, and how much I loved them. However, there are times when the widget you want to use is not data-aware. This tutorial will step you through how to quickly and easily add data capability to a widget.

Read the rest of this entry »

Read more

Cleaning your markup with dojo.behavior

CSS separates our formatting from our content. But we’re still left with onclick="..." attributes sprinkled throughout our otherwise pristine markup - not exactly “unobtrusive Javascript”. Dojo.behavior comes to the rescue, providing a nice separation between our content and the code associated with it.

Read the rest of this entry »

Read more

Demystifying dojo.data

I have a love/hate relationship with dojo.data.

I absolutely love the way that it simplifies my life. While it’s not quite as “magic” as dojo.hitch(), things “just work” when I use it. Many of the dijit widgets support being tied to data stores. The drop-in replaceability of the stores is another great benefit. When working on large projects, it is very helpful to have something to work with on the UI side while the server-side is still being developed. One solution is to do this:

Read the rest of this entry »

Read more

Interning Strings Everywhere in your Dojo Build

Dojo has a build system that does a lot of neat stuff. Let’s investigate.
Read the rest of this entry »

Read more

No end to rounded corners

After the last tutorial on how to make fancy rounded tabs, I thought it might be interesting to take a look on how to make a widget which lets you transform a simple “div” into a nice looking one with rounded corners and flexible width/height, using just one image.
Read the rest of this entry »