Stay tuned, ye of little faith! This time the Resurrection will be televised! (Or at least blogged.)

First of all, for those who don’t know it, I am, to all intents and purposes, the original author of FreeMarker — that is, FreeMarker 2.x. (And the upcoming FreeMarker 3.x.)

Now, there was a FreeMarker 1.x originally written by Benjamin Geer and Mike Bayer, but FreeMarker 2.x was really a ground-up rewrite. What it owed to the original implementation was really just some ideas. One would be hard pressed to find a single actual line of code in FreeMarker 2.x or 3.x that dates back to the 1.x version.

Now, I was not the sole author. Attila Szegedi, in particular, made very significant contributions to the project, but the parsing/rendering core of the code was really always my work, almost exclusively. And arguably, that core code is what FreeMarker really is. Basically.

The Apache FreeMarker code is a continuation of the FreeMarker 2.3.x codebase that was largely completed in 2003 or 2004. For some very strange (not really technical, but more political reasons) the code in development trunk was never put out as a release. We never had a 2.4.x release cycle. This, despite the fact that the code had undergone a huge amount of cleanup and refactoring to facilitate some interesting new features.

The upcoming FreeMarker 3 release unifies TemplateDirectiveModels (defined in Java code) with Macros (defined in FreeMarker templates) and also provides a @Parameters Java annotation that allows Java programmers to specify the arguments that a directive takes. This was meant as the beginning of making FreeMarker much more friendly to third party tools. Also, there was a significant cleanup of the whole issue of variable scopes, with even the ability for outer and inner scopes to “communicate”.

There are improvements in error handling and error reporting. But mostly, there is a much more streamlined, better engineered codebase to use as the basis for future development. The goal of this upcoming release is to get the newer (well, not so “new”, since they were mostly implemented over ten years ago!) out, but also to restart development on the project.

For anybody who is wondering about the political implications of a new FreeMarker release outside of ASF, while there is still this “Apache FreeMarker” project there, well, the details have not been hammered out yet. My position is that the real FreeMarker project is the project that I am working on. Moving forward, “Apache FreeMarker” will have roughly the same relationship to FreeMarker as the Special Olympics have to the Olympics.

Start the discussion at discuss.parsers.org