I have a long-standing love for template engines - my first contribution to the Apache Software Foundation belonged to Apache Turbine which uses Apache Velocity as rendering component. And with Apache Velocity I did all sort of interesting things such as
- Source code generation
- Apache Torque is using Velocity to generate database access classes
- Website creation
- Many moons ago I used Apache Anakia to create websites
- XML rendering using Java data structures
But Apache Velocity is running out of steam - for one of my pet projects I was using Apache Velocity but there was little joy
- Velocity 1.7 was released 2010
- It was painful to get Velocity Tools working
- Spring Boot 5.x removes Velocity support - see https://jira.spring.io/browse/SPR-13795
But my pet project based on Apache Velocity was actually useful for my last consulting gig
- Transform JSON to a human-readable HTML report
- Transform a hand-crafted Excel sheet into a CSV
- Transform CSV to Markdown
So I started looking for alternatives
- The cool kids say ‘Node.js’ - but they always say ‘Node.js’ and I’m using the JVM
- My first steps with Thymeleaf were a bit frustrating due to my limited time
- Dave Burke’s blog entry pointed me to Apache FreeMarker
So I ported my pet project to Apache FreeMarker which is found here on GitHub - freemarker-cli - and it was fun again
Having said that there is still some work to do
- Migrate from the Groovy script to a stand-alone Java application
- If possible move it back to the FreeMarker project - see http://mail-archives.apache.org/mod_mbox/incubator-freemarker-dev/201703.mbox/%3cBD4C6EED-8BE6-4CB9-B0AE-8A6DA57063C4@gmail.com%3e