FreshMarker – compile it! (3)

In the second article on the FreshMarker Compiler, we looked at the implementation of a pretty printer for Template instances. This implementation serves as the basis for the FreshMarker Compiler, which generates Java code from a Template instance. Before we tackle the Compiler, we need to look at a few more hurdles and details.

FreshMarker – compile it! (2)

In the first article on static FreshMarker templates, some basic thoughts were put on paper. This article is intended to set a first milestone on the way to supporting much faster templates than before. As a nice side effect of this initial work, a pretty printer for FreshMarker templates will be created.

FreshMarker – compile it!

The template engine FreshMarker occupies a middle position in terms of processing speed for the benchmark displayed on the FreshMarker project page. In line with the concept of a dynamic, expandable engine, a noticeable acceleration of processing is not to be expected. The question therefore arises as to which concept can be thrown overboard in order to significantly increase speed.

Passage of Time Events

It’s not that often that a design pattern really blows my mind anymore, but recently I discovered the Passage of Time Pattern by Mathias Verraes. This pattern describes how to deal with time-dependent processes in event-based systems. What makes this pattern stand out is its elegance and simplicity.

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.

Optimistic Locking mit dem ETag Header

Bild von Kerstin Riemer https://pixabay.com/de/users/kriemer-932379/

Wenn mehr als ein Beteiligter beim Speichern von Daten involviert ist, kann es zu ungewollten Überschreibungen kommen. Um solche Probleme zu umgehen, existieren drei Vorgehensweisen. Pessimistic Locking, Optimistic Locking und Ignore It!

FreshMarker Features

The follow-up article on FreshMarker Features took a little longer because there was simply no feature that wanted to manifest itself in a plugin. In the FreshMarker Includes article, the features for activating and deactivating functionalities within FreshMarker were presented. The outlook was given that FreshMarker plugins should also be able to contribute their own features. How this can work is explained in this article.

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?

FreshMarker Includes (2)

In the first article on the Include Directive, I showed how this directive can be implemented in FreshMarker. Although additional content can now be inserted into the template, some additional details are still missing. An important detail is the avoidance of recursive includes. These usually never end well. The following template recursive.fmt shows the simplest form of the problem.

FreshMarker Includes

Some time ago I had the pleasure of giving a talk about FreshMarker at the Java User Group Bielefeld. At this event, the question arose as to why FreshMarker does not have an include directive like FreeMarker. The include directive can be used in FreeMarker to insert additional content into templates.

Back to the Ancestors

Christmas is a contemplative time. You meet up with friends and family and enjoy being together. Until a family member gets in touch and asks for a new printout of the family tree. Family trees were a topic on this blog in 2018 and since then it has been rather quiet on the subject.

Review of the Advent of Code 2024

This year I took part in Advent of Code for the first time. Advent of Code is an exciting and challenging annual competition in which a task has to be solved every day from December 1st to December 25th. The task can be solved using any programming language such as Java, Typescript, Python, Rust, SQL … Read more