Monday , 24 April 2017
Home » Technology » Development » Closure Tools for Javascripters

Closure Tools for Javascripters

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 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.

About Justin Lee

Check Also

Apple WWDC 2014 Videos Podcast RSS Feed Generator using XSLT

I realised there isn’t any podcast subscription link for the Apple WWDC 2014 videos at …

Leave a Reply