cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <>
Subject Re: FreeMarker integration
Date Mon, 09 Aug 2004 19:54:54 GMT
Leszek Gawron wrote:
> Is anybody interested in FreeMarker integration with cocoon? There is no 
> single word (Oh there are some freemarker occurences but they do not 
> stick to the subject) about FreeMarker on the cocoon-dev list. It is BSD 
> style licensed so there is no problem with shipping it with cocoon I think.

Never heard of it.

> To say the truth: there is NO good templating language to use with cocoon:
> 1) XSP is just a step ahead from JSP 1.2 and step back from JSP 2.0 
> (this is just a quick comment - I maybe wrong, anyway: XSP sucks)

Agree'd :)

> 2) Velocity is out of question right now - there is even no xml/html 
> escape utility so a newbie ends up with having a template that could 
> generate an invalid sax event stream.

Never used Velocity, so I can't speak from experience

> 3) JX Template generator is fine for simple cases but it lacks a lot of 
> functionality i.e.:
>    - control statements are very limited
>    - you cannot plug in external tag implementations - jx:macro is good
>      only for simple processing, you can do it only via a ugly "session
>      hack" (${cocoon.session.wikifyFunction( "--string--",
>               cocoon.consumer}), so it's very close to any extensions
>    - you cannot set attribues via something similar to xsl:attribute as
>      it is quite hard to implement (and might be inefficient)

The generator is also a huge piece of code, and I would probably never 
be able to confidently change something in there without fear of 
breaking something.

I'd also like to add to the list of gripes about JXT:
      - Confusing variable syntax: #{} vs ${}.  I know it's so we can 
use the different syntaxes to our liking, but if they're equivalent, 
why don't we just choose one and stick with it.  If they're not 
equivalent, then we have other problems ;)

> I would never be able to leave cocoon:
> - I cannot imaging my life without flowscript
> - cforms is the best implementation for form handling there is. period.

I agree.  I'm close to actually having a client who is willing to let 
me use Cocoon for their site... I can't wait.

> but the view generation is what really bugs me..
> If someone is interested I might try to implement freemarker integration 
> as the comparison to velocity looks promising:

I'm interested, and I think it's always worth a shot to be exploring 
new stuff.  Time for a FreeMarkerGenerator?



View raw message