The General Concatenation Operator

The FreshMarker Template Language provides two operators for concatenating string values: the string concatenation operators + and ~. Both operators produce a string from their two operands. The difference between the two operators lies in the way the strings are joined together. The unique feature of the ~ operator leads us to the new general concatenation operator.

Auto Hemisphere

Some implementations aren’t based on clever technical tricks, but rather on sheer diligence. That’s why it took FreshMarker Astro quite a while to finally figure out which side of the world a template engine instance is currently located on. The following article describes how FreshMarker Astro managed to get out of this predicament and almost always guesses the hemisphere correctly.

Enum Hashes

FreshMarker is based on the concepts of another template engine. This is evident from its directives, interpolations, and, of course, its name. Another detail also betrays its origins. The types in the FreshMarker Template Language for collections are sequences and hashes. Hashes represent mappings from strings to values. We now want to relax this restriction.

FreshMarker 2.6.0 Released

Just in time for Easter time there is a new FreshMarker release available. There are some more enhancements to the built-ins through the addition of an easy lambda support.

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.

Checksums with FreshMarker File

Some time ago, I had the idea that a checksum calculation could be added to the FreshMarker File library. FreshMarker File is an extension for FreshMarker to support the Java types File and Path. A checksum support would allow the current checksum to be added to lists of files without any major detours. The idea is quite simple. A corresponding built-in is appended behind a file or path variable.

FreshMarker 2.5.0 Released

Just in time for Carneval there is a new FreshMarker release available. There are several enhancements to the built-ins through the addition of an easy lambda support.

Quo Vadis, Lambda?

To implement a new built-in for sequences, lambdas were added as a new language component of the FreshMarker Expression Language. The lambda expression made it much easier to map the semantics of the new count built-in in an easily readable syntax. Now that lambda expressions are available, what else can they be used for and what still needs to be implemented?

Select Operator for FreshMarker (2)

In the first article on the Select Operator, the implementation was provisionally terminated with a few weaknesses. In this article, two of the weaknesses are eliminated.

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.