September 2nd, 2011 Comments Off
Category: News, Vetted Links

Dojo: TDG — now free for everyone!

Great news — the full-text of Dojo: TDG is finally available online for free through the publisher’s Open Feedback Publishing System! Unfortunately, the text is getting to be a bit dated, but the book is now imported into a content management system that makes the text a little easier to maintain and push out updates.

Now that things are settling down from my Mining the Social Web hiatus, I’m hoping to find some folks from the Dojo community who would be interested in helping me to take an editing pass through the book, clean up outstanding errata, and get the book a little more up to date as part of an effort to transition maintenance of the book to the community through the Dojo Foundation. In other words, I’m trying to work out some arrangements that would provide a free online version of Dojo: TDG that’s continually updated and expanded as Dojo itself evolves. If you’re interested in helping, please get in touch!

July 1st, 2010 Comments Off

Category: News

Let’s Get a 2nd Edition

I’ve received a lot of unofficial feedback lately about why there isn’t a 2nd edition of the book on its way yet given that Dojo 1.5 is just around the corner and the code is fairly out of date. The short answer is that we need to motivate my publisher to believe that there’s enough value in publishing a second edition that it’s worth the trouble. Please retweet this status message or send them a message ( to let them know you’d be interested in updating your copy if you’d like to see this happen.

May 19th, 2010 Comments Off
Tags: ,

Category: News

World Development Indicators Data Visualized With Dojo + Google Chart Tools

You may have heard about the World Bank’s fairly recent release of the World Development Indicators data and the work they’re doing around open data in general. The WDI data is amazingly overwhelming because there’s simply so much of it, but it’s also extremely interesting and bound to be really useful if you have something specific you’re looking for. Checkout this simple charting visualization of the data that uses Dojo to trivially create nice auto-complete-enabled combo boxes and Google Chart Tools for the charting.

An example of one of the zillions of charts you can generate

This implementation is part of a more involved magazine article on hacking open data that will be republished here once it’s been run its course in print.

March 11th, 2010 Comments Off
Category: Uncategorized

Rare Dojo Security Advisory Affecting Versions 0.4 – 1.4

Please review this (very rare) Dojo security advisory and take action immediately to protect yourself and your clients if you have Dojo 0.4 through Dojo 1.4 installed on your site.

From the advisory:

If you have Dojo 0.4 through Dojo 1.4 installed on your site, you are strongly encouraged to read all of this message and take immediate action.

We recently had a security review done on the Dojo codebase, and some issues were discovered. Most of the issues were in test files or related PHP files, but there were some issues discovered with a few files used by modules. You are strongly encouraged to remove some files immediately to give yourself the best protection. While we are not aware of any specific exploits, we take security issues very seriously and we encourage you to take quick preventative action.

March 9th, 2010 Comments Off
Tags: , , ,

Category: Articles

USAID Data Charted with Dojo

Dojo’s charting infrastructure has come quite a long way since I’ve looked at it several months ago, and since the first edition of Dojo: TDG didn’t include coverage of charting, I thought it might be fun to pick up an interesting data set from and wire together a modest demo. (And yes, the next edition of the book will definitely include coverage of charting and many other subprojects in DojoX.)

Click to view the demo

Click to view the demo

The data set I settled on is what appears to be a simple csv file of all USAID distributions. Since the spreadsheet was quite large, I coded up a small Python program to slice and dice the numbers in order to get familiar with the data. One of the first things I noticed is that the dollar figures all appear to be in “raw” form — meaning, that if there was a distribution in 1946 for $1,000 that figure is obviously not adjusted for inflation; it’s in “1946 dollars.” So, I harvested some CPI data from the Bureau of Labor Statistics and attempted to create a minimal inflation calculator so that I could get a better sense of the overall trends.

You can download my PyDev project if you are interesting in hacking on the data a little bit yourself. The one thing I’ll warn you about if you use the PyDev project in Eclipse is that you’ll probably need to change the project properties to point to your own modules, which may be installed into different locations. If you’re not familiar with PyDev, you may be better off just using easy_install to pick up any missing modules and run from the command line.

After I was satisfied that I understood the data reasonably well, I added a couple of functions to emit the CPI and USAID data as JSON for easy consumption by the ComboBox widgets that drive the chart.

It turns out that most of the demo is related to getting the proper data structures hacked out and managing the events that reload the chart. The code snippet to actually build the chart is pretty self-explanatory:

// create and configure the chart
chart = new dojox.charting.Chart2D("chart");
chart.addAxis("x", {
    natural: true,
    includeZero: true,
    fixUpper: "minor",
    labelFunc : function(o) {
        return parseInt(o) + usaid.getMinYear()-1;
chart.addAxis("y", {
    vertical: true,
    natural: true,
    includeZero: true,
    fixUpper: "minor",
    labelFunc : function(o) {
        return dojo.currency.format(o, {currency : "USD", places : 0});
chart.addPlot("default", {type: "Columns", gap: 2});
//chart.addPlot("grid", {type: "Grid", hMinorLines: true, vMinorLines: true});
legend = new dojox.charting.widget.Legend({chart: chart}, "legend");

// add some nice action for the chart when you hover over columns
new dojox.charting.action2d.Highlight(chart, "default", {
    highlight: "green"
new dojox.charting.action2d.Tooltip(chart, "default", {
    text : function(o) {
        return ("FY" + (parseInt(o.x)+usaid.getMinYear()) + " : " +
               dojo.currency.format(o.y, {currency : "USD", places : 0}));

The event-driven logic demo simply uses a couple of additional functions to remove and load a series into the chart though the Chart2D’s addSeries and removeSeries functions like so:

/* Add a series to the chart */
chart.addSeries("Afghanistan/Title II" 10000, {stroke: {color: "black", width: 1}});

/* Remove a series from the chart */
chart.removeSeries("Afghanistan/Title II");

The rest is of the work in putting this together really is just non-charting-related-book-keeping-cruft.

On a data related note, the one thing that kept coming to mind as I hacked this out is that it would be nice if there were a way to annotate the catalog with links to projects that slice and dice the data, transform the data into more useful forms, provide visualization tools for the data, etc. After all, the next logical step once you have the data is actually building stuff with the data. For example, if you wanted to hack on the USAID data too, you would probably benefit from the work I’ve already done in converting it to a useful JSON format, coding up an inflation calculator (that is driven by the CPI data I had to go find), and you might even want to improve upon the interactive chart that plots it all out.

If there is interest, I’m considering a series of follow-on posts where I’ll add some improvements to the chart like plotting multiple series, viewing normalized dollar totals by country, etc.

July 21st, 2009 Comments Off
Tags: , ,

Category: Articles, News, Tips

OSCON 2009 Materials Now Available

As promised this morning, I’ve made all of my materials for the 3 hour tutorial available under liberal licensing. All ~160 slides of them and accompanying code samples.

Also as promised, I removed the PHP dependencies for some of the server stuff and replaced it with a simple python server that uses cherrypy. You should hopefully have no problems getting the sample server to run. You should have no problems finding stuff on the net to help you get that setup if you have problems, but feel free to comment here as well. Additionally be sure to skim the README in there.

You can get the materials here.

Thanks again to everyone who attended. I hope that you were exposed to some of the great tools that Dojo can bring to the user experiences you are creating and that these slides are sufficiently succinct that they are a help to you. While they don’t cover everything in my book, they really do cover a lot of it…more than enough to get you pretty darn proficient.

Finally, remember that we’re having the tomorrow here in San Jose at 7pm. Please don’t miss it.

July 20th, 2009 Comments Off
Tags: ,

Category: Articles, Vetted Links

Dojo’s Industrial-Strength Grid Widget (Linux Journal Reprint)

As I was finishing up my slides for the 3 hour Dojo tutorial at OSCON tomorrow, I remembered that I hadn’t posted the source for the Linux Journal article on Dojo’s fab DataGrid that ran in the June 2009 issue. Fortunately for me, Linux Journal posted the source online for this one, so I’ll just go ahead and point you there instead of reproducing that work. It’s laid out nicely, so I hope you enjoy.

If you’re at OSCON, please come out to the on Wednesday at 7pm and hang out with some of us. I’m here all week, so feel free to look me up if you want to chat about anything.

July 14th, 2009 5 Comments »
Tags: , ,

Category: News

Interest count for event at OSCON next week

Update: We have some interest, and I’ll advertise this event at my Dojo tutorial on Tuesday, so anyone who is interested should pencil in Wednesday, 22 July @ 7pm. Venue: O’Flaherty’s. From the map, it looks to be easily accessible from the conference.

Anyone want to get together for a event at OSCON next week? Basically, a event is just a little get together to talk some shop about what’s happening with Dojo, Ajax, the open web, etc. whilst refreshing oneself with dinner and a few beers in good company.

Any preferences for Wednesday, July 22 versus Thursday, July 23?

Recommendations for venue in the San Jose area?

Please, chime in below or throw out a holla to @dojotdg and/or @dojobeer.

July 11th, 2009 1 Comment »

Category: News

Dojo: TDG – Now In Russian

I’m sure you can image my reaction when I checked the mail yesterday and discovered my book…only in a Russian translation…all ~500 pages of it. Wow! It’s too bad I don’t speak a lick of Russian or even know anything about the language. Maybe now is the time to start learning a few things…
I’ve always curious about how good translations of technical books turn out and would love to hear about the quality of the translation from anyone who end up picking up a copy. I would provide a link to where you can buy the translated version, but I’m not having any luck finding one just yet.
If anyone who speaks Russian will be at OSCON week after next, look me up!
June 19th, 2009 Comments Off
Tags: , ,

Category: Articles, News, Tips, Vetted Links

Dojo Tips and Tricks

Many months ago, I wrote an article for InsideRIA that provided a topical look at some of the more useful things that Dojo provides you entitled Dojo Tips and Tricks. I’d actually forgotten that I even wrote the article so it was a surprise when a colleague wrote me earlier this morning and mentioned it.

It’s a bit more diverse than some drive-by-tutorials in that it digs into DojoX just a little bit and mentions the build system, so even if you’ve been using some of the core tools for a while now, you may still learn a few things from a quick read.

In between the time when the article was finished and now, Dojo has since updated to version 1.3 so you’ll unfortunately see a few CDN URLs that point to version 1.2; however, upgrading the URLs shouldn’t break anything. The latest and greatest is usually a great place to start, so I always encourage folks to stay up to date.

If you’re coming to OSCON this summer, be sure to drop by my 3 hour tutorial for a closer look at many of the great tools that Dojo provides.