A Bit of Closure

So from time to time I’d wondered what all the brilliant DHTML hackers that Google had hired were up to. Obviously, building products. Sure. But I knew these guys. They do infrastructure, not just kludges and one-off’s. You don’t build a product like Gmail and have no significant UI infrastructure to show for it.

Today they flung the doors open on Closure and it’s supporting compiler. These tools evolved together, and it shows. Closure code eschews many of the space-saving shortcuts that Dojo code employs because the compiler is so sophisticated that it can shorten nearly all variables, eliminate dead code, and even do type inference (based on JSDoc comments and static analysis).

There’s a ton of great code in Closure, so go give the docs a look and, if you’re into that kind of thing, read the official blog post for a sense of what makes Closure so awesome.

It’s interesting to me how much it feels like a more advanced version of Dojo in many ways. There’s a familiar package system, the widgets are significantly more mature, and Julie and Ojan‘s Editor component rocks. The APIs will feel familiar (if verbose) to Dojo users, the class hierarchies seem natural, and Closure even uses Acme, the Dojo CSS selector engine. It’s impressive work and congrats are in order for Arv, Dan, Emil, Attila, Nick, Julie, Ojan, and everyone else who worked so hard to build such an impressive system and fight to get it Open Source’d.


  1. cs44
    Posted November 5, 2009 at 1:53 pm | Permalink

    First thing I noticed was the Dojo-like API. Can’t wait for the Dijit plug-in ;)

  2. Posted November 6, 2009 at 7:51 am | Permalink

    Seeing that Attila, a top notch I worked with at Oracle, contributed to Closure is definitively a good message to me ;)

    Since I left Oracle, I’ve been using Dojo within IBM as an application developer and an internal/anonymous contributor. And it’s my favorite client-side library for Web apps.

    I’m not surprised about the similarities between Closure and Dojo: why would you not choose the best architecture?

    A+, Dom

  3. Posted November 6, 2009 at 5:02 pm | Permalink

    Congrats to everyone involved in the creation and release of Closure!

  4. Posted November 7, 2009 at 4:52 pm | Permalink

    Makes me wonder about when I’d one over the other. i don’t know yet. I think Google’s done a good job, but the design decisions are not too different from that of dojo’s. In practice, I don’t know which one is wordier, but that’s hardly a consideration of picking one over the other.

    I wish Closure luck, and I hope it forms health competition to dojo, but I’m not entirely convinced yet.

    The compiler, though? That I’d give a serious look.

  5. amkris
    Posted November 12, 2009 at 1:27 pm | Permalink

    I am new to javascript and javascript libraries. Reading a review like this, keeps me further away from the language. Do you think the points mentioned are valid?

  6. Posted November 12, 2009 at 4:58 pm | Permalink


    The author and his source are, to be kind, vastly under-informed. See a partial rebuttal here: http://news.ycombinator.com/item?id=937257


  7. Grammar nazi
    Posted November 15, 2009 at 1:51 pm | Permalink

    …”and *its* supporting compiler”…

One Trackback

  1. [...] Alex Russell, founder of Dojo and Chrome Frame [...]