This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Advantages of JSF over struts..

 
pulijala hari
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can any one tell me what advantages JSF brings over Struts.
I am really not feeling comfortable with the Event driven coding in JSf..,
Is it really an edge over Struts..
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll just point out two

1. JSF is a specification/standard, Struts is not.
2. JSF Spec Lead is the guy who created Struts. And did so trying to fix what he did wrong in Struts.

Mark
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mark Spritzler:
I'll just point out two

1. JSF is a specification/standard, Struts is not.
2. JSF Spec Lead is the guy who created Struts. And did so trying to fix what he did wrong in Struts.

Mark


So will he eventually fix what he did wrong in JSF? ;)
 
Gabriel Claramunt
Ranch Hand
Posts: 375
Monad Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll point to another 2:
(AFAIK, I don't have too much experience with Struts)
1) JSF lifecycle is not tied to the request-response cycle
2) You can map screen components to individual beans, in Struts you have to map to the Form class.

(please correct me if I'm wrong)
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Gregg Bolinger:


So will he eventually fix what he did wrong in JSF? ;)


We hope so. Especially if you have to dynamically build your JSFUI Tree from code.

Mark
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17620
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To be precise, the #1 advantage of JSF over Struts is that it takes something like 5 Struts source files to do what JSF can do in 2, and the JSF source files are simpler - few special functions, no magic classes to extend or interfaces to implement.

It's also more of a "pure" MVC architecture than Struts, although true MVC is architecturally impossible under HTTP. Not that purity is in and of itself a virtue, but it does make it easier to understand what's supposed to be going on.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic