Chris Smith said:
I say that because they both solve the same problems, and do so
sometimes in radically different ways. While it is possible to shoehorn
them into the same project, the result is a mass of confusion where no
one is ever quite sure which technology they ought to be using to
accomplish a goal. YMMV of course.
Limited Mileage ;-) but I have been reading the glossy brochures.
There does seem to be a lot of cross over but there are (from what I have
been told) significant differences ... so depending on the project it may be
a case of JSF or Struts, OR , it may be a case of JSF and Struts.
One thing I was interested in was for a new development initiative, why
would you choose to use Struts and JSF over just using JSF?
Craig McClanahan replied:
"In brief, it goes like this:
First, consider that one of the core values of Struts is routing all your
request processing through a common controller. This allows you to
centralize some aspects of your application's processing (typically useful
for things like authentication, logging, resource allocation, and so on)
that are valuable even when you're using JSF components as well. The
integration library hooks into Struts when a form submit occurs, the
standard Struts request processing lifecycle is invoked -- so you can gain
those same benefits if you need them, while letting pure view tier events
(like expanding or contracting a node in a tree control) happen without
bothering the rest of the application.
Second, as of today, Struts has two key add-on features that JSF (at least
with the standard set of components) by itself doesn't ... client side
validation (via the Validator Framework), and layout reuse (via the Tiles
framework). If you need these two capabilities, feel free to use the two
technologies together.
If none of that matters for your application -- in other words, if JSF
provides you enough application framework capability by itself -- it's
certainly simpler to learn and support one technology instead of two.
Just keep in mind that JSF was focused on the view tier, with enough hooks
so you could build application architectures on top of it, while Struts was
focused primarily on being the controller."
Cheers
Shane