Google’s Closure Tools contains 3 set of tools for web developers:
Closure Compiler – A Javascript Optimizer
One of the benefits of not working on the web is you actually have a compiler to pre-check your errors, optimize your code, and warns you about common problems with your code. Javascript is a runtime dynamic language which gets interpreted on the fly, and having a compiler was redundant. The Closure Compiler allows you to have all the benefits of a compiler, optimizing and compacting your code while checking for errors. Do note that it does not actually “compile” your code into some bytecode, it just compacts, optimizes and checks for errors. There are 3 parts to the Closure Compiler:
- Closure Compiler Service API
This is a REST service online that you can call to compile your code. - Closure Compiler Service UI
This is a HTML UI version of the service. - Closure Compiler Application
This is a Java Application that you can use to “compile” your Javascript. - Closure Inspector for FireBug
The Closure Inspector XPI Allows you to read the compressed, obfuscated Javascript withinFirebug, giving you the capabilities of source mapping, improved stack trace display, and unit test integration.
Closure Library – A Comprehensive Javascript Library
Another benefit of working outside the web is we have comprehensive libraries like the Standard Template Library (STL) for C++, Java’s Standard API Platform, C#’s .NET Framework, etc. These libraries are well-tested, robust and modular. Closure Library is a cross-browser Javascript library very much like JQuery. It has everything from a large set of reusable UI widgets and controls, to lower-level utilities for DOM manipulation, server communication, animation, data structures, unit testing, rich-text editing, and more.
Closure Templates – An easy templating system for both Java & JavaScript
This, I don’t get. Closure Templates are very much like JSP, ASP.NET, ColdFusion, etc. It sounds pretty much like what you do with ASP.NET’s Custom User Controls, or JSP’s Tag Libraries. Here’s what it’s on their website: “In contrast to traditional templating systems, in which you use one big template per page, you can think of Closure Templates as small components that you compose to form your user interface.” Go figure.
So, ultimately what do I think of Closure Tools? I really like Closure Compiler and this is something that I’ll definitely use. I don’t see the need for Closure Library and Closure Templates when we already have JQuery and server-side templating systems. I don’t know of any client-side templating systems, but I would figure that there’ll already be some out there.
Related posts:




Recent Comments