DojoCampus
Dates to remember
Dealing with dates in software can be trickier than it seems. The web and Javascript add to the challenge. Because your code is on the web, users are likely to execute it in a variety of platforms in different locales and time zones, and Javascript isn't always helpful abstracting these issues in development. Javascript has [...]
Categories: Dojo Developers, Web Developement
Making Browser Sense … dojo.isBrowser?
Every now and then, you're going to run into a problem with a particular browser (I'm sure you know what I'm talking about), and so you need your JavaScript to adjust accordingly. Browser detection is the answer and here's a short cookie on how you can do it using Dojo.
There are a few browsers that [...]
Categories: Dojo Developers, Web Developement
Extending dojo.dnd with a creator function
Following the Dojo philosophy of "build with, not on", dojo.dnd provides a terrific API for getting the right behaviour for your app, with plenty of extension points and monkeypatching opportunities. Making a creator function for dojo.dnd.Container is the most obvious way to customize dojo.dnd, because it gets called anytime a container or avatar wants [...]
Categories: Dojo Developers, Web Developement
Separating Content from Presentation the Dojo Way
One of the cool things about Dojo is the dojo.xhrGet() function. It's powerful because it makes transparent the browser dependent transports that make AJAX possible. In this cookie, we're going to explore a simple use case in Dojo to separate content from the presentation of a page. This means that if you want to update [...]
Categories: Dojo Developers, Web Developement
Dojo Build 401: End Results
In this, the shortest build screencast ever, we inspect the overall results of the build project once placed on an properly configured server (mod_deflate). Nothing particularly exciting to be learned here, other than seeing the end result of 250k whittled down to a bite size hunk of (cache-able) JavaScript.
Categories: Dojo Developers, Web Developement
Why doesn’t myTitlePane.title = “work” ?
Newcomers to dijit often instantiate a widget and wonder why "normal" dom getter/setters don't work to adjust the properties. There is a perfectly valid reason for this, so lets inspect.
For example, a Markup declaration of a dijit.TitlePane:
<div dojoType="dijit.TitlePane" title="Title Pane #2" id="myTitlePane" style="width: 300px;">
<form>
Age:
<input><br>
Discount card
<input type=checkbox><br>
<button>Submit</button><br>
</form>
</div>
And then trying to modify the title programatically by [...]
Categories: Dojo Developers, Web Developement
Dojo Build 301: Compacting your build
Moving on from Build:201, we'll investigate how to use the build_mini script (now in Dojo's svn) to make our source tree for deployment. This is just a sample to show how small the deployed code can become. There is also a great blog post from Kevin Dangoor about using paver (python) to optimize this even [...]
Categories: Dojo Developers, Web Developement
dijit.Tree - server fetch on node expansion
Here's an example of a Tree that pulls data from the server on child node expansion (clicking the "+" next to a node that has children) - dojo 1.1 or better requred:
My application for this tree is to list the fields I have in objects I call plugins in my CMS. These fields are [...]
Categories: Dojo Developers, Web Developement
Hacking TabContainer: setTitle extension
A piece of functionality lost in the 0.4 -> 1.x transition of Dojo was the ability to set the Title of a tab pane, based on on a reference to the ContentPane associated with it. It seems a really common an trivial task, but the ambiguity of StackContainer (the foundation of TabContainer) conflicts with what [...]
Categories: Dojo Developers, Web Developement
Refreshing a data store
So you've created a nice ComboBox widget connected to dojo.data.ItemFileReadStore that pulls your company's lengthy list of employees from the HR server via JSON and all is well. Then someone asks you to put a button/link/widget next to the ComboBox that shows the company's departments and wants you to filter the ComboBox list of [...]
Categories: Dojo Developers, Web Developement
Understanding dojo.declare, dojo.require, and dojo.provide
Dojo is a great toolkit, which gives us many helpful utilities. On of the things that I really like about it is how it provides a more understandable layer of organization and packaging above what JavaScript normally provides.
Some of this syntax is very Java-like. Your classes are organized into hierarchies, similar to java [...]
Categories: Dojo Developers, Web Developement
dojo.cast() - the Dojo podcast - episode 4
Many things have happened between episode 3 and 4 and in this episode we're focusing mainly on the big news in the last two weeks including:
News:
Dojocampus, hosting generously provided by Nexcess
Dojocampus svn is up. Details on how to checkout and commit will be published shortly
ZF (Zend Framework) dojo partnership announced
Audio cookie
dijit.destroy(), new features
Dojo internals
Dijit [...]
Categories: Dojo Developers, Web Developement
Dojo Build 201: Layers and CSS Optimizing Builds
In this next video installment, we'll demonstrate how you can create a custom namespace and a build layer, as well as roll your required CSS into a single file automatically using the Dojo Build.
Categories: Dojo Developers, Web Developement
List a widget’s events one can connect on
I saw it coming up a couple of times, now that I also needed it, let me share it.
The problem
You have a widget and want to connect, to some event of it. But you don't know which events are there, what can I connect on and what's the exact name.
Lets take a dijit.Dialog widget. What [...]
Categories: Dojo Developers, Web Developement
dojo.cast() - the Dojo podcast - episode 3
In the third episode of the dojo.cast() we have invited Will Riley, project lead of the Psych desktop which is a new member of the Dojofoundation since recent. Our news block covers the last week of dojo.
Episode 3 - Links
Psychdesktop.net - [GO]
Dojo quickstart - [GO]
Dojo mini, get you dojo downto 1MB - [GO]
[...]
Categories: Dojo Developers, Web Developement
DojoCampus is tweeting - or twittering?
If you don't have enough of your daily dose of DojoCampus cookies, if you need to be kept up to date and get the latest secrets, developments and ideas from the Dojo community come follow the DojoCampus tweet. Please check out the Dojotoolkit tweet - the latest news about Dojo, directly from the source.
DojoCampus at [...]
Categories: Dojo Developers, Web Developement
jsId, dijit.byId() and dojo.byId()
A common question new users of dojo have is what is the difference between jsId, dijit.byId() and dojo.byId().
Consider the following simple ContentPane widget which has an id property (standard html attribute for any tag) and a jsId attribute (dojo specific id attribute explained below):
<div id="myDivId"
dojoType="dijit.layout.ContentPane"
jsId="myJSId">
[...]
Categories: Dojo Developers, Web Developement
dijit’s CSS sniff
If you've done any CSS at all, you've run into the need to selectively target rules at different browsers - usually by employing hacks which take advantage of CSS parser quirks and different levels of CSS spec support. Its getting better - gone are the days of IE4, Mac IE5 (for most of us anyhow), [...]
Categories: Dojo Developers, Web Developement
Dojo Build 101: Basics
I have created, in the past, several screencasts illustrate various Dojo Build options and benefits. Here is the first in a series of Campus Videos explaining the build process. In this session, you will see (and hear) me fumble through creating a profile, inspecting the output, fixing errors, and trying again. Sometimes seeing mistakes happen [...]
Categories: Dojo Developers, Web Developement
dojo.cast() - the Dojo podcast - episode 2
In our second episode of the dojo.cast() podcast we are covering following topics:
Connecting to events using Firebug
Setting and getting values of dijit.form elements
When do I use dojo.forEach(); and when for(x in y) {}
The new dojox.help project
Google Summer of Code
AOP code landing in dojox.lang
Dojoc namespace open for contributions
And even more news items
Episode 2 - Links
Dojo community [...]
Categories: Dojo Developers, Web Developement

