souravm wrote:
Regarding going for JSF due to componentization, I'm again not sure what additional componentizations JSF does compared to struts.

JSF is inherently a component-based framework, meaning you aren't really thinking in terms of pages, your thinking in terms of components of a "view". Struts doesn't really offer this, although S2 gets closer to it in many ways (and yes, there's some JSF support in S2 is you want it, although I'm not too familiar with it myself).

> Apart from the fact that JSF does not need a layer like Action Classes, all other components (validator, managed bean, html tag libs etc.) are already there in Struts. May be I'm missing something here.

I think your looking at the pieces and comparing them rather than looking at the overarching paradigm of one framework vs. the other. The distinction has been diminished a bit with S2, but it's still there.

A component-based approach means your looking at individual elements that make up a a particular view and thinking in terms of the interactions the user can have with each. You don't think in terms of state transitions, you think in terms of events.

With Struts, it's about state transitions. The user submits a form and transitions to a new application state entirely. I'm throwing AJAX out of this for the moment of course :)

Also, I'm yet to appreciate the real value add event handling mechanism of JSF can bring in a web application scenario.

It's the ease, in theory, that it provides, and the fact that your inherently thinking along those lines, rather than shoe-horning it in. That's the value-add IML (in theory!)

> Especially given the fact that all those events (associated with a single http request) would be fired only in a sequential way at server side.

I'm not quite sure what you mean by that...

>
I really cannot think a usage scenario of multiple event handler feature of JSF. Even in case of RIAs, I believe what is more required feature is dynamic loading of part of a html page (which is currently the space where AJAX is becoming popular). So any further explanation/example on how you have found this feature of JSF to be useful for RIAs would be helpful for me to understand your point.

It's not just about partial page loads, although that's clearly a big part of it. As I was describing before, it's more about the approach to developing the application.

Are you familiar at all with Visual Basic? If so, let me try and make this analogy... working with JSF is more akin to developing in VB than in Struts because your creating a given view that is a collection of components, and then determining what events each component can trigger, and coding for them. When you write a VB app, you aren't typically thinking in terms of this form leads to that form which leads to another form (unless your talking a wizard flow, but that's a specialized case). With Struts, it's always about a transition from one view to another, from one form to another in VB, triggered by some user input (again, putting AJAX aside for the moment). The VB paradigm, is frankly more logical to most developers. It's more like Swing too if you think about it.

Now *with* AJAX in the mix, and with client-side component libraries coming fast and furious, a lot of what made JSF potentially attractive has, again IMO, been significantly diminished. People have realized that you don't need the full JSF stack, so to speak, and you can do components without JSF too, so maybe it's not as valuable. Now, JSF still provides value there because it gives you a standardized component model, something that is sorely lacking in client-side component libraries these days (i.e., Dojo widgets and YUI widgets and APT widgets aren't generally compatible, and certainly aren't designed to some common pattern).

That's kind of what's happened in Struts land too... there's been a bit of a melding of the component paradigm and the non-component paradigm, largely with AJAX as the catalyst.

Regards,
Sourav

Frank

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to