The End of Loose Tag End

While designing a new feature, I once again stumbled upon a feature of the template language that I haven’t liked for a long time. The syntax of the directives is modeled after HTML elements, not XML elements. As long as you don’t want to change the syntax of the template language, this isn’t a problem. But if you have a great idea for a new feature, you’re in for a world of trouble.

Nested Directives with Parameters

When replicating the concepts of another template engine, there are always moments when you put off working on a particular concept. This rarely has anything to do with the complexity of the concept itself, but often stems from a personal aversion. For FreshMarker, this has meant that some concepts have been implemented late or completely reworked. Some concepts are still awaiting implementation. One of these concepts is the parameters of the nested directive, which will be implemented for FreshMarker 2.7.0.

Vier Jahre FreshMarker

Vor vier Jahren begann das Abenteuer FreshMarker mit dem Blog-Beitrag „FreshMarker, eine frische Template Engine für Java“. Was als akademisches Experiment startete, hat sich inzwischen zu einer vielseitigen und stabilen Template Engine entwickelt. Mit Version 2.5.0 und insgesamt 87 Blog-Beiträgen, die verschiedenste Aspekte beleuchten, ist nun der richtige Zeitpunkt für ein Resümee.

Select Operator for FreshMarker

An important component of the FreshMarker template engine is the built-in expression language. The expression language is used to utilize not only variables but also complex expressions in directives and interpolations. When evaluating other expression languages for customer projects, sometimes I am interested in integrating some findings into the FreshMarker expression language.

FreshMarker Switch On Directive

Nothing is so good that it can’t be reworked. The switch directive in FreshMarker differed from the FreeMarker variant quite early on. FreshMarker’s switch directive does not have a fall-through mechanism. This mechanism is a legacy of the C language family, whose switch statements with break also found their way into the template syntax. Since the end of 2024, FreeMarker now also has a new switch directive. How can this be incorporated into FreshMarker?

List Directives with filter and limit

One of the fundamental design decisions for FreshMarker is always the question of whether a feature is actually needed or whether pre-processing the data can solve the problem. This is always a delicate balancing act, because any unnecessary pre-processing casts a shadow on the attractiveness of the template engine. It’s always a question of whether … Read more