Using your example, I have ProjectAction.class which extends from DispatchAction (or 
you may find LookupDispatchAction more appropriate).  I think this is good for 
performance reasons because only a single action class needs to be cached instead of 
4.  Also, as you pointed out, it may be easier to maintain a single action class 
instead of 4 with such similar functionality.

Hope this helps,

Matt
----- Original Message ----- 
  From: Mainguy, Mike 
  To: [EMAIL PROTECTED] 
  Sent: Monday, August 11, 2003 11:45 AM
  Subject: Struts design consideration


  Hello fellow struts-users.  

  I have a quick question.  In what manner is everyone mapping their actions?  



  Do you have multiple actions per action class or just one action per action class.

  We're working on a demo application and extension framework, but are rather 
undecided on whether to make each possible atomic action it's own class, or provide a 
mechanism to embed (sub)actions in the form data to ease the proliferation of classes 
and mappings that the other way would seem to cause.



  I.E. do you have 

  ProjectCreate.class

  ProjectRead.class

  ProjectUpdate.class

  ProjectDelete.class



  Or do you have

  ProjectAction.class

  (with a mapping mechanism to map the various functions to what you're doing with 
your project).





  I understand that the former is rather the direction that struts is probably best 
suited for, but it seems to have a high potential to make maintenance a nightmare (or 
more nightmarish).













  This message and its contents (to include attachments) are the property of Kmart 
Corporation (Kmart) and may contain confidential and proprietary information. You are 
hereby notified that any disclosure, copying, or distribution of this message, or the 
taking of any action based on information contained herein is strictly prohibited. 
Unauthorized use of information contained herein may subject you to civil and criminal 
prosecution and penalties. If you are not the intended recipient, you should delete 
this message immediately.





------------------------------------------------------------------------------


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

Reply via email to