Hi,

i'm pretty new to the Struts arena, but since you're looking for
general info i can lend my .02. ;)


On Tue, 21 Sep 2004 15:49:34 -0300, Felipe Victolla
<[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> I want to know the opinion of the another developers of this list with your
> experience in modelling the struts Action classes. What's the ideal point of
> Action classes granularity?
> 
> One approach is building one Action for each Use Case. Example:
> NewUserAction, EditUserAction, ListUserAction (for dealing with creation,
> listing and update of user data in an application). I like this approach
> because of the direct mapping from the use case models to java classes.
> Another approach is to build one class for each "operation": UserAction, for
> example. This action will be more complex than in the first approach, but we
> will have fewer action classes.
> 

i have been going with the first approach you mentioned.  to create a
separate action for each use case.  you do end up with quite a few
action classes following this approach (depending on your
application).  but they are always simple classes and easy to work
with.  i think (hope) this will make maintenance easier in the future.
i think i've only come across a couple posts that have mentioned it is
ok to put multiple actions in one class.  but these are usually
related actions (i.e. CRUD - create, read, update, delete) or actions
that have a lot of functionality in common.
but i don't really think there is a 'right' way or 'wrong' way.

HTH,
andy

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

Reply via email to