myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject Re: performance comparison between 1.1.5 and 1.2.2?
Date Wed, 30 Jan 2008 16:19:46 GMT
>> Is it better to use plain html tags (if possible) instead of jsf-tags
>> e.g. for images, divs etc when no EL expressions are used ?
> Yes, definitely. This is just a block of "verbatim" text, which is written out very efficiently.
Using a component to write the same text is much slower and gains nothing.
> And it looks nicer too..
I would not have answered if you would not have used the word
"definitely" ;-)

I'd prefer to use components only. With one exception, static texts -
but how many static texts do you have in an i18n enabled application :-)

Using components is just the base idea of JSF and in the long run I
think you are on the safe side using them.
For example, would you really write <img
src="#{context.contextPath}/to/my/image.png" /> ?
Looks really like in g'ol days with JSP, no?

Having <h:graphicImage src="/to/my/image.png" /> is not that much
longer, and saves you from the internals of the used servlet environment.

In the end it is all about personal preferences :-)


View raw message