Dojo Cookies

From the site:

“Dojo cookies are regular short gems about the use of dojo.

They cover all areas of Dojo and should give you a little more insight in the small, but important things.”

Little tricks about JavaScript, particularly as it relates to Dojo. Some great writing (including some by me!).

Dojo Key Links

“We’re working on assembling a great collection of Dojo demos and tutorials. While we get that work completed, here is an initial collection of current and useful Dojo demos and tutorials to help you get started with Dojo.”

One of the ways that we fall short in Dojo is actually showing people how it can be used in real life. Toward that end, we’ve started to put a little list together.

(Via Dylan Schiemann)

Practical Fisheye

I’m at the Dojo Developer Day today and just saw Peter Higgins demo some of the widgets he’s been working on in DojoX. I really love seeing what’s usually a gratuitous UI effect done in a way that makes it actually useful. The way the animation works, and its use as a method of highlighting is great.

Have Fun with Functions

Eugene Lazutkin:

“FP fundamentals gave us a lot of powerful idioms: iterative functions, which can replace loops, list processing in general, function manipulations, and many other things, which helps us to keep our code small yet concise, more powerful, and more fun. Let’s take a look at how Dojo helps to leverage the functional paradigm in the Core, and in the extended DojoX package (dojox.lang.functional).”

I like everything that Eugene writes, and this is a long post containing a broad API and a ton of profiling.

Trying to fix one of the biggest problems in JavaScript

John Resig:

“Secondly, if a Class-style function is meant to be instantiated, and isn’t, it can in turn end up polluting the current scope (frequently the global namespace), causing even more unexpected results.”

John makes a great observation, but draws what (in my opinion) is the wrong conclusion. I think all that we should be doing is some simple error checking, like: assertInitialized(this, arguments) that would make sure things are the way they should be.

My philosophy is basically this: We shouldn’t be babying developers. They should be allowed to do something wrong, and it should be fairly obvious that they’re doing something wrong. Unfortunately, JavaScript doesn’t catch this error, and if we’re assuming that the language should throw an error if used incorrectly, then why don’t we do it for them?

Sweet JSON encoding for Django

Wolfram Kriesing:

“Just in case someone is using json_encode() I wrote a while ago, I have updated the function due to updates in the latest Django dev version.”

The one other thing I’d added to this in some of my projects is to check to see if an object has a “__json__” attribute and call that if it does.

Using the evil $ with Dojo

James Burke:

“So, how can we define a function named $ that works with the base Dojo functionality (the stuff you get in dojo.js: DOM querying, event handling, XHR, style, basic effects, JSON, array, language and object hierarchy helpers). Ideally, $ would be mapped to dojo.query, to allow easy node selection, but then any other dojo method, like dojo.connect() would be available via $.connect().”

A fun question from James (that I answered, WOOHOO!) about how to use Dojo in the same way that many people use jQuery. Since I rarely, if ever, use the selector syntax, I don’t care much about this. But I think it’s important to note that one of the overwhelming reasons people love jQuery is because of this syntax, and it’s awesome to be able to say “Guys, it’s not that special. It can be recreated in really any of the toolkits with a single line of code.”

Nice overview of using CouchDB with JavaScript

Jan Lehnardt:

“A document is the central data structure in CouchDB. It is a lose collection of keys and values, just like our todo object.”

A little too focused on the DOM manipulation, but it would be extremely interesting to build an application around this.

The updates for ECMA 4

John Resig:

“Although, the theme of ‘being concerned’ was a large one throughout the conference (this was right about the time of the white paper release and ensuing blog kerfuffle).”

This seems to be a really good overview of the language. I’m totally going to try to talk to Alex next week about this stuff, because a lot of it is pretty ridiculous.

Dojo 1.0: What do we really need from our toolkits?

Chris Keene:

“Many Ajax toolkits seem more focused on posting esoteric animated graphics widgets to the Ajaxian web site than they are on meeting mundane but critical enterprise needs.”