A
Arved Sandstrom
Arne Vajhøj wrote:
[ SNIP ]
I've read those criticisms too, and as far as JSF is concerned I have no
idea why people think it's "heavy". Who cares about how many classes are
actually in the API and in a typical implementation? More to the point
is what you actually need to master and use to get a typical
high-quality web application written, and in that sense JSF is quite
lightweight.
Having all those UI components is not heavyweight - they translate very
closely to HTML and often save labour.
The JSF lifecycle isn't bad - I suspect most people who complain about
it haven't taken the time to become very familiar with it.
If you have a problem with default forwarding by the Faces servlet,
specify <redirect/>. How tough is that? If you stick with forward, and
the browser can't find some resources for the new page (images etc),
then specify your HREFs correctly by using the context as well. How
tough is that?
Number of files you have to write yourself - when all is said and done
there aren't more than what you reasonably need. I don't care what
framework you use, you have to put logic somewhere, and JSF allows one
to organize this logic quite well.
XML config files - OK, I'll grant this can be a bit painful. But it's
always been relatively easy to write one's own navigation handler so
that you can dispense with navigation rules in faces-config.xml and
directly return views from action methods. As for specifying managed
beans, JSF 2.0 takes care of that problem with annotations.
I have to admit my view is coloured by using Facelets, as opposed to
JSPs. It's also influenced by the fact that I don't have to stick with
core JSF tags but have powerful 3rd party component libraries like
ICEFaces available.
AHS
[ SNIP ]
[ SNIP ]There has been a lot of criticism of Struts and JSF for being
to "heavy" (which is not a very welldefined term - is is number
of files in solution, size of API or just the presence of XML
config files?).
I've read those criticisms too, and as far as JSF is concerned I have no
idea why people think it's "heavy". Who cares about how many classes are
actually in the API and in a typical implementation? More to the point
is what you actually need to master and use to get a typical
high-quality web application written, and in that sense JSF is quite
lightweight.
Having all those UI components is not heavyweight - they translate very
closely to HTML and often save labour.
The JSF lifecycle isn't bad - I suspect most people who complain about
it haven't taken the time to become very familiar with it.
If you have a problem with default forwarding by the Faces servlet,
specify <redirect/>. How tough is that? If you stick with forward, and
the browser can't find some resources for the new page (images etc),
then specify your HREFs correctly by using the context as well. How
tough is that?
Number of files you have to write yourself - when all is said and done
there aren't more than what you reasonably need. I don't care what
framework you use, you have to put logic somewhere, and JSF allows one
to organize this logic quite well.
XML config files - OK, I'll grant this can be a bit painful. But it's
always been relatively easy to write one's own navigation handler so
that you can dispense with navigation rules in faces-config.xml and
directly return views from action methods. As for specifying managed
beans, JSF 2.0 takes care of that problem with annotations.
I have to admit my view is coloured by using Facelets, as opposed to
JSPs. It's also influenced by the fact that I don't have to stick with
core JSF tags but have powerful 3rd party component libraries like
ICEFaces available.
AHS