HomeBlogGoogle Releases Closure, Tools that Made Gmail, Docs, Maps

Google Releases JavaScript Packages That Made Gmail, Docs, Maps

Published November 5, 2009

Google closureGoogle has just released what appears to be their entire library of JavaScript packages that they've used across all of their web applications (Gmail, Google Maps, Google Docs) to keep a common look and feel and provide a consistant cross-browser experience. They're calling it Closure Tools, and it includes Closure Compiler, Closure Library, and Closure Templates.

Closure Compiler is a javascript compactor to compress and validate your javascript code so it will download and run faster, and possibly catch errors before they happen. This is an evolution of Douglas Crockford's JSMin invention http://javascript.crockford.com/jsmin.html, but also provides obfuscation for security or additional bandwidth performance reasons. You can see this in use on all of Google's apps by viewing the source.

Closure Library is what looks to be the complete JavaScript core, UI and otherwise, to web applications such as GMail, Google Docs, Google Maps, Google Voice, and maybe even Google Wave. I took a quick through the classes and just in the UI category alone there are 138 elements including date pickers, dialog boxes, tooltips, menus, buttons, tabs, toolbars, rich text editor, etc. They've also built in a bunch of graphical, animation, drag-drop, and math functions which could probably help in designing advanced web applications. It's purpose is very similar to that of the Yahoo User Interface, but it looks like the features are much more plentiful.

Closure Templates is a kind of templating system that utilizes both the server and client to render HTML content. Its main benefit is generating smaller page components and re-using them, instead of creating one big template for each page of your site. Also, somehow you can write one template and use it client-side with javascript and server-side with Java. This one probably takes some practice to really experience the benefits, but again, it's what Google uses for Gmail and Docs so it's sure to save you a lot of development time if you take the time to learn it.

I think a lot of these packages are already built in to the GWT (Google Web Toolkit), which is a system that uses the Java programming language to generate cross-browser JavaScript rich web applications and user interfaces. Google Closure is probably the answer to people who prefer not to use Java and Eclipse to make web applications and I applaud them for releasing more of their internally developments.

blog comments powered by Disqus


Michael Butler

Michael Butler

Michael joined the RustyBrick team in 2008 to focus on transitioning existing web sites to new & enhanced platforms. He graduated from Rutgers University in 2005 and holds a B.S. in Computer Science.

This article is under Programming, Java Programming, Web Programming

There is 1 comment for this post

Connect With Us

Send Us a Message

Do you wish to give us feedback on one of our apps, send us a message or explore a proposal? Fill out the form below and we'll get back to you pronto!

Visit Us

250 West Nyack Road, Suite #200 West Nyack, NY 10994
Get Directions

Call Us Toll Free