Google Closure Tools

Not to be confused with Clojure.
Google Closure Tools
Original author(s) Google
Initial release November 5, 2009[1]
Available in JavaScript
Type Ajax framework
License Apache License 2.0
Website developers.google.com/closure/

Google Closure Tools[2] is a set of tools to help developers build rich web applications with JavaScript. It was developed by Google for use in their web applications such as Gmail, Google Docs and Google Maps.[3]

Closure Compiler

The Closure Compiler is a tool for making JavaScript download and run faster, at the expense of human readability. It does not compile from JavaScript to machine code, but rather compiles from JavaScript to more efficient JavaScript. It parses JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls. It supports transpiling some ECMAScript 6 code to ECMAScript 3, so that programmers can write JavaScript that uses those features, and run it in browsers or other environments that don't yet support them. (The Traceur Compiler is another Google project that supports transpiling ES6 to ES3.) Closure source code can be compiled in three ways:

The Closure compiler also supports type checking via type annotations that must be written in JSDoc comments.[4]

Ecosystem

Programming languages that transpile to JavaScript benefit from Closure Tools. For example, Closure Compiler helps to make ClojureScript practical by making the compiled JavaScript code more efficient.[5]

Closure Library

The Closure Library is a JavaScript library, written specifically to take advantage of the Closure Compiler, based on a modular architecture. It provides cross-browser functions for DOM manipulations and events, Ajax and JSON, as well as more high-level objects such as User Interface widgets and Controls.

Closure Templates

Closure Templates are a templating system for dynamically generating HTML in both Java[6] and JavaScript.[7]

Because the language was apparently referred to as "Soy" internal to Google, and "Soy" remains in some of the documentation and classes,[8] sometimes Closure Templates are referred to as "Soy Templates".

Closure Stylesheets

This is a compiler which provides an extended version of CSS, which is compiled down to ordinary CSS. Internally in Google, this extended version of CSS is referred to as GSS.

See also

References

External links

This article is issued from Wikipedia - version of the Wednesday, February 03, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.