Thursday, November 19, 2009

Google's Closure!

In the past few months, Google has open sourced a lot of tools / libraries to the web developer community. Complete list here.The latest one in the series is Google Closure. It is a set of tools targeted on Javascript-intensive web application. Closure tools include: 1. Closure Compiler 2. Closure Inspector 3. Closure Library 4. Closure Templates.


Closure Compiler
Closure Compiler is a Javascript optimizer tool which compiles / minifies Javascript into compact, high-performance code. It does code analysis also apart from minifying and obfuscating the code. The compiler can be used in three modes: 1. Stand-alone Java application 2. Web application 3. REST API. But, Google is losing to Microsoft here. Closure compiler minifies jQuery library from 125 KB to 54 KB where  as the hypercrunch mode of MS Ajax Minifier reduces it to 53KB. Refer to this for the comparison with other similar tools. Check out the compiler here.

Closure Inspector
Closure Inspector is not exactly a separate tool but its an extension to the compiler. It can be installed as a Firebug add-on which helps debugging the obfuscated code for the script owners. It provides a cool option to map the obfuscated code to the original source file which helps in debugging. Check it out here.

Closure Library
Clousre Library is a Javascript library with a large set of UI widgets and controls. It provides functionalities starting from lower level DOM manipulations to server side communications, animations and much more.Check it out here.

Closure Templates
Closure Template  is a template engine which can be accessed from both server side and client side. To me, it looks like an extension of Django template engine.Check it out here.

-- Varun

No comments:

Post a Comment