On 3/16/06, James Mitchell <[EMAIL PROTECTED]> wrote:
>
> What if   <--- dangerous I know!
>
> What if there existed a JSF 1.2 implementation built with WW2 at the
> core?
>
> I'm definitely not an expert with either JSF or WW2, however, I've
> looked at both just enough to be convinced that it is possible.  WW2
> has everything I already love about Struts and it even comes with
> basic support for components, full Spring integration, etc, etc.
>
> Am I just crazy or what?  Would that not let everyone have their cake
> and eat it too?


It is probably possible to do this, but depending on what parts of WW2 you
want to leverage, it's also probably working too hard.

To me, the coolest part of WW2 (and the part of the merger will help Struts
1.x users the most) is the way that XWork is used inside to build up an
interceptor chain that customizes the behavior of each request.  This can be
done (if I'm understanding WWiA correctly :-) either locally or globally.

It turns out that you can do that on top of JSF as it is today, pretty
easily.

* For global interceptors, use a servlet filter similar to what Shale
already
  does with a global Commons Chain for pre-process and post-process
behaviors.
  (There might be some issues I haven't explored yet because a filter
  separates the pre and post processing.)

* For local interceptors, JSF lets you override the "default action
listener" ...
  the gadget that actually calls your action's execution method when a
submit
  happens.  It's pretty straightforward to implement a custom listener that
looks
  up an appropriate XWork definition and wraps the call to the action.

It's much easier to use extension points built in to the architecture than
replace the whole implementation :-).

Side note -- you know the way that WW2 lets you combine the Struts notions
of Action and ActionForm into a single class?  JSF does that already too
:-).


--
> James Mitchell


Craig

Reply via email to