FreshMarker and ⊻, ¬, ≠, ≤, ≥, ∨, ∧

Sometimes a new feature also needs to be a bit of fun. When updating the FreshMarker Grammar, I noticed that the operators lt, gt, gte and lte were still present. These are variants of the usual <, >, <= and >= operators and are reminiscent of the opcodes of a long-forgotten era when assembler languages still roamed the steppes of programming. Since FreshMarker was given its Unicode capabilities by CongoCC, the question arose as to why not allow ≠ and other operator characters in the template.

FreshMarker – What happened in between

Some FreshMarker additions are too small to present individually in a blog post. For this reason, there will now be a brief overview of the latest changes to the library from time to time. Up to the current version 1.6.0, the following changes have been made in recent weeks.

FreshMarker und OWASP

It will come as no surprise that FreshMarker, like all other template engines, must take precautions against template injection. Template injection is a security vulnerability that occurs when an application handles templates insecurely. Templates are prefabricated files or strings with placeholders that are replaced by data from users or other sources. Similar to FreeMarker, FreshMarker also has an escape mechanism that detects special characters in the interpolations using a harmless variant. If the standard mechanism is not enough, OWASP can help out.

Jackson Bitrate Support with JSR 385

Java Bibliotheken

Many interesting libraries are created through the Java Specification Requests process. Many of them are incorporated directly into the JDK, but some exist as independent libraries. Some time ago I wrote about the Moneta library. This article is about a Jackson use case for Indriya, the JSR 385 (Units of Measurement API) reference implementation.

FreshMarker Performance (2)

In the first article on FreshMarker performance, some of the template engine’s speed problems were addressed. The benchmark showed a tripling of the speed for these adjustments. In this article, the use of Reflections will be removed, which is certainly also of interest outside of a template engine.

FreshMarker Performance (1)

FreshMarker started as an academic project. The main aim was to show how a template engine can be created. At some point, however, the question arose as to how fast the template engine actually is. To be honest, it has been slow so far. But first things first.

REST endpoints with filters

Java Bibliotheken

This article is a slightly updated English version of the article “REST Endpunkte mit Filtern”.

In addition to sorting and pagination, filtering is a fairly common action on REST endpoints. In contrast to the first two, however, there is no adequate solution for filtering in the Spring Boot framework. With little effort, however, this can be elegantly implemented with the Spring Boot tools.

Of bridges and tunnels – agile system creation

Tunnel constructions are classic waterfall projects in which extensive planning is carried out and then construction can be completed without major changes. There are geological surprises from time to time, but a tunnel plan is, quite literally, set in stone.

FreshMarkers Roman Numbers

FreshMarker is quite a small library, about 475 KB in size. Therefore there is always room to make a few small additions. One of these is the display of numbers and loop variables with Roman numerals.

Library Updates

Java Bibliotheken

The Java libraries Holidays and Telephone are now available with Java 21 support under version 1.0.0 on Maven Central.

Partial Template Reduction (3)

At the end of the summer vacation, here is the last post on the topic of Partial Template Reduction for the time being. The basic algorithm was presented in the first two articles. In this article, the missing variable support is added.

Partial Template Reduktion (2)

In the first article on the implementation of the Partial Template Reduction feature, a few basic functions were created. This part deals with the implementation for the If-, Switch- and List- Directives.