Daily Archives: August 29, 2005

WebWork decides to go FreeMarker

The sleeping giant WebWork is under heavy development for the next 2.2 version. In fact the first beta is out and can be found here: download WebWork 2.2-b1.
One of the important changes in the next version is the default usage of FreeMarker. This news raised my interest into this framework, so I have spent last night a few moments to see what it is offering.
A very important aspect Patrick pointed about FreeMarker is that the project is still under development, a new version being announced in June. The alternative Velocity doesn’t seem to be in the same state, so from the point of view of an evolving framework this is very important.

I have downloaded the last version 2.3.3 and defined the project under Eclipse. I have noticed that the distribution contains example applications so you should be able to find good references about the usage. It has also an Eclipse plugin, but I haven’t used it so far. A bad thing I have noticed is that the framework is still using some beta libraries, that where not updated to their more stable versions, and this took me a while to make the project compilable in Eclipse.

On the good side, FreeMarker online documentation is very good and covers almost all you need. The flow is very clean and after reading it, you can definitely start using it.

One of the main questions I had after finishing the documentation was how is it different from Velocity? The principles are quite the same and the usage looks very similar. I haven’t seen any big differences from the beginning, but the guys have probably figured this out and they are publishing a comparison here. Some small improvements over Velocity can be considered the built-ins and error handling mechanisms.

The single reason I wouldn’t use this template engine for web applications (the same applies to Velocity, and in a measure to JSP too) is that you are not able to use WYSIWYG editors with your pages. This will increase the time to design the site and will make things harder to customize it. I still believe that the winner in this direction are Tapestry and the growing Wicket (which, by the way, is next on my list [blink/]).

Update: WebWork is already supporting FreeMarker and Velocity, but changed its defaults to FreeMarker. I thought I should mention this for clarification.



Filed under Uncategorized