The Artima Developer Community
Sponsored Link

Artima Developer Spotlight Forum
Google Introduces Closure Tools

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Google Introduces Closure Tools Posted: Nov 5, 2009 10:36 PM
Reply to this message Reply
Advertisement

Many of Google's own applications rely heavily on JavaScript. To make working with JavaScript easier, the company uses many internally developed libraries and tools. Some of those tools, such as the Google Web Toolkit, Google has already released under open-source licenses. Closure Tools is a more client-centric library that Google open-sourced today. Closure Tools includes a JavaScript optimizing compiler, a client-side template engine, and set of miscellaneous APIs.

One problem with writing extensive client-side JavaScript code is that different browsers optimize JavaScript execution in different ways. Google's GWT includes a compiler that consumes Java code and outputs JavaScript heavily optimized for various types of browsers. Closure Tools' compiler requires JavaScript as input and produces similarly optimized JavaScript output:

[It] compiles web apps down into compact, high-performance JavaScript code. The compiler removes dead code, then rewrites and minimizes what's left so that it will run fast on browsers' JavaScript engines. The compiler also checks syntax, variable references, and types, and warns about other common JavaScript pitfalls. These checks and optimizations help you write apps that are less buggy and easier to maintain...

Closure Tools also includes a set of general-purpose utility libraries that make life with JavaScript easier:

Broad, well-tested, modular, and cross-browser JavaScript library. Web developers can pull just what they need from a wide set of reusable UI widgets and controls, as well as lower-level utilities for the DOM, server communication, animation, data structures, unit testing, rich-text editing, and much, much more.

Finally, the newly open-sourced tools include a client-side template engine:

Closure Templates have a simple syntax that is natural for programmers. Unlike traditional templating systems, you can think of Closure Templates as small components that you compose to form your user interface, instead of having to create one big template per page.

What do you think of Closure Tools in the context of other client-side JavaScript libraries?

Topic: Language-Integrated Querying for Scala Previous Topic   Next Topic Topic: The Biggest Code Stinkers

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use