On 11/7/05, netsql <[EMAIL PROTECTED]> wrote:
> 1st, you can use Commons Chain in Struts 1.2.X. In 1.3 the request
> processor is done in Chain... but a user can't tell.
> You can use Commons Chain (a CoR pattern) outside of Struts.

For more about Commons Chain generally, see also

* http://struts.apache.org/struts-core/userGuide/preface.html#chain

I ported Chain to C# and use it as a business facade for my ASP.NET
applications.

In many ways, it's like using WebWork interceptors. Here's a quote
from WebWork in Action about Interceptors that also sums up my own
experience with using Commons Chain.

"{You are able to] modularize repeated code without having to build up
brittle class hierarchies of abstract parent [classes], delegating
part of the processing to the subclass after surrounding it with some
pre- and post-processing. The class hierarchy approach works fine for
small applications; but as the size and complexity of your application
grows, it becomes difficult to pull together the right class heirarchy
to provide to more optional services to your actions."

I use Commands like finely-grained services and use Chains to combine
the services into a transaction script for the action. Commands are
great for assembling UI pages. You can have a Command for each
drop-down list or other rich control, and chain them together to meet
the page's requirements. If controls come or go, it's easy to move
them in and out of a Chain configuration.

Likewise, if my business logic needs to do the equivalent of a "move",
I can chain a "copy" and "delete" Command together. If the copy fails,
the Chain terminates, and you can pass back a message in the Context.

HTH, Ted.
http://husted.com/poe/

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

Reply via email to