Trimou: Yet Another Mustache Templates Implementation Written in Java
The basic question is: do we need yet another templating engine in Java ecosystem? There is a lot of successful tools out there. JSP, Facelets, Velocity, Freemarker, Closure Templates, and much more. I myself asked exactly the same question some time ago when prototyping a hobby web application project with HTML5 on the client side and JAX-RS/CDI/JPA on the server side. I've had the following requirements...
The tool should (in no particular order):
- have simple yet powerful syntax
- be able to handle various template data types (POJO, Map, array, etc.) without the need of wrapping/manipulating it beforehand
- be universal - ie. not tied to a specific technology, unlike Facelets/JSF
- support template inheritance (similar to Facelets or Django); IMO this is crucial for maintenance and productivity
- be as much as possible resistant to bad practices; writing scriptlets a ala JSP should not be possible... never ever!
- be performant
- be extensible - no hacks needed, stable API and SPI provided
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)