Re: Placement of Application Logic

2006-10-05 Thread Ted Husted
In Struts 1, we do try to push as much logic as possible into helper classes or business delegates, so that the logic can be tested outside of the container. A good tipping point is whether the logic would make any sense at all outside of the Struts API. If so, then it makes sense to push it

Re: Placement of Application Logic

2006-10-05 Thread Asad Habib
Hello Ted. Thanks for your response. Is there a design pattern that incorporates these helper classes? Would it be sufficient for me to call this class an action helper? The concept of a business delegate does not apply in this case since the code in question is not related to a business

Placement of Application Logic

2006-10-04 Thread Asad Habib
I have a Struts action which extracts field values from the request object and then uses these values to set the name of a file which the application reads from. The code responsible for forming the file name currently resides in the action. Is this the best place to put it? This code cannot

Re: Placement of Application Logic

2006-10-04 Thread Frank W. Zammetti
That doesn't sound too egregiously wrong to me... generally speaking, the code in a Struts Action should basically fall in one of two categories (or both): flow control and/or data marshalling. Some also say validation should go in the Actions, but I'm going to put that debate aside for the