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

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.

FreshMarker bei der JUG Bielefeld

Am 8. Januar 2025 ist es soweit, der erste Vortrag über die Template Engine FreshMarker. Um 18 Uhr stelle ich die Kernfunktionalitäten der Engine vor und erläutere außerdem, was ein Entwickler neben dem Programmieren, sonst noch alles beachten muss. https://www.meetup.com/de-DE/de-DE/java-user-group-bielefeld/events/305164577

Lorem ipsum dolor sit amet

The title of this article is no mistake. Anyone who has looked at the FreshMarker Random plugin recently will probably have discovered the new sentence and paragraph built-ins. These two bilt-ins support the library with the generation of the famous Lorem Ipsum pseudo-texts. Without delving deep into history, the Lorem Ipsum texts are a corruption of a Cicero text and serve as dummy texts.

FreshMarker – Groundhog Day

The moment is a wonderful thing, but not for software developers, because it keeps on moving. How can you write a test if the value changes with every test run? Functionality has always been an abomination that concealed some form of now. In FreshMarker, for example, this little monster can be found in the built-in variable .now.

Spring Modulith – An Architecture Guard

Spring Modulith is now available in version 1.3.0. So it’s time to write an article about this framework. I have created many microservices with Spring Boot over the last few years, but of course that doesn’t mean that you can’t also create large, monolithic applications with the framework.