WikiNerdiA - Your resource in building a successful business

Web template system

From CyberNerdz Consulting Wiki

Revision as of 04:41, 21 December 2011 by Petn (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Template:Original research

A Web template system describes the software and methodologies used to produce web pages and for deployment on websites and delivery over the Internet.Template:Citation needed Such systems process web templates, using a template engine. It is a web publishing tool present in content management systems, software frameworks, HTML editors, and many other contexts.

File:TempEngWeb016.svg
The basic process: content (from a database), and "presentation specifications" (in a web template), are combined (through the template engine) to mass-produce web documents.

Template:TemplateSystemSeries

Contents

Overview

A web template system is composed ofTemplate:Citation needed:

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 HTTP, or another internet protocol.

Motivations and typical uses

Mass-production

Various agencies and organizations use web template systems for mass-production of content when slower production alternatives prove unfeasible.Template:Citation needed

For an introductory overview, a news website is used as example. Suppose a "static website", where all web pages are static, and built by a web designer, that need to add and update pages every day.
A typical strategy to automate the web-designer's "repetitive work" is:

  1. choose a web template system to maintain the website;
  2. group news items with different presentation needs;
  3. specify the "presentation standards" through web templates, for each group of news;
  4. specify a content resource to generate or update the content of each news item.

Style standardization

Separation of concerns

Template:Main For the web designer, when each web page comes from a web template, he/she 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 well.

For programmers the template language offers a more restricted logic, only for presentation adaptations and decisions, not for complex (business model) algorithms.Template:Citation needed

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.Template:Citation needed
  • Ease of interface localization: menus and other presentation standards are easy to make uniform, for users browsing on the site.Template:Citation needed
  • Possibility to work separately on design and code by different people at the same time.Template:Citation needed

Formal characterization

Template:Expand section

File:WebTemplate mathRepres.gif
Elements (C,T,P,R) on the dataflow representation.

Kinds of template systems

There are many public software and commercial packages promoted as being web templates and template engines, but there are a high diversity of disperse kinds of solutions. To select and group them in a systematic way, the first step is to characterize them as template systems.

A second step is to group and identify main properties of each characterized system:

  • The architecture of these systems, into a client–server reference model, is the main division criteria for group then—although the use of diverse modern web cache strategies, architectures can be characterized. There are, as illustrated, three groups: Outside server systems, Server-side systems, and Distributed systems.
  • Main attributes:
    • Template languages may be:
      • Embedded or Event-driven.
      • Simple, Iterable, Programmable, or Complex.
      • Specification possession: the standards of the language are controlled by a public or not-public. The possession strategy and the ownership indicate the stability and credibility of the specification. Note that in most jurisdictions language specification cannot be copyrighted, so the possession is not absolute.
    • Template engine possession: it is public or not (ownership rights), indicating if source codes of the template engine are open, or not.

Many template systems are a component of a platform or framework. They are referred to as the "platform's template system".

Many template systems have options for change (plug) the template language or for change the template engine.

Outside server systems

File:StaticTemplates.gif
Outside server template system architecture.

Web templates in this context produce only static web pages, and can be viewed as a ready-made web design, used to mass-produce "cookie-cutter" websites for rapid deployment.

HTML editors are the typical systems using outside server subsystems. They also commonly include themes in place of CSS styles. In general the template language is to be used only with the editor's software.

FrontPage and Dreamweaver are the most popular editors with template sub-system. A Flash web template uses Macromedia Flash to create visually appealing sites.

System label/name Platform/editor Notes
Dreamweaver Macromedia HTML authoring. Embedded iterable language.
Flash Macromedia Flash authoring.
FrontPage Microsoft HTML authoring. Embedded iterable language.
Nvu Linux/Nvu HTML authoring.

Many server-side template systems have the option to publish the output pages on the server, where the published pages will be static. It is a common feature on content management systems, like Vignette. But this does not have to be considered an out-server generation.

In the majority of the cases, this "publish option" not interferes with the template system, and it can be made by external software, as Wget.

Server-side systems

File:ServerSideTemplates.gif
Server-side template system

Server-side dynamic pages began to be generated by templates with pre-existent software adapted for this task. This early software was the preprocessors and macro languages, adapted for the web use, running on CGI. Next, a simple but relevant technology was the direct execution made on extension modules, started with SSI.

Many template systems are typically used as server-side template systems:

System label/name Platform/framework Notes
Amrita Template Library Ruby Public. Embedded complex language.
CheetahTemplate Python Public. Embedded complex language.
Chip PHP Public.
ClearSilver C, Java, Perl, Python, Ruby Public. Embedded complex language.
Closure Templates Java, JavaScript Public. Embedded complex language
Dermis Classic ASP/VBScript Port of the Smarty template system to Classic ASP/VBScript. Public. Embedded complex language.
Django Python Use the "Django template language".
Evoque Templating Python including Python 3.0 Embedded simple language.
FreeMarker Java Public.
Facelets Java EE Public. Part of JavaServer Faces
Genshi Python Public
Grantlee Template system C++, Qt (toolkit) Port of the Django template system to Qt.
Haml Ruby or Other Public.
Hamlets Java Public.
jin-template Java, PHP Public.
JScore PHP + JS Proprietary. Dependency-Driven programmable language. Along with HTML output, generates JS that dynamically manipulates DOM structure on the client side when variables are changed.
HTML::Template Perl Public.
Kid Python
Lasso LassoSoft, LLC Proprietary. Interpreted Programming Language and Server
Mustache ActionScript, C++, Clojure, CoffeeScript, ColdFusion, D, Erlang, Fantom, Go, Java, server-side JavaScript, Lua, .NET, Objective-C, Perl, PHP, Python, Ruby, Scala Public.
Basic Server Side Includes (SSI) The basic directives fix a "standard". Embedded simple language, if exclude exec directive.
Smarty PHP Public. Embedded complex language.
ATal PHP Public. Embedded complex language. Smarty/TAL hybrid
Template Alloy Perl Public. Embedded complex language. Supports various languages including Template::Toolkit, HTML::Template, Text::Tmpl, as well as Velocity Template Language
Template Power PHP Public. Web template#Complex templates.
Template Toolkit Perl Public. Embedded complex language.
StringTemplate Java, C#, Python Public. Embedded iterable language.
Template Attribute Language (TAL) Zope, Python, Java, Perl, PHP, XSLT Public; a.k.a. Zope Page Templates (ZPT); see also TAL Expression Syntax (TALES), Macro Expansion TAL (METAL)
Thymeleaf Java Public.
Topsite Python Public.
PHPlib PHPlib Public. Embedded iterable language.
Psttt! template engine PHP Public. External selector value css like file.
WebMacro Java Public. Embedded iterable language.
WebObjects Java Use the WebObjects Builder as engine.
Velocity (Jakarta/Apache) Java Public. Use VTL - Velocity Template Language.
Vignette Proprietary. Commercial solution. Embedded complex language.
VlibTemplate PHP Public.
XSLT (standard language) Any with an XSLT parser Standard. Event-driven programmable language.
XQuery (standard language) Any with an XQuery parser Standard. Embedded programmable language.
Merge On Browse AJAX compatible browser Public. Cross browser, client side templating language which uses AJAX and DHTML to pull together dynamic content and static document structure

Technically, the methodology of embedding programming languages within HTML (or XML, etc.), used in many "server-side included script languages" are also templates. All of them are embedded complex languages.

System label/name Notes
Active Server Pages (ASP) Proprietary (Microsoft platform). See also: VBScript, Javascript, PerlScript, etc. extensions for ASP.
eRuby Public (Ruby).
ColdFusion Markup Language (CFM) Public (Railo, OpenBD). Proprietary (Adobe ColdFusion).
JavaServer Pages (JSP) Public, Java platform.
Active Perl Public.
PHP Public.
OpenACS Public (Tcl).

There are also preprocessors used as server-side template engines. Examples:

Preprocessor Notes
C preprocessor Public. Embedded iterable language.
M4 Public. Embedded complex language.

Edge-side systems

Edge-Side template and Inclusion systems. “Edge-side” refers to web servers that reside in the space between the client (browser) and the originating server. They are often referred to as “reverse-proxy” servers. These servers are generally tasked with reducing the load and traffic on originating servers by caching content such as images and page fragments, and delivering this to the browser in an efficient manner.

Basic Edge Side Includes (ESI) is an SSI-like language. ESI has been implemented for content delivery networks. The ESI template language may also be implemented in web browsers using JavaScript and Ajax, or via a browser "plug-in".

Client-Side Systems

File:ClientSideTemplates.gif
Client-side and distributed (decentralized) template system.

Many web browsers support applying XSLT stylesheets to XML data in the browser itself, providing template functionality in the browser.
Other systems implement template functionality in-browser using JavaScript or another Client-side_scripting language :

Distributed systems

The more simple form are transclusions (HTML frames). In other cases it need Dynamic web pages to run.

Examples:

References


See also

Personal tools