Yuri,

Yuri de Wit wrote:
this is definetely very interesting! Do you know from your experience
how does it compare with FreeMarker in terms of rendering performance?

Performance wasn't a primary concern for me, however the parsing of the template file is cached so rendering is just a matter of walking the instruction tree and evaluating any EL expressions. XTC should theoretically be faster than JSF+Facelets since XTC renders directly to the output.


I was also curious to know whether xtc supports the dynamic 'weaving'
of templates. I basically have a hierarchy of pojo's and each pojo
class has a template that basically does not know about the other pojo
templates. As the pojo hierarchy is traversed the different and
independent templates are dynamically weaved together. FreeMarker
supports something like this with:

<#macro book>
  Book element with title ${.node.title}
    <#recurse>
  End book
</#macro>

Here the traversal of the containment hierarchy is abstracted away
from the template.

I'm not completely familiar with FreeMarker so I could be off on what your example is showing, but xtc supports recursion and the ui:decorate tag seems to parallel what a macro does. Creating tag-libs is also very easy either using a ui:composition based component or Java code.

Regards,
Michael.

Reply via email to