myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Werner Punz <werner.p...@gmail.com>
Subject Re: Another approach to the templating problem
Date Mon, 06 Oct 2008 13:24:45 GMT
Andrew Robinson schrieb:
> Think I worded this too strongly, as renderers also produce HTML via
> Java. I just think that if you are going to have templates, it would
> be great to keep them in separate files, be it *.vm for velocity or
> xhtml/xml for facelets/JSF2 or what have you. These files can not only
> be edited by some tools (at least facelets can, not so sure about
> velocity), but they can also be changed on the fly without any java
> recompilation. Java went away from servlets building HTML for this
> reason and adopted JSP. I personally do not feel that going back to
> more Java built HTML is going to be a great direction, but maybe that
> is just me.
> 
Well you talk about an interpreter vs compiler approach.
The main issue is here, that we have tried the interpreter approach and 
it falls short on the speed on component level due to the set of code 
emitted which is not very much. (Most of the  code is usually 
externalized anyway in javascript and css files)

So if you want to gain the speed you have to achieve on component level
you have to go through the compiler approach, so a recompile step at 
least on component -> java level is probably needed.

Facelets works on interpreter level, but it only is as fast as it is, 
because it can target huge parts of the page and hence can cache 
extensively.
The typical component however has only a handful of lines of generated code.

I have not looked at the latest jsf2 spec in this regard, but I rather 
doubt they went the interpreter route. Can anyone clarfy this?

Werner


Mime
View raw message