Read more

A hidden gem of Dojo.declare - overcoming the limits of multiple inheritance

One of the greatest things of dojo.declare is that it simulates one of the core elements of OO - inheritance. Moreover, it allows having several parents to the same object.

Read the rest of this entry »

Read more

Data-Driven Templating in One Line

A quick snippet for this happy morning. Actually I’m going to format it so its a couple of lines…

var html = "<li><a href='{profileUrl}'><img src='{photoUrl}'/> {name}</a></li>".replace( /\{([^\}]+)\}/g, function(matches, name) {
  return store.getValue(item, name); 
});

Read the rest of this entry »

Read more

Exploring URLs client side

URLs are one of the basic building blocks of the Web, and in this article we’re going to learn some techniques to explore them client-side using Dojo.
Read the rest of this entry »

Read more

dojo.declare secrets

A very short tuesday morning cookie for the ones who have been starving ;)

When using dojo.declare to build your own fancy widget there is one thing (besides others) you should keep in mind:
Arrays and objects as member variables are stored as references and not copies.
Read the rest of this entry »