[JavaScript & JAVA] Closure tools (1)

Source: Internet
Author: User

Preface

Web application is no longer a simple HTML page, it has become very rich (that is, rich clients), with powerful interactive applications can bring a better user experience. Today's web application brings great opportunities for our developers. However, how can you create javascript code that is faster to download from the server and can be used across browsers and efficiently?

Closure tools helps developers use web development tools to create powerful and efficient rich client web applications. Closure tools include:

Javascript optimizer (a javascript Optimizer)
Javascript enhanced library (a comprehensive JavaScript Library)
Java & JavaScript template system (an easy templating system for both Java & JavaScript)
Javascript style checking tool (a javascript style checker and style fixer)
Enhanced style sheet language (an enhanced Stylesheet Language)

 

Java & JavaScript template System First, I will focus on the Java & JavaScript template system-closure templates.

Closure templates simplifies the workload of dynamically generating HTML, and its syntax is simple and easy to understand. Compared with the traditional template system, closure templates does not use one (large) Page Template, but uses (small) templates for one small component, which can be reused. You can also use the build-in information to support simple internationalization. Closure templates is implemented by Java and JavaScript, so you can use the same template on the client or server. On the client side, closure templates is pre-compiled into efficient JavaScript code.

The usage of closure templates is as follows:

1. Convenience: Closure templates provides a simple way to Create HTML for your application's user interface (UI), which helps you separate your application logic from display.

2. reusability. Closure templates supports JavaScript and Java, so you can use the same template in the client and service short code.

3. Improve client running speed. Closure templates is compiled into an efficient JavaScript method to maximize client performance.

4. Readability: You can clearly view the output HTML structure based on the template code. The embedded translation information is also quite readable.

5. Tools, rather than frameworks, can work well in any web application environment (libraries, frameworks, or other tools.

6. Security to reduce XSS risks

7 ....

Reference

 

Https://developers.google.com/closure? Hl = ZH-TW

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.