I am a dedicated user of freemarker. I find it the best template engine for Java to date. It's flexibility and simplicity beats another template engine, IMO.
However, I have also been thinking about the how powerful it would be to have the same templating on the web client (i.e browser) and on the server. This capability, combined with a good framework and application model could be an extremely powerful and simple way to develop advanced HTML(5) web and mobile applications.
The use-case, is that usually, for performance and SEO, you want the initial HTML rendering happen on the server, however, you want the subsequent partial renderings happen on the client. Today, these two requirements seem to be mutually exclusive. Either you do all the rendering on the client side (with framework like GWT), or you use the traditional way of doing HTML/DOM generation on the server side (using jQuery for adding behavior).
Mustache.js is a good example of a portable rending engine, however I think it is too limited and the Java implementation does not seem to be truly java(bean) compliant.
Anyway, I am just curious to know if someone from the freemarker community (or developers) are having similar thought and get some feedback. I would happily code something up, but I do not have much experience yet at parsing/compiling templates.
+1 415 699 9912