"Client Side stencil Trend"

Source: Internet
Author: User

English original : client-side Templating

Using templates in a browser is an increasingly popular trend. By applying the logic of the server to the client, there is an increasing use of the class MVC pattern (Model-View-controller: Model-view-controller) to make the role of "template" in the browser more and more important. In the past, "template" has always been a service-side thing, but in fact in client development, the role of templates is very powerful and expressive.

Why use a template?

In general, the use of templates is a good way to separate the markup and logic in views, and to maximize the reusability and maintainability of code. If you are using a language (such as HTML) that is similar in syntax to the resulting results, you will be able to complete the task quickly and well. Although the template can be used to output any form of text, but because we want to discuss the client development is about the HTML, so in this article, we still use HTML as an example.

In today's dynamic applications, clients often need to refresh the interface frequently. This effect inserts an HTML fragment into the client's document via the server. In doing so, the server will be able to support the fragment that transmits the HTML (relative to it: The full page is transferred). Also, as a developer of a client who wants to process these markup fragments, you should be able to take full control of your template. and the template engine (Smarty), Traffic (Velocity) and ASP these server-side content you do not need to know, do not care about those "noodle Code" (spaghetti): For example, in the HTML document is not the appearance of the infamous <? or <%.

So now let's look at the client template. Read the full text

"Client Side stencil Trend"

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.