Presentation is loading. Please wait.

Presentation is loading. Please wait.

Michael Robertson Yuta Takayama Google Closure Tools.

Similar presentations


Presentation on theme: "Michael Robertson Yuta Takayama Google Closure Tools."— Presentation transcript:

1 Michael Robertson Yuta Takayama Google Closure Tools

2 * Google Closure Tools are open source versions of tools used in many of Google's sites and web applications. * These tools include: * JavaScript optimizer (Closure Compiler) * Comprehensive JavaScript library (Closure Library) * Templating system for Java and JavaScript (Closure Templates) * JavaScript style checker/fixer (Closure Linter) * Enhanced stylesheet language (Closure Stylesheets) * Can each be used individually or altogether

3 Closure Compiler * Compiles JavaScript into compact and high-performance code * Checks syntax, variable references, and types plus warns against common problems * Removes dead code and rewrites and minimizes the rest * Reduces the size of the JavaScript files by making them more efficient leading to faster loads and less bandwidth needs

4 Closure Compiler * Works only on files that contain only JavaScript (not embedded in HTML) * Can use closure compiler with other JavaScript minifiers * Available for all platforms that run Java (compiler is written in Java)

5 Closure Library * Cross-browser and server-agnostic JavaScript library
* Large number of reusable UI widgets and controls * Base JavaScript library for many Google products such as: * Gmail * Maps * Docs * Google+ * and more...

6 Closure Templates * Client- and server-side templating system to build reusable HTML and UI elements * Simple syntax and customizable * Small components that can be composed to form the UI * Implemented for both Java and JavaScript * Works well in any web application environment to be used with any other libraries, frameworks, or other tools * Used in Gmail and Google Docs

7 Closure Templates * Secure - Closure Templates are contextually auto-escaped to reduce the risk of XSS * XSS - “Cross-site scripting” * Type of insecurity vulnerability that enables attackers to inject client-side script into Web pages viewed by other users

8 Closure Linter * Utility that checks JavaScript files for style issues such as operator placement, missing semicolons, spacing, the presence of JsDoc annotations, and more * Used on Gmail, Google Docs, and other Google products * Enforces the guidelines set in the Google JavaScript Style Guide * Can automatically fix common errors

9 Closure Linter

10 Closure Stylesheets * Supports a number Google extensions to the standard CSS language → Can define and use variables, functions, conditionals, and mixins in your stylesheet * Stylesheets are more readable and maintainable * An included tool can compile the stylesheet down into standard CSS and supports minification, linting, directionality (right-to-left flipping), and class renaming

11 https://developers.google.com/closure/
For More Information


Download ppt "Michael Robertson Yuta Takayama Google Closure Tools."

Similar presentations


Ads by Google