This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Comparison of web template engines" – news · newspapers · books · scholar · JSTOR (September 2018) (Learn how and when to remove this message) |
The following table lists the various web template engines used in Web template systems and a brief rundown of their features.
Engine (implementation) | Languages | License | Variables | Functions | Includes | Conditional inclusion | Looping | Evaluation (language) | Assignment | Errors and exceptions | i18n | Natural templates | Inheritance |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Apache Velocity | Java, C# | Apache | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No |
ASP.NET (Microsoft) | C#, VB.NET | Proprietary | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ? | ? | ? |
ASP.NET (Mono) | C# | LGPL | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ? | ? | ? |
Laravel Blade | PHP | MIT | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes |
CheetahTemplate | Python | MIT | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes |
CodeCharge Studio | Classic ASP, C#, VB.NET, PHP, Perl, Java/JSP, ColdFusion | Proprietary | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | ? |
ColdFusion | CFML, CFScript | Proprietary | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
CTPP | C, C++, Perl, PHP, Python | BSD-like | Yes | Yes | Yes | Yes | Yes | No | No | Yes | No | Yes | No |
Django | Python | BSD-like | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes |
Epsilon Generation Language | Java | Eclipse Public License | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | No |
EJS | JavaScript | Various | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
eRuby | Ruby | GNU GPL / Ruby License | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
FreeMarker | Java | Apache | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No |
Genshi (templating language) | Python | BSD-like | Yes | Yes | Yes | Yes | Yes | Yes (Python) | Yes | Yes | Yes | Yes | No |
Go templates | Go | BSD | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
Haml | Ruby, PHP (WIP) | MIT | Yes | Yes | Yes | Yes | Yes | Yes (Ruby) | Yes | Yes | Yes | No | No |
Hamlets | Java | BSD | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | ? | ? | ? |
JavaServer Pages | Java | CDDL + GNU GPL | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ? | Yes | ? |
Jinja | Python | BSD | Yes | Yes | Yes | Yes | Yes | Yes (Python) | Yes | No | Yes | No | Yes |
Jinja2 | Python | BSD | Yes | Yes | Yes | Yes | Yes | Yes (Python) | Yes | Yes | Yes | No | Yes |
Tera | Rust | MIT | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | No | No | No |
Kid | Python | MIT | Yes | Yes | Yes | Yes | Yes | Yes (Python) | Yes | Yes | No | Yes | No |
Lucee | CFML | LGPL | Yes | Yes | Yes | Yes | Yes | Yes (CFML) | Yes | Yes | Yes | Yes | Yes |
Mako | Python | MIT | Yes | Yes | Yes | Yes | Yes | Yes (Python) | Yes | Yes | Yes | No | Yes |
Mustache | 30+ languages | MIT | Yes | Yes | Yes | Yes | Yes (foreach) | No | No | Yes | Yes | Yes | No |
Open Power Template | PHP 5 | BSD-like | Yes | Yes | Yes | Yes | Yes | Yes (PHP) | Yes | Yes | No | Yes | Yes |
PHP | PHP | PHP License | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
Pug | JavaScript | MIT | Yes | Yes | Yes | Yes | Yes | Yes (JavaScript) | Yes | Yes | No | No | Yes |
Razor | C#, F#, VB.NET | Apache | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
Smarty | PHP | LGPL | Yes | Yes | Yes | Yes | Yes | Yes (PHP) | Yes | Yes? | Yes | No | Yes |
Slim | Ruby | MIT | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes |
Template Attribute Language | Various | open source | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | ? |
Template Toolkit | Perl, Python | Perl | Yes | Yes | Yes | Yes | Yes | Yes (Perl) | Yes | Yes | No | No | Yes |
Thymeleaf | Java | Apache | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
Twig | PHP | BSD | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | Yes | No | Yes |
web2py | Python | LGPL3 | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
WebMacro | Java | Apache, GNU GPL | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | ? | ? | ? |
Engine (implementation) | Languages | License | Variables | Functions | Includes | Conditional inclusion | Looping | Evaluation (language) | Assignment | Errors and exceptions | i18n | Natural templates | Inheritance |
See also
- Template processor
- Web template system
- JavaScript templating
- Category:Template engines
- Java template engine performance report in spring boot
Notes
- ^ Engine (implementation) : engine name
- ^ Languages : implementation language of the engine (not the template script language)
- ^ License : Software license agreement
- ^ Variables : script language power to use variables
- ^ Functions : script language power to use functions
- ^ Includes : script language power include external files
- ^ Conditional inclusion : script language power to conditional includes
- ^ Looping : script language power to do loops (for, while) or recursion
- ^ Evaluation (language) : script language power to do "eval command" (to the implementation language)
- ^ Assignment : set names and references to sub-templates (?)
- ^ Errors and exceptions : engine output script errors.
- ^ i18n : Internationalization and localization feature
- ^ Natural templates : the template can be a document as valid as the final result, the engine syntax doesn't break the document's structure
- ^ Inheritance : Supports the ability to inherit a layout from a parent template, separately overriding arbitrary sections of the parent template's content.
References
- JavaServer(TM) Pages Implementation
- "pugjs/pug". GitHub. Retrieved 2021-05-17.
- "slim-template/slim". Github. Retrieved 2021-05-17.