You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tiles.apache.org by Antonio Petrelli <an...@gmail.com> on 2009/02/20 14:16:50 UTC

Strange effect on JSP and FreeMarker support

Hi all
This is not a problem, but a strange effect that I noticed when I
developed FreeMarker support and refactored JSP support.
I created a new module called "tiles-template" that contains all the
common code between JSP and FreeMarker. It is real "common code"
because, with few exception (namely InsertContainerTag,
SetCurrentContainerTag, DestroyContainerTag) all the
technology-specific code is essentially an "interface" to the
"tiles-template" code.
In other words, JSP tags attributes and FreeMarker parameters (in the
parameters map) are converted into parameters of the "tiles-template"
classes, that are simple stateless POJOs with lots of parameters.

In other words, Tiles JSP tags and FreeMarker directives have *zero*
logic (considering the exceptions above).
I hope that this effect will be observed when developing the Velocity
support, because this will mean that tags/directives can be generated
automatically in some way. Intriguing IMHO :-)

Thoughts?

Ciao
Antonio

Re: Strange effect on JSP and FreeMarker support

Posted by Nathan Bubna <nb...@gmail.com>.
That's a good thing.  I'm impressed. I think you'll find it similarly
easy to support Velocity, whether through Tools or custom directives.
Personally, i think a TilesTool is likely to be simplest.

On Fri, Feb 20, 2009 at 5:16 AM, Antonio Petrelli
<an...@gmail.com> wrote:
> Hi all
> This is not a problem, but a strange effect that I noticed when I
> developed FreeMarker support and refactored JSP support.
> I created a new module called "tiles-template" that contains all the
> common code between JSP and FreeMarker. It is real "common code"
> because, with few exception (namely InsertContainerTag,
> SetCurrentContainerTag, DestroyContainerTag) all the
> technology-specific code is essentially an "interface" to the
> "tiles-template" code.
> In other words, JSP tags attributes and FreeMarker parameters (in the
> parameters map) are converted into parameters of the "tiles-template"
> classes, that are simple stateless POJOs with lots of parameters.
>
> In other words, Tiles JSP tags and FreeMarker directives have *zero*
> logic (considering the exceptions above).
> I hope that this effect will be observed when developing the Velocity
> support, because this will mean that tags/directives can be generated
> automatically in some way. Intriguing IMHO :-)
>
> Thoughts?
>
> Ciao
> Antonio
>