Jorge,
Just catching up some email.

Jorge Ribeiro Jordão wrote:

> Has anybody read Sun Java Center J2EE Patterns
> (http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/)
> yet ?
>
> For those that did, it seemed that Struts is pretty much an implementation
> of the "Front Controller" pattern (no surprises so far), using the
> "ServletFront", "Command and Controller", "Multiplexed Resource Mapping" and
> "Dispatcher in Controller" stategies.

You've done an excellent job of understanding this pattern and describing the
aspects of Struts it describes!

The one minor clarification is about the 'Dispatcher in Controller' strategy.
While I'm not a Struts expert, I believe that Struts uses a separate mapping
mechanism that sits outside of the controller servlet, does it not?

If the controller is delegating to an external component in order to do view
mgmt (ie:choosing the view) and navigation (ie:actually dispatching to that
view) then I probably wouldn't describe it as using the 'Dispatcher in
Controller' strategy. This strategy is meant to describe more simplistic cases
where the controller inlines the work itself, for example if it just grabs a
string and a requestDispatcher instance and forwards things on their way.

See the 'solution' section of the 'Service to Worker' pattern for a bit more
discussion on this issue. 'Service to Worker' is a pattern that combines a
couple other "smaller" patterns in the catalog into a larger one.

Let me know if I got anything wrong wrt to the discussion of Struts in this
email :-)
I'm interested in any other comments on this issue (or others related to any of
the Pattern material in the above URL - pls feel free to email the provided
aliases, if you'd like to discuss outside of this list).

Thanks,
Dan

>
>
> What do you think ?
>
> ----------
> This message may contain confidential information or privileged material,
> and is intended only for the individual(s) named. If you are not in the
> named addressee you should not disseminate, distribute or copy this e-mail.
> Please notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted, corrupted, lost, destroyed, arrive late or
> incomplete, or contain viruses.  The sender therefore does not accept
> liability for any errors or omissions in the contents of this message which
> arise as a result of e-mail transmission. If verification is required please
> request a hard-copy version.

--
Dan Malks                            Sun Java Center
Enterprise Java Architect            703.208.5794


Reply via email to