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"