At 04:40 am 23-11-2002, you wrote:
The idea behind a Struts Action is that it suppose to give you a
place to call your business logic components. Rather than call
various business processes through a subclass, I continue the
decorator pattern by declaring the process to call as part of the
ActionMapping.

I then use a standard Action which automatically populates the
designed business bean and invokes the business process. The
business process returns a specialized result object that the
standard Action analyzes. The result object has properties that
can return messsages, data, and/or new routing instructions to the
Action.
Ted,

If the Action is truly generic, how do you avoid returning presentation-specific information in the result objects? e.g. A routing instruction would be something like a forward name . (Am I correct?)

If so, the business process "knows" about configuration in the struts-config.xml. Doesn't the presentation/business-tier boundary become blur? Isn't the business process now becoming an "extension" of an Action and part of the presentation-layer? (Consider: how to reuse this business process, say in Velocity, and still make use of its result object?)

Have I missed something?
--
John


Basically, I'm putting my business tier behind a facade, and using
the ActionMapping decorator to tell the standard Action which
operation to invoke. The facade provides a consistent interface
and minimizes what the Struts tier needs to know about each
operation.

-Ted.

11/22/2002 9:47:43 AM, Andre Beskrowni <[EMAIL PROTECTED]>
wrote:

>ok, this one sentence in ted's post caught my eye:
>
>> I rarely write custom Actions any more.
>
>whoah.  how is this possible?  most of our web pages represent
some sort of
>database operation: displaying, creating, updating, or deleting.
i can see
>how you can minimize the amount of code that would vary in
individual Action
>classes, but i don't see how could eliminate the need for
subclassing
>altogether.  maybe i'm just completely misunderstanding here.
could you
>elaborate on your process?
>
>thanks,
>
>ab
>
--
John Yu                       Scioworks Technologies
e: [EMAIL PROTECTED]         w: +(65) 873 5989
w: http://www.scioworks.com m: +(65) 9782 9610


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

Reply via email to