The template and content resources are processed and combined by the template engine to mass-produce web documents. For purposes of this article, web documents include any of various output formats for transmission over the web via [[Hypertext Transfer Protocol|HTTP]], [[HTTPS]], or another [[Internet Protocol|Internet protocol]].
==Motivations and typical uses==
===Applications===
Web developers can use templates from any individual or organization to set up a website. Once they purchase or download a template, they replace all generic information in the web template with their personal, organizational, or product information. Templates are commonly used to:
* Display personal information or daily activities as in a [[blog]]
* [[E-commerce|Sell products online]]
* Display information about a company or an organization
* Display [[Genealogy|family history]]
* Display a gallery of photos
* Place music files such as [[MP3|MP3 files]] on-line for play through a web browser
* Place [[Video clip|videos online]] for public viewing
* Set up a private login area online
===Mass-production===
Various agencies and organizations use web template systems to [[Mass production|mass-produce]] content when slower production methods are less feasible.{{Citation needed|date=April 2011}}
For an introductory overview, take a [[News agency|news website]] as an example. Consider a "static website", where all web pages are [[Static web page|static]], built by a [[web designer]]. It would be very repetitive work to change individual pages as often as the news changes. A typical strategy to automate the web designer's "repetitive work" using templates could be as follows:
# choose a ''web template system'' to maintain the [[website]];
# group ''news items'' with different presentation needs;
# specify the "presentation standards" through [[web templates]], for each group of news;
# specify a ''content resource'' to generate or update the content of each ''news item''.
===Style standardization===
{{Expand section|date=March 2012}}
===Separation of concerns===
{{Main|Separation of concerns}}
A common goal among experienced web developers is to develop and deploy applications that are flexible and easily maintainable. An important consideration in reaching this goal is the [[separation of presentation and content|separation]] of [[business logic]] from [[presentation logic]].<ref name="Parr000">{{cite book
| first = Terence John
| last = Parr
| title = Enforcing strict model–view separation in template engines
| publisher = Proceedings of the 13th international conference on World Wide Web
| year = 2004
| isbn = 1-58113-844-X
}}</ref> Developers use web template systems (with varying degrees of success) to maintain this separation.<ref name="Parr000" />
For the [[web designer]], when each web page comes from a [[web template]], they can think about a modular web page structured with components that can be modified independently of each other. These components may include a header, footer, [[global navigation bar]] (GNB), local [[navigation bar]] and content such as articles, images, videos etc.
For [[programmer]]s the [[Web template#Template languages|template language]] offers a more restricted logic, only for ''presentation'' adaptations and decisions, not for complex (business [[model–view–controller|model]]) [[algorithm]]s.{{Citation needed|date=April 2011}}
For other members of the "site team", a ''template system'' frees webmasters to focus on technical maintenance, content suppliers to focus on content, and gives all of them more [[Reliability engineering|reliability]]. <!-- of content and presentation standards.-->
Moreover, it has the following advantages to its use:
* ''Ease of design change'': presentation variations on templates are "content invariant", meaning a web designer can update the presentation without wider infrastructural preoccupations.{{citation needed|date=September 2018}}
* ''Ease of interface localization'': menus and other presentation standards are easy to make uniform, for users browsing on the site. Using [[Breadcrumb (navigation)]] makes any website more user friendly and flexible.<ref name="breadcrumbs">https://www.smashingmagazine.com/2009/03/breadcrumbs-in-web-design-examples-and-best-practices</ref>
* ''Possibility to work separately'' on design and code by different people at the same time. It can be performed while all the codes in a templates are clean design and every block or section of the websites are write with individual commenting system.{{Citation needed|date=April 2011}}
* ''[[Responsive web design]]'' is now a mandatory factor for any website. Everything must be performed without any change in responsive design.
* ''Ease of documentation'' a handy documentation saves more time to understand the whole template and also accelerate the modification process. Professional website designers highly emphasize documentation.
One difficulty in evaluating separation of concerns is the lack of well-defined formalisms to measure when and how well it is actually met.<ref name="Parr000" /> There are, however, fairly standard heuristics that have been borrowed from the ___domain of [[software engineering]]. These include '[[Inheritance (computer science)|inheritance]]' (based on principles of [[object-oriented programming]]); and '[[Template processor|templating]] and [[generative programming]]', (consistent with the principles of [[model–view–controller|MVC separation]]).<ref name="ParagonCorp">{{cite web
|url=http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=21
|title=Separation of Business Logic from Presentation Logic in Web Applications
|date=2003-07-19
|author=Paragon Corporation
}}
</ref> The precise difference between the various guidelines is subject to some debate, and some aspects of the different guidelines share a degree of similarity.<ref name="MVC_vs_OOP">[http://c2.com/cgi/wiki?MvcIsNotObjectOriented MVC vs OOP]</ref>
===Flexible presentation===
One major rationale behind "effective separation" is the need for maximum flexibility in the code and resources dedicated to the presentation logic.<ref name="ParagonCorp" /> Client demands, changing customer preferences and desire to present a "fresh face" for pre-existing content often result in the need to dramatically modify the public appearance of web content while disrupting the underlying infrastructure as little as possible.
The distinction between "presentation" (front end) and "[[business logic]]" (infrastructure) is important, because:
* Presentation source code language can differ from other code assets.
* Developers often make application components at separate times and locations.
* Workers skill sets don't always include both presentation skills and business logic coding ability.
* Code assets are easier to read and maintain when the system keeps various component types separate and [[Loose coupling|loosely coupled]]<ref name="ParagonCorp" />
===Reusability===
Not all potential web template users can hire developers to design a system. Additionally, some may wish to use the Web but have little technical proficiency. Thus, a number of developers and vendors have released web templates specifically for non-technical people to use. Web template reusability is also important for even highly skilled and technically experienced developers—but it is ''especially'' critical to those who rely on simplicity and "ready-made" web solutions.
Such "ready-made" web templates are sometimes free, and easily made by an individual domestically. However, specialized web templates are sometimes sold online. Although there are numerous commercial sites that offer web templates for a licensing fee, there are also free and "open-source" sources as well.
== Example ==
|