Template
A template is a Anglicisme used in Informatique to indicate a model of design of software or presentation of the data. One also speaks about “owner” as in Couture, about gauge or graphic kit.
Presentation of the data
A template is a means of separating the bottom (informational contents) from the form (manner of which it is presented).Very much used in the design of Web sites, a template acts as a model in which only certain elements are modifiable (contents). That facilitates the design and the update of the sites, as well on the contents as on the presentation.
- to change the graphic charter of the site amounts changing the template and that updates all the pages of the site;
- to add a page any more but does not consist in writing the contents of it.
Many engines of template intended for the construction of sites are built in. Another means of managing templates on the level of a site consists in using style sheets CS.
To note that Zope, Joomla, Postnuke, KwsPHP and Ixprim uses templates nativement.
Evolution of the use
More and more, the presentation of a Web page is relegated towards the style sheets (CS: Cascading Styles Sheets or style sheets in cascade) external in the page. The templates are not thus supposed any more (if one wants to adhere to the recommendations of the W3C) to allow a separation between the contents and the presentation but rather a separation between the code HTML or XHTML and codes it (or another language of development side waiter). One thus obtains a structure of site having on a side the data processing (calculations, connections to databases, safety) and other the “language” of restitution of the produced data. This separation facilitates the team work and the updates either on the side of the code or on the side of the code HTML since each of the two parts can be modified without affecting the other.The templates , used jointly with effective style sheets, make it possible to manage the publication of information on several different supports.
A mitigated use
The use of the engines of templates in a waiter application (as PHP as example) is very discussed and them advantages of the engines of templates always do not equalize their disadvantages. Thus let us see initially the advantages:- separation of the aspect programming and posting
- possibility of modifying a parameter of posting throughout the generation of the page (the management of the title of the page for example)
- to allow to share the work of the graphic designer and the programmer, and to avoid the involuntary modifications
- this on-layer has an impact over the generation time of the page
- it is possible to do without a system of templates and to use the normal variables directly
But if one were to retain a principal advantage of a good system of template, that would be that it acts like a framework for posting, having basic functions to carry out the diagrams traditional of representation. (example, drop-down list starting from database)
When with the performance, it is possible to generate the page hides some once for all what does not constitute an additional load waiter at the time of the rise in load. Other systems, like Smarty for example, even make it possible to generate an intermediate mask.
See too
- Reason for design (in English Design pattern ): a solution known and recognized like good for a class of problems.
External bonds
Templates on mesdemos- Template on dmoz
| Random links: | Loïc Guillon | Sakurai | Julie Walters | Gloriette island | HOGLY Hockey La Roche-sur-Yon-native Club | Comté_de_Carroll,_la_Géorgie |