Holidays 1.3.0
One library I really need to get back to working on while on vacation is Holidays. There haven’t been any updates to its content for quite some time. Now I have added the holidays for Poland, the Netherlands, Belgium, and Denmark.
Thoughts on agile software development
One library I really need to get back to working on while on vacation is Holidays. There haven’t been any updates to its content for quite some time. Now I have added the holidays for Poland, the Netherlands, Belgium, and Denmark.
The stream-collector-utilities library has provided several useful collectors for Java 17 up to this point. Since it was starting to show its age, it was time for an overhaul. The library now ships four ready-to-use Gatherers that complement its existing Collector classes. This post walks through each of them.
Sometimes you develop things while on vacation because you’ve always wanted to try them out but don’t really see any practical use for them. That’s the case with FreshMarker APT. APT stands for Annotation Processed Templating and simply means applying the FreshMarker template syntax to Java code in a way similar to String Templates.
FreshMarker has always optimised constant expressions during template parsing. The expression 2 + 3 becomes 5 before the first process(…) call is ever made. That optimisation, however, had a hard boundary: anything involving the ~~ operator, registered formatters, or context-free built-ins was left untouched because the parser had no access to the configuration that governs them. This post describes the ParseContext, a new concept that hands build-time knowledge to the template builders and what that unlocks.
I’m excited to announce the release of FreshMarker 3.0.0! This major version brings significant improvements and modernizations to the template engine.
Some algorithms are real classics and yet nobody really knows them. Day in, day out, everyone is happy about the beautiful wrapping of their text in the word processor, but why does the text actually look so beautiful spread across the lines?
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.
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.
Every now and then, I look into the capabilities of other template engines for new features. If something offers added value and fits within FreshMarker’s concept, then it gets adapted. Sometimes the result is something completely different, and sometimes it’s very similar to the original. Since FreshMarker 2.3.0, the built-ins find, matches, and split have been available. Why not add a few new built-ins using regular expressions?
Some features of a framework are so expected that you end up being surprised when they don’t actually exist. Just recently, it happened again: our team thought it would be better to write a Spring Data construct using a query method. But at first, it didn’t work.
When you write ${date + 3} in a template, TemplateLocalDate knows how to add an integer. When you write ${3 + date}, the roles are swapped: the number is on the left, and TemplateNumber has never heard of dates. Historically FreshMarker only dispatched operators on the left operand, which meant that a new type could never opt into being the right operand of an operator without patching every other type. This post walks through the design and implementation of the new symmetric operator dispatch that fixes exactly that.
FreshMarker has introduced the ~ operator, which concatenates values with a space. With FreshMarker 3.0.0, ~~ is introduced: the same concept, but this time non-textual primitives are passed through the configured formatter before concatenation—numbers, dates, and other primitives thus appear exactly as they do in the rest of the template. The Problem with Simple Concatenation FreshMarker has … Read more
The previous post looked at the Stage 1 (untyped) compiler and finished with an honest observation: Stage 1 removes fragment-dispatch overhead but still evaluates every expression through TemplateObject. This third and final post explains how the Stage 2 compiler uses a TemplateTypeSchema to emit raw Java that talks directly to your data model — and how that unlocks the ~2.5× AOT speedup from the benchmark chart in the first post.