List Directives with filter and limit

One of the fundamental design decisions for FreshMarker is always the question of whether a feature is actually needed or whether pre-processing the data can solve the problem. This is always a delicate balancing act, because any unnecessary pre-processing casts a shadow on the attractiveness of the template engine. It’s always a question of whether … Read more

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.

Trunk Based Development

prefer trunk based development over gitflow

Every now and then, a way of working creeps in that is assumed not to correspond to established procedures. How nice it is when it is seen by many as a best practice and even has a name. In this case, it is a special version control practice, you guessed it, Trunk Base Development.

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.

More About Range Expressions

FreshMarker as a Template Engine supports a whole range of data types for its model values. This data type are usually a mapping of the corresponding Java types such as String, Boolean, Long, Beans, Records, List and Maps. In addition, FreshMarker has the data type Range, which describes intervals with a lower and an optional upper limit.

More Operator Overloading

In the previous article on operator overloading, the implementation for the numerical addition and multiplication operators was presented. In this article, some other operators will be provided with this feature and some details will be discussed that should be taken into account when operator overloading.

FreshMarker Operator Overloading

Operator overloading is a programming technique in which an existing operator is extended or adapted to user-defined data types. This makes it possible to design user-defined classes in such a way that they behave syntactically like built-in data types and facilitates intuitive and readable use of these types using the familiar operators. This article presents the integration of operator overloading in FreshMarker.

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.