Re: [S2] Design patterns

2007-06-11 Thread Sami Dalouche
Hi, I personally : 1] Do NOT use inheritance, besides ActionSupport that provides the basic methods (getText, ..) to work with Struts2. 2] Group all methods of a form inside the same Action. Usually, I need the same code to prepare the input and the validation of the form, so why would I bother

Re: [S2] Design patterns

2007-06-11 Thread Kyle Adams
meeboo wrote: > > Do you create an action class (e.g. UserAction.java) for all User actions, > or do you separate them into UpdateUser.java/CreateUser.java etc...? > I am also interested in the community's thoughts on this question. On one hand, having an action class for each use case tends

Re: [S2] Design patterns

2007-06-11 Thread Jeromy Evans
I agree with Guru. After you've gained familiarity with S2, you need to consider about what's appropriate for the particular use-cases and business/domain model. As soon as you start repeating yourself in your action/view code you know its time to refactor. Here's some of my approaches: - For

RE: [S2] Design patterns

2007-06-11 Thread Raghupathy, Gurumoorthy
It all "Depends" If the business logic for each operation (CRUD) is complex then better use 1 jsp and one action. Otherwise go for the other one (one class which handles all CRUD operations) . However If you have designed and developed your business layer very well then either