Millions of users around the world use Google's JavaScript-intensive applications, such as Gmail, Google Docs, and Google Maps. I believe every developer hopes that creating web applications will become easier. Haha, I have some pretty good news for you. Google today opened Closure Tools, a set of tools for internal staff to develop JavaScript! The several Google applications mentioned above were developed using this tool.
There are three sets of tools included in Closure Tools:
1. Closure Compiler
Closure Compiler is a compiler used to compile JavaScript. In addition to the functions provided by the most common JavaScript compressors, it will also analyze the program and remove unnecessary parts, reducing the size of the JavaScript program and improving efficiency. . You can use the compiler with Closure Inspector (an extension for Firebug).
Since the development of JavaScript is diverse, many ways of running it have been established: an open source command line tool is provided; a web application is created that you can compile using a text box or a RESTful API; and a Extension for Firefox that can be used with Page Speed to easily view the performance advantages of web pages.
2. Closure Library
Closure Library is an extensive, well-tested, modular, cross-browser JavaScript library. It is Google's standard JavaScript class library. This set of tools is like many general JavaScript frameworks, providing many simplified DOM operation function libraries, as well as rich user interface components.
3. Closure Templates
This set of tools provides a mechanism and function library for making templates in JavaScript. You can write the HTML layout part as *.soy, and then use the tools provided by the closed template to compile the template file into JavaScript code, so JavaScript developers save a lot of the burden of processing the page.
Closure Templates can be implemented in both JavaScript and Java, so you can use the same templates on the server and client.