Answer the question
In order to leave comments, you need to log in
Which template engine is more in demand in the Spring market?
Recommend a template engine for Spring that is in demand on the freelance market, preferably with a similar html syntax.
I’m looking in the direction of Mustache, but I want to choose exactly the one that is more in demand and stable, so that in a month or two I won’t learn something else
Answer the question
In order to leave comments, you need to log in
Funny question. The template engine is just a presentation tool. Don't be afraid to learn new things.
As for the choice - Thymeleaf is not bad, but there are nuances.
For example, Thymeleaf provides a "working" layout, on which the designer and programmer can work in parallel, but this is perhaps the only plus.
Of the minuses that I personally noted:
1. If, for example, Angular.JS is used on the client, then you will have an utter mess in the tag attributes, conditionally:
In a real project, where the number of attributes needs to be multiplied by X, this turned out to be difficult to maintain.
2. Given the fact that Thymeleaf is a directive-oriented template engine, its scope is a tag. Unfortunately, not all tags are equally good. And sometimes they don't exist at all!
Let's say you want to send plain-text messages via e-mail. You don't need any layout and you're not generating HTML at all. In this case, there will be problems with Thymeleaf, because. only the tags define its SCOPE. In my opinion, somehow this problem can be solved like a crutch th:removetag
, but also not always. In one of the cases, we tried to generate a style block in the head of the page and Thymeleaf, as far as I remember, had problems with this (perhaps they fixed it).
In any case, we loved Thymeleaf very much and were its ardent followers until we ran into the conceptual limitations of linking to directives. The whole project was rewritten in Freemarker (fortunately, there was not much HTML generation on the backend) - we are happy.
I would recommend FreeMarker , it has almost everything you need and is much more compact than Thymeleaf
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question