A common goal among experienced web developers is to develop and deploy applications that are flexible and an important consideration in reaching this goal is theseparation of business logic from presentation logic. Developers use web template systems (with varying degrees of success) to maintain this separation.
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 programmers the template language offers a more restricted logic, only for presentation adaptations and decisions, not for complex (business model) algorithms.
For other members of the “site team”, a template system frees webmasters to focus on technical maintenance, content suppliers to focus on content, and for all of them more reliability.
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.
- Ease of interface localization: menus and other presentation standards are easy to make uniform, for users browsing on the site.
- Possibility to work separately on design and code by different people at the same time.
One difficulty in evaluating separation of concerns is the lack of well-defined formalisms to measure when and how well it is actually met. There are, however, fairly standard heuristics that have been borrowed from the domain of software engineering. These include ‘inheritance’ (based on principles of object-oriented programming); and ‘templating and generative programming’, (consistent with the principles of MVC separation). The precise difference between the various guidelines is subject to some debate, and some aspects of the different guidelines share a degree of similarity.