This post features web template engines.
Web template engines are run on server side.
Some web end frameworks, such as Django, include their own web template engine.
List of Web Template Engines
Web template engines featured on this post:
- Java Server Pages
- Thymeleaf
- Apache Velocity
- EJS
- Pug
- Apache FreeMarker
- Handlebar.js
- Jinja2
Java Server Pages
Java Server Pages (JSP) is a server technology tightly integrated with Java servlets. It is not a full back end framework but not just a simple template engine. It can be considered a template engine with additional features.
JSP is considered outdated due to its reliance on embedding logic in templates, which violates best practices in modern web development.
You can read more about JSP on a post about Jakarta EE.
Thymeleaf
Thymeleaf is a Java template engine that intends to be a substitute for Java ServerPages. It is well integrated with the web end framework Spring Boots.
It is in line with the MVC (Model-View-Controller) pattern.
It is FOSS under an Apache 2.0 license.
Apache Velocity
Apache Velocity is a Java template engine. Its goal is to keep templates as simple as possible, to help maintain a segregation between logic and presentation
It is in line with the MVC (Model-View-Controller) pattern.
It is FOSS under an Apache 2.0 license.
EJS
Embedded JavaScript (EJS) is a JavaScript template engine.
It is well integrated with Express.js, that is a Node.js framework module.
Pug
Pug, formerly known as Jade, is a JavaScript template engine.
Apache FreeMarker
Apache FreeMarker is a Java template engine. It is more complex and robust than Apache Velocity.
It is FOSS under an Apache 2.0 license.
Apache FreeMarker official website
Handlebar.js
Handlebar.js is a JavaScript template engine.
It is recommended for large projects.
Jinja2
Jinja2 is a Python template engine. It is the default template engine for back end frameworks Flask, and can be also integrated with Django.