Joe Germuska wrote the following on 2/18/2005 5:37 PM:

Well, I think you're blurring things here. When I talk about "http-free" components, I'm talking about your business logic, not your controllers (actions or commands).

But for most developers, the business logic usually is already self contained somewhere else (hopefully we don't still don't see people coding JDBC from within their actions:). So for example, in an Action method someone might do:


someClass.doUpdate( employeeValueOject )

the SomeClass instance handles the business logic of doing the update.

What I seem to be seeing in the examples of CoR and Struts is the removal of the Action class and instead using a chain of Commands. This is fine and I like the idea because it does allow for the concept of coding pre and post processors without IoC, but I still each of them having a lot of ties to the Servlet model. For example, maybe before leaving all of the typical CRUD events you need to call a populate Command that will populate your Request with some needed Lists for drop downs. No longer do you have to remember to make sure to include the "populate(..)" method call in each of your dispatch methods since you could just add that to the end of the chain.

I'm just wondering if someone could provide some more examples of possible real world benefits of the CoR used to replace Actions. I can see the standard chain looking like...

-somePreCommand (probably does your initially logging)
-someActionCommand (replaces the meat of your Action dispatch method)
-somePostCommand (maybe ensures some things are put into Req scope)

I'd be curious on seeing some other examples of the possible Commands you would likely see in a typical web app? Thanks again for any additional light.

--
Rick

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



Reply via email to