difference between struts and jsf

hi which one you have to prefer and why? Please helpon thisThanks,Vijay
[107 byte] By [vijay.mandapatia] at [2007-11-27 7:40:41]
# 1
You are under no obligation to prefer either
georgemca at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 2
difference between car and narwhal.
jwentinga at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 3
Both smell funny
quittea at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 4
hi both are based on mvc pattern..
kumartnja at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 5
> hi both are based on mvc pattern..That's a similarity, not a difference
georgemca at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 6
Both are based upon MVC desig pattern.Difference is using JSF framework we can design UI layer easily.We can create GUI based application in jsf. Is it correct? otherwisegive me a suggestion.
SARAV_RSa at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 7

Java Server Faces technology is used for buiding UI for web applications.

The core value of the Struts framework is the Controller and the simplicity of customizing the Controller to suit your needs. Struts provides basic UI creation utilities via JSP tag libraries.

Struts and JSF technology work together.

The JSF JSP elements are far more advanced than the basic Struts JSP elements.

The Struts Layout tag library contains advanced JSP elements, similar to JSF.

JSF technology and three-tier applications using Business delegates and loosely coupled business objects do not go together.

GhostRadioTwoa at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 8
Hai Vijay.Struts is liek dosa and JSF is liek aloo parantha.okey?
filestreama at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 9

> Hai Vijay.

>

> Struts is liek dosa and JSF is liek aloo parantha.

>

> okey?

Now I'm not making fun of our brown friends here, but can someone recast that explanation, using only items that can be purchased at a Kentucky Fried Chicken, so that I can understand it better?

Hippolytea at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 10
Okay. Struts is like wings and JSF is like mashed potatoes with gravy.
DrClapa at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 11

> > Hai Vijay.

> >

> > Struts is liek dosa and JSF is liek aloo

> parantha.

> >

> > okey?

>

> Now I'm not making fun of our brown friends here, but

> can someone recast that explanation, using only items

> that can be purchased at a Kentucky Fried Chicken, so

> that I can understand it better?

Brown friends? I prefer to think of myself as "melanin-enhanced" and others as "melanin-challenged." Nonetheless, Struts can be thought of a Kentucky Fried Chicken whereas JSF is one pound of fresh, boneless chicken and a bottle of barbeque sauce.

How's that? ;-)

filestreama at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 12
> Okay. Struts is like wings and JSF is like mashed> potatoes with gravy.So they go well together? Is there anyway to download them together in a value meal? You know, like a thali?
Hippolytea at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 13
> ...with gravyDon't you poutine eaters think of anything else other than gravy? ;-)
filestreama at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 14
OMFG'splosion! ^_^I am laughing so fukking hard that I about pee'd myself!
maple_shafta at 2007-7-12 19:21:13 > top of Java-index,Java Essentials,Java Programming...
# 15
> Hai Vijay.> > Struts is liek dosa and JSF is liek aloo parantha.> > okey?Jar Jar Binks?
maple_shafta at 2007-7-21 22:19:02 > top of Java-index,Java Essentials,Java Programming...
# 16
> > Hai Vijay.> > > > Struts is liek dosa and JSF is liek aloo> parantha.> > > > okey?> > Jar Jar Binks?No, Yasmine Bleeth. Today is her birthday.
filestreama at 2007-7-21 22:19:02 > top of Java-index,Java Essentials,Java Programming...
# 17
> No, Yasmine Bleeth. Today is her birthdayA perfect moment to post some Baywatch stills, but Sun has shut down that loophole. ;-(All because Poopypants inflicted some ber pwnage on these forums.
Hippolytea at 2007-7-21 22:19:02 > top of Java-index,Java Essentials,Java Programming...
# 18

> > No, Yasmine Bleeth. Today is her birthday

>

> A perfect moment to post some Baywatch stills, but

> Sun has shut down that loophole.

>

> ;-(

>

> All because Poopypants inflicted some ber pwnage on

> these forums.

I created a new thread called, "thank you pooperscooper" whose first message body was "for fcking up the forums" but then decided not to hit the post button.

filestreama at 2007-7-21 22:19:02 > top of Java-index,Java Essentials,Java Programming...
# 19
thank you very much
vijay.mandapatia at 2007-7-21 22:19:02 > top of Java-index,Java Essentials,Java Programming...
# 20

In case of Struts user interface can be HTML, JSP, velocity templates etc. which is having limitations. JSF overcome on this limitation by expanding AWT and Swing value of user interface component model which provide rich UI model

Advantages:

Clearly partition view tire requirements

Encapsulate complex behavior in simple components

Leverage parent-child relationship

Component can fire server side event

Components can arrange in a tree so they can take the responsibility for processing their children (input/output)

In struts, no event processing model except handling form submitsexecute(), on other hand in JSF uses standard JavaBeans event model. In JSF event listener is registered on components and components can fire events for interesting thing.

In struts, rendering has limitations

HTML tags render only HTML

HTML tags work only in HTML pages

On other hand JSF splits the responsibility for the rendering

Performed by separate renderer

Renderer kits can register renderers for differnet markup language

In Struts their is limitation on view representation strategy, only JSP is supported, although third party add-on alternative exist, while JSF supports alternative view technologies

Support for JSP available in nearly all libraries

ViewHandler extension API for alternatives:

Facelets <https://facelets.dev.java.net>

Shale Clay <https://shale.apache.org/shale-clay>

SVG, Xforms...

In Struts, a limited pulls model is supported, on other hand JSF components extend binding approach i.e. JSF can bind any component property, not just a value

Struts create ActionForm beans on demand when processing a form submit, while JSF generalizes this concept which create any bean on demand, in any scope.

In struts page navigation, based on ActionForward() returned by calling Action.excecute() method while in JSF navigation decision based on 3 criteria

Current view (same as Struts)

Value returned from action method (String)

Which action method was invoked?

Can be simulated with Struts DispatchAction

In struts, generally use of Form bean and action per page

Form bean properties are generally strings

Form beans generally stored in request scope

Form beans must extend ActionForm

Action classes are singletons

Must be thread safe

Action responsible for conversion and pushing

data to the model tier

In JSF,

Generally have a backing bean per view

No required base class or implemented interface

Typically are managed beans for easy creation

Typically stored in request scope

Can use backing bean properties for request state

or binding component instances

Components do conversion to model types

With bindings, push to model can be automatic

In struts request processing lifecycle requests are run through an instance of RequestProcessor. In JSF all request run through an configured instance of lifecycle which is more flexible in performance point of view

kiransonajea at 2007-7-21 22:19:02 > top of Java-index,Java Essentials,Java Programming...