Comparison of web template engines

Last updated

The following table lists the various web template engines used in Web template systems and a brief rundown of their features.

Contents

Engine (implementation) [lower-alpha 1] Languages [lower-alpha 2] License [lower-alpha 3] Variables [lower-alpha 4] Functions [lower-alpha 5] Includes [lower-alpha 6] Conditional inclusion [lower-alpha 7] Looping [lower-alpha 8] Evaluation (language) [lower-alpha 9] Assignment [lower-alpha 10] Errors and exceptions [lower-alpha 11] i18n [lower-alpha 12] Natural templates [lower-alpha 13] Inheritance [lower-alpha 14]
Apache Velocity Java, C# Apache YesYesYesYesYesYesYesYesNoNoNo
ASP.NET (Microsoft) C#, VB.NET Proprietary YesYesYesYesYesYesYesYes ? ? ?
ASP.NET (Mono) C# LGPL YesYesYesYesYesYesYesYes ? ? ?
Laravel Blade PHP MIT YesYesYesYesYesYesYesYesYesNoYes
CheetahTemplate Python MIT YesYesYesYesYesYesYesYesNoNoYes
CodeCharge Studio Classic ASP, C#, VB.NET, PHP, Perl, Java/JSP, ColdFusion Proprietary YesYesYesYesYesYesYesNoYesYes ?
ColdFusion CFML, CFScript Proprietary YesYesYesYesYesYesYesYesYesYesYes
CTPP C, C++, Perl, PHP, Python BSD-likeYesYesYesYesYesNoNoYesNoYesNo
Django Python BSD-likeYesYesYesYesYesYesYesYesYesNoYes
Epsilon Generation Language Java Eclipse Public License YesYesYesYesYesYesYesYesNoYesNo
EJS JavaScript VariousYesYesYesYesYesYesYesYesYesYesYes
eRuby Ruby GNU GPL / Ruby License YesYesYesYesYesYesYesYesYesYesNo
FreeMarker Java Apache YesYesYesYesYesYesYesYesYesNoNo
Genshi (templating language) Python BSD-likeYesYesYesYesYesYes (Python)YesYesYesYesNo
Go templates Go BSD YesYesYesYesYesYesYesYesYesYesNo
Haml Ruby, PHP (WIP) MIT YesYesYesYesYesYes (Ruby)YesYesYesNoNo
Hamlets Java BSD YesYesYesYesYesNoYesYes ? ? ?
JavaServer Pages Java CDDL + GNU GPL [1] YesYesYesYesYesYesYesYes ?Yes ?
Jinja Python BSD YesYesYesYesYesYes (Python)YesNoYesNoYes
Jinja2 Python BSD YesYesYesYesYesYes (Python)YesYesYesNoYes
Tera Rust MIT YesYesYesYesYesNoYesYesNoNoNo
Kid Python MIT YesYesYesYesYesYes (Python)YesYesNoYesNo
Lucee CFML LGPL YesYesYesYesYesYes (CFML)YesYesYesYesYes
Mako Python MIT YesYesYesYesYesYes (Python)YesYesYesNoYes
Mustache 30+ languages MIT YesYesYesYesYes (foreach)NoNoYesYesYesNo
Open Power Template PHP 5BSD-likeYesYesYesYesYesYes (PHP)YesYesNoYesYes
PHP PHP PHP License YesYesYesYesYesYesYesYesYesYesNo
Pug JavaScript MIT [2] YesYesYesYesYesYes (JavaScript)YesYesNoNoYes
Razor C#, F#, VB.NET Apache YesYesYesYesYesYesYesYesYesYesYes
Smarty PHP LGPL YesYesYesYesYesYes (PHP)YesYes?YesNoYes
Slim Ruby MIT [3] YesYesYesYesYesYesYesYesNoNoYes
Template Attribute Language Variousopen sourceYesYesYesYesYesYesYesYesNoYes ?
Template Toolkit Perl, Python Perl YesYesYesYesYesYes (Perl)YesYesNoNoYes
Thymeleaf Java Apache YesYesYesYesYesYesYesYesYesYesNo
Twig PHP BSD YesYesYesYesYesNoYesYesYesNoYes
web2py Python LGPL3 YesYesYesYesYesYesYesYesYesYesYes
WebMacro Java Apache, GNU GPL YesYesYesYesYesYesYesYes ? ? ?
Engine (implementation) [lower-alpha 1] Languages [lower-alpha 2] License [lower-alpha 3] Variables [lower-alpha 4] Functions [lower-alpha 5] Includes [lower-alpha 6] Conditional inclusion [lower-alpha 7] Looping [lower-alpha 8] Evaluation (language) [lower-alpha 9] Assignment [lower-alpha 10] Errors and exceptions [lower-alpha 11] i18n [lower-alpha 12] Natural templates [lower-alpha 13] Inheritance [lower-alpha 14]

See also

Notes

  1. 1 2 Engine (implementation) : engine name
  2. 1 2 Languages : implementation language of the engine (not the template script language)
  3. 1 2 License : Software license agreement
  4. 1 2 Variables : script language power to use variables
  5. 1 2 Functions : script language power to use functions
  6. 1 2 Includes : script language power include external files
  7. 1 2 Conditional inclusion : script language power to conditional includes
  8. 1 2 Looping : script language power to do loops (for, while) or recursion
  9. 1 2 Evaluation (language) : script language power to do "eval command" (to the implementation language)
  10. 1 2 Assignment : set names and references to sub-templates (?)
  11. 1 2 Errors and exceptions : engine output script errors.
  12. 1 2 i18n : Internationalization and localization feature
  13. 1 2 Natural templates : the template can be a document as valid as the final result, the engine syntax doesn't break the document's structure
  14. 1 2 Inheritance : Supports the ability to inherit a layout from a parent template, separately overriding arbitrary sections of the parent template's content.

Related Research Articles

<span class="mw-page-title-main">JavaScript</span> High-level programming language

JavaScript, often abbreviated as JS, is a programming language and core technology of the Web, alongside HTML and CSS. 99% of websites use JavaScript on the client side for webpage behavior.

<span class="mw-page-title-main">PHP</span> Scripting language created in 1994

PHP is a general-purpose scripting language geared towards web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1993 and released in 1995. The PHP reference implementation is now produced by the PHP Group. PHP was originally an abbreviation of Personal Home Page, but it now stands for the recursive acronym PHP: Hypertext Preprocessor.

VBScript is a deprecated programming language for scripting on Microsoft Windows using Component Object Model (COM) based on classic Visual Basic and Active Scripting.

XSLT is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subsequently be converted to other formats, such as PDF, PostScript and PNG. Support for JSON and plain-text transformation was added in later updates to the XSLT 1.0 specification.

In computer science, control flow is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an imperative programming language from a declarative programming language.

In computer programming, the scope of a name binding is the part of a program where the name binding is valid; that is, where the name can be used to refer to the entity. In other parts of the program, the name may refer to a different entity, or to nothing at all. Scope helps prevent name collisions by allowing the same name to refer to different objects – as long as the names have separate scopes. The scope of a name binding is also known as the visibility of an entity, particularly in older or more technical literature—this is in relation to the referenced entity, not the referencing name.

<span class="mw-page-title-main">Adobe ColdFusion</span> Rapid Web app development platform

Adobe ColdFusion is a commercial rapid web-application development computing platform created by J. J. Allaire in 1995. ColdFusion was originally designed to make it easier to connect simple HTML pages to a database. By version 2 (1996) it had become a full platform that included an IDE in addition to a full scripting language.

In computer programming, a callback is a function that is stored as data and designed to be called by another function – often back to the original abstraction layer.

JScript .NET is a .NET programming language developed by Microsoft.

ColdFusion Markup Language, more commonly known as CFML, is a scripting language for web development that runs on the Java virtual machine (JVM), the .NET framework, and Google App Engine. Several commercial and free and open-source software implementations of CFML engines are available, including Adobe ColdFusion, Lucee, New Atlanta BlueDragon, Railo, Open BlueDragon, and other CFML server engines.

<span class="mw-page-title-main">JavaScript syntax</span> Set of rules defining correctly structured programs

The syntax of JavaScript is the set of rules that define a correctly structured JavaScript program.

<span class="mw-page-title-main">Web template system</span> System in web publishing

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.

The following outline is provided as an overview of and topical guide to computer programming:

<span class="mw-page-title-main">Template processor</span> Software designed to combine templates with a data model to produce result documents

A template processor is software designed to combine templates with data to produce resulting documents or programs. The language that the templates are written in is known as a template language or templating language. For purposes of this article, a result document is any kind of formatted output, including documents, web pages, or source code, either in whole or in fragments. A template engine is ordinarily included as a part of a web template system or application framework, and may be used also as a preprocessor or filter.

The syntax and semantics of PHP, a programming language, form a set of rules that define how a PHP program can be written and interpreted.

Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.

<span class="mw-page-title-main">Rexx</span> Command/scripting/programming language

Rexx is a programming language that can be interpreted or compiled. It was developed at IBM by Mike Cowlishaw. It is a structured, high-level programming language designed for ease of learning and reading. Proprietary and open source Rexx interpreters exist for a wide range of computing platforms; compilers exist for IBM mainframe computers.

CoffeeScript is a programming language that compiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python, and Haskell in an effort to enhance JavaScript's brevity and readability. Specific additional features include list comprehension and destructuring assignment.

Mustache is a web template system. It is described as a logic-less system because it lacks any explicit control flow statements, like if and else conditionals or for loops; however, both looping and conditional evaluation can be achieved using section tags processing lists and anonymous functions (lambdas). It is named "Mustache" because of heavy use of braces, { }, that resemble a sideways moustache. Mustache is used mainly for mobile and web applications.

Hack is a programming language for the HipHop Virtual Machine (HHVM), created by Meta as a dialect of PHP. The language implementation is open-source, licensed under the MIT License.

References

  1. JavaServer(TM) Pages Implementation
  2. "pugjs/pug". GitHub. Retrieved 2021-05-17.
  3. "slim-template/slim". Github. Retrieved 2021-05-17.