ArticleslgStudy

science

Web template system

Web template system is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Web template system rather than just read about it. In short: A web template system in web publishing allows web designers and developers to work with web templates to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic elements based on web request parameters.

Web template system — main illustration
Web template system — illustration

Key takeaways

  • Web template system belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Web template system to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Web template system from memory before moving on to harder problems.

Reference excerpt

A web template system in web publishing allows web designers and developers to work with web templates to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic elements based on web request parameters. Web templates support static content, providing basic structure and appearance. Developers can implement templates from content management systems, web application frameworks, and HTML editors.

Overview A web template system is composed of the following:

A template engine: the primary processing element of the system; Content resource: any of various kinds of input data streams, such as from a relational database, XML files, LDAP directory, and other kinds of local or networked data; Template resource: web templates specified according to a template language; The template and content resources are processed and combined by the template engine to mass-produce web documents, each with a similar visual format. For purposes of this article, web documents include any of various output formats for transmission over the web via HTTP, HTTPS, or another Internet protocol.

Template engine

Example With the model typically held in a relational database, the remaining components of the MVC architecture are the control and view. In the simplest of systems these two are not separated. However, adapting the separation of concerns principle one can completely decouple the relationships. For example, the view template may look like this:

Then, the control template loads the view, and then uses XPath addressing to insert components from a database, for instance:

Kinds of template systems A web browser and web server are a client–server architecture. Sites often also use a web cache to improve performance. In many implementations, template files contain variables or placeholders that are replaced with data supplied by an application when the page is generated.

Server-side – run-time substitution happens on the web server Client-side – run-time substitution happens in the web browser Edge-side – run-time substitution happens on a proxy between web server and browser Outside server – static web pages are produced offline and uploaded to the web server; no run-time substitution Distributed – run-time substitution happens on multiple servers Template languages may be:

Embedded or event-driven. Simple, iterable, programmable, or complex. Defined by a consortium, privately defined, or de facto defined by an open implementation. Ownership influences the stability and credibility of a specification. However, in most jurisdictions, language specification cannot be copyrighted, so control is seldom absolute. The source code of the template engine can be proprietary or open source. Many template systems are a component of a larger programming platform or framework. They are referred to as the "platform's template system". Some template systems have the option of substituting a different template language or engine.

Language support Programming languages such as Perl, Ruby, C, and Java support template processing either natively, or through add-on libraries and modules. JavaServer Pages (JSP), PHP, and Active Server Pages (ASP with VBScript, JScript or other languages) are examples, themselves, of web template engines. These technologies are typically used in server-side templating systems, but could be adapted for use on an "edge-side" proxy or for static page generation.

Static site generators

Static site generators are engines that use flat text input files like markdown and asciidoc to generate a static web page. Examples of this include Jekyll (Liquid, Ruby), Hugo (Go templates), and Pelican (Jinja2, Python). Some hosted website builders, including Wix, Weebly, and Duda, provide template-based systems that allow users to create static and dynamic web pages through graphical user interfaces rather than traditional programming.

Static HTML Editors

HTML editors often use web template systems to produce only static web pages. These can be viewed as a ready-made web design, used to mass-produce "cookie-cutter" websites for rapid deployment. They also commonly include themes in place of CSS styles. In general, the template language is used only with the editor's software. FrontPage and Dreamweaver were once the most popular editors with template sub-systems. A Flash web template uses Macromedia Flash to create visually interactive sites. Many server-side template systems have an option to publish output pages on the server, where the published pages are static. This is common on content management systems, like Vignette, but is not considered out-server generation. In the majority of cases, this "publish option" doesn't interfere with the template system, and it can be made by external software, as Wget.

Server-side systems

People began to use server-side dynamic pages generated from 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:

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.

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

Edge-side systems As for 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

… excerpt ends here. Continue reading the full article.

Illustrations

Web template system: The basic process for a server-side web templating system: content (from a database), and "presentation specifications" (in a web template), are combined (through the template engine) to mass-produce web documents.
The basic process for a server-side web templating system: content (from a database), and "presentation specifications" (in a web template), are combined (through the template engine) to mass-produce web documents.
Web template system: A diagram illustrating all of the basic elements and processing flow of a template engine.
A diagram illustrating all of the basic elements and processing flow of a template engine.
Web template system: Outside server template system architecture.
Outside server template system architecture.
Web template system: Server-side template system
Server-side template system
Web template system: Client-side and distributed (decentralized) template system.
Client-side and distributed (decentralized) template system.

Worked examples

Example 1 — a first encounter with Web template system

Start with the simplest possible case. Write down what Web template system claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Web template system before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Web template system ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Web template system

In research
Web template system appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Web template system in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Web template system is common in secondary-school and first-year university syllabi. It links to neighbouring topics Scripting languages, Template engines, Web design, so understanding it makes those chapters shorter.
In everyday life
Look for Web template system outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Web template system” →

How to study Web template system in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Web template system means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Web template system out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Web template system in simple terms?

A web template system in web publishing allows web designers and developers to work with web templates to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic elements based on web request parameters.

Why does Web template system matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Web template system?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Web template system.

Tags

  • Scripting languages
  • Template engines
  • Web design

Keep exploring