World Library  
Flag as Inappropriate
Email this Article

Google Closure Tools

Article Id: WHEBN0025087497
Reproduction Date:

Title: Google Closure Tools  
Author: World Heritage Encyclopedia
Language: English
Subject: Gmail, MooTools, Ext JS, Pyjamas (software), Dojo Toolkit
Publisher: World Heritage Encyclopedia

Google Closure Tools

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

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. It optimizes JavaScript. It does not compile from JavaScript to machine code, but rather compiles from JavaScript to better JavaScript (for machine, not human). 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.) The compiler is provided in three ways:

  • Command-line:
    • This Java application can be invoked from the command line, and passed the list of JS files to be compiled.
  • Interactive-way:
    • Closure Compiler service website provides a form for user to input a URL pointing a JavaScript source or input a JavaScript source in a textbox and the website will response with the optimized JavaScript on right side for user to copy.
    • Closure Compiler server website is waiting HTTP POST with severals HTTP POST parameters, see complete list. One is js_code or code_url which contains the string of JavaScript to be optimized. In return to the HTTP POST, the optimized JavaScript code will be the response content of application/x-www-form-urlencoded.

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

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[5] and JavaScript.[6]

Because the language was apparently referred to as "Soy" internal to Google, and "Soy" remains in some of the documentation and classes,[7] 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


  1. ^
  2. ^ Bolin, Michael, "Closure: The Definitive Guide", O'Reilly Media Inc., Sebastopol, CA, 2010
  3. ^
  4. ^
  5. ^
  6. ^ JavaScript
  7. ^

External links

  • Official website
  • Package for TYPO3 Flow
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.