There's also the situation where you call the business layer command, but it fails, so you branch to another page. Given this sort of thing, it can be easier to setup a Maverick command for each page, and then let its controller call whatever command-chains are needed to prepare the web context.
The business operation command-chains might even shared among web and non-web applications, or even with services that have no visual component, and might even be kept it a separate catalog. So, I would suggest using separate chains, and even separate controllers.
HTH, Ted.
Jaap van Hengstum wrote:
hi,
I'm in the process of converting my custom chain code to an implementation using the Commons Chain package (thanks Ted for bringing this package to my attention). Since other people are probably doing similar things, I have a question about a implementation detail.
The question is this: a distinction can be made between commands that call some piece of business logic and commands that only act as a "filter" on the web context. Most of the time (I guess) a controller first executes all the filter commands and then one or more business commands. Should this distinction also be made in the controller (even if it is mostly a conceptual distinction)? That is, should the controller process two distinct chains, one containing filter commands and one containing business commands or just one chain, containing both filter commands and business commands?
I was wondering what other people's thoughts were about this.
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]
