Dakota Jack wrote:
<snip />
How are you going to allow IoC dependency injection and build on the
backbone of commons-chain? Those seem to be inherently incompatible.
Isn't the chain necessary only where you use a Template-Method Pattern
rather than a Strategy Pattern, as the recommended relationship
between the view and the controller by GoF, and accordingly have IoC
problems?
In Struts Ti, they are used for two entirely different purposes:
commons-chain is used when it needs to define a business process in a
flexible, extendable manner (do this, then do this, then this, etc), and
Spring when I want to abstract the creation of objects from the code
(provide a Servlet-specific implementation without the target code
knowing or caring). Commons-chain is important as it lets the developer
inject code into Ti processes or handle a decision differently. Spring
lets me load an entirely different object set based on environment
(servlet, portlet, etc) so I can keep the core clean of platform
dependencies.
In Struts 1.3, we use one big chain commons-chain (two if you include
the exception handling) to handle the request, but in Ti, I'm looking
into using smaller, single-purposed chains to abstract key decisions
like Action creation to allow Ti to ship with support for WebWork
actions, Page Flow controllers, or classic Struts Actions, yet the
developer can easily add chain commands to add support for their
preferred Action implementation.
Don
At this point, the project site, code, and more detailed design
discussions are on my personal server:
https://www.twdata.org/projects/struts-ti
This looks promising. I will be following with a lot of interest. Good show!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]