Partial Expression Reduction

The FreshMarker template engine has the Partial Template Reduction feature. This makes it possible to create a new Template from an existing Template by adding an incomplete model. Some constructs are simplified in the new Template because the data from the incomplete model could be evaluated there. Until now, this could only be used in directives and interpolations, so why not use the mechanism in expressions as well?

FreshMarker Fo(u)r Seasons

Some features in open source projects are gimmicks whose utility value is rather low. On the other hand, they enable the evaluation of new functions and previously unused libraries. In this article, support for astronomical seasons is implemented in Freshmarker using the Time4J library.

FreshMarker Bricks

In a Reddit forum, a suggestion was made to support template fragments in FreshMarker. Template fragments are parts of a template that can be used individually. The question that naturally arises is why would you want to use parts of a template individually? After all, many template engines offer the option of construct a template from different sources using include instructions. Such an include can then also be used individually.

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.

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.

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.

Null Equality in Templates

This is an article that reports directly from the bowels of FreshMarker. It is therefore mainly worthwhile for readers who want to know a little more about how FreshMarker works.

FreshMarker Sorted Hash Lists

I really like it when I can add new features to FreshMarker, especially if they are easy to implement and integrate elegantly into the overall system.