For my new project I need a template engine for generating web pages, while I have concluded which suited my needs the best and I'm quite confident about my conclusion, your opinions and comments might help me to make my final decision.
Since mORMot is my go-to framework for server-side web development, the first candidate to consider is obviously DMustache, which is a fast Delphi/FPC implementation of the popular logic-less Mustache template engine. Actually I've used it in several of my projects and it's great. But sometimes I need more features, but as you know, logic-less means no "if", "while", and so on.
And fortunately I found Sempare Template Engine, which is the only feature-rich template engine for Delphi ( Yes, I meant it, because we all know Delphi was/is mostly focused on GUI development but not web development...)
Pros
===
- Very very feature-rich, "if", "for and while loop", "include", "JSON", "custom methods", and so on. Basically, the feature set it's very close to template engines you can find in web-focused languages such as Java. No other Delphi template engine is even comparable (sorry, I love DMustache, but I also need "if" and "while"...).
- Very well designed! You can tell by just looking at the unit namespaces and the source!
- Documented, and with examples.
- Well-tested (with DUnitX tests)
Cons: While It's also open source, but for commercial uses you need to buy a license key with a very reasonable price.
There are other template engines too, but IMHO, only DMustache and Sempare Template are serious, so I won't list them here...
Your comments are welcomed!