+1 (#3) --- "Mainguy, Mike" <[EMAIL PROTECTED]> wrote: > #2 and #3 are, to me, flip sides of the same coin. Our team is really > divided over which is better. Currently, we're using #3 and I personally > think it's the best way, but, the argument that has been made that it is > much simpler to understand the application if there is a 1 to 1 mapping and > developers can more readily see the flow of information in a class diagram. > The other advantage that has been proposed is that you can then use your > containers security mechanism to limit access based on Role without > resorting to custom code. > > My point of contention is that I don't want to have 4 classes for every > single screen (1 for Create, Read, Update, and Delete) plus 4 action > mappings... It may be ok for a simple system, but in a large system I can > see that becoming unmanageable very quickly. Not only that, but I tend to > make my apps very stateless, so, every single request needs to use the Read > operation so I end up with a bunch of duplicate code (i.e. Update and Create > also need to perhaps call read when they are done). > > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: Thursday, September 25, 2003 10:25 AM > To: [EMAIL PROTECTED] > Subject: RE: [Poll] action mappings > > > Thats what prompted me to vote for 2... > Why to have unnecessary have this case statement in every action? > > HAve the actions as simple handlers.Performing just simple atomic operations > and acting on whatever configuration they are provided to decide navigation > > Something like > > execute(){ > //Getdata from form bean > //validate(if automatic validation turned off or u have special validation > requirements) //model.getData or model.updateData //may be form.setData > return mapping.findForward("success"); } > > > And the voing results are wrong..I have seen 2 votes to #2 including > myself.. > > > -----Original Message----- > From: Mainguy, Mike [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 25, 2003 3:47 PM > To: 'Struts Users Mailing List' > Subject: RE: [Poll] action mappings > > > So far the results are as follows: > > #1 5 > #2 1 > #3 2 > #4 0 > > I added myself to both 1 and 3 as I've done a project both ways... Now I > wonder, how does everyone determine which operation you are doing? As a > parameter in the action mapping? A big case-style (if else) statement? > > -----Original Message----- > From: Mainguy, Mike [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 23, 2003 11:06 AM > To: [EMAIL PROTECTED] > Subject: [Poll] action mappings > > > I have yet another opinion poll for struts-user... > > What are folks currently doing for action mappings in relation to CRUD > operations? > Are you: > > #1 creating a unique Action mapping for each atomic operation > (potentially mapped to the same action class) > /createUser.do ->> UserAction.java > /readUser.do ->> UserAction.java > /updateUser.do ->> UserAction.java > /deleteUser.do ->> UserAction.java > > > #2 creating a unique Action mapping for each atmoic operation > with each action having a unique class > /createUser.do ->> CreateUserAction.java > /readUser.do ->> ReadUserAction.java > /updateUser.do ->> UpdateUserAction.java > /deleteUser.do ->> DeleteUserAction.java > > #3 creating an aggregate action class with a unique action mapping with > multiple operations and using form/request variable to accomplish CUD > /editUser.do ->> UserAction.java (?OP=Update, ?OP=Create, > ?OP=Delete) > /displayUser.do ->> UserAction.java > > > #4 creating an aggregate action class with a unique action mapping with > multiple operations > /editUser.do ->> EditUserAction.java > /displayUser.do ->> DisplayUserAction.java > > > Some other way (or a combination) ... > > > > 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] > > > 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] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > 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] >
__________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]