Infrequently Noted

Alex Russell on browsers, standards, and the process of progress.

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.