#
Thymeleaf vs Java Server Faces (JSF)
This article explains to you which are the differences between Thymeleaf and Java Server Faces (Thymeleaf vs JSF).
When you create a web page into a server-side Java Web Application, you will follow the schema below:
Both JSF and Thymeleaf use html-like tags, but each tag is specific to the implementation.
Take a look at the Thymeleaf template :
and also to the JSF (Primefaces in this case) template:
Info
- As you can see Thymeleaf is closer to the HTML format and for this reason Thymeleaf is named "a natural template"
- Both are good choices for modern application, but as you can see, with Thymeleaf you have more control to the template code
- With JSF you can build your application faster as the facelets are already created (defined)
- Both solution could be seen as an improvement to the Java Server Pages (JSP)
- Both JSF and Thymeleaf follow the Model-View-Controller pattern