You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mainguy, Mike" <MM...@kmart.com> on 2003/09/23 17:05:43 UTC

[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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Poll] action mappings

Posted by Ted Husted <hu...@apache.org>.
I use ActionMappings to represent a use-case or client story, rather 
than an atomic operation. The form-bean and validator collect the data 
the story needs, and an Action passes those to the business layer, and 
return the outcome. The business layer class is specified as a parameter 
so that I can reuse the same standard Action for most stories.

So, I suppose my answer to this poll is I don't use ActionMappings for 
CRUD operations. I keep the CRUD crud between the business layer and the 
data access objects. Unless, of course, create/retrieve/update/delete 
were stories from the client's perspective :)

I imagine you've seen this, but ...

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg57843.html

The work on the Commons Chain is coming along nicely, and we should see 
some standard Command Actions showing up that just pass a context up the 
business layer and then pass it back to the presentation layer. So, 
before long, I suspect people will be talking less about Actions and 
more about business layer Commands and Command Chains.

-Ted.

Mainguy, Mike wrote:

> 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.

"Get Ready, We're Moving Out!!" - <http://www.clark04.com>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Poll] action mappings

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
#1

On 09/23/2003 05:05 PM Mainguy, Mike wrote:
> 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Poll] action mappings

Posted by atta-ur rehman <at...@numetrics.com>.
Yes. I did.

Frankly, I've failed to understand the role of both
ManagedResourceBaseAction and AuthenticatedManagedResourceBaseAction
actions! Are both these action extended from DispatchAction? and
CreateUserAction extended from one of these managed resources action? or I'm
completely lost?

I'd appreicate if you could explain it for me.

ATTA


----- Original Message ----- 
From: "James Mitchell" <jm...@apache.org>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, September 24, 2003 10:06 AM
Subject: Re: [Poll] action mappings


> Did you look at the attached text file?
>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 770.822.3359
> AIM:jmitchtx
>
>
>
> ----- Original Message ----- 
> From: "atta-ur rehman" <at...@numetrics.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, September 23, 2003 12:59 PM
> Subject: Re: [Poll] action mappings
>
>
> > hi james,
> >
> > could you please explain, for a struts newbie, what do you mean by
> >
> > <quote>
> > I'm using DispatchAction with 2 abstract base actions between my actions
> and
> > the dispatch action.  The first one has helper methods for functionality
> not
> > requiring authentication, and the second one (which extends the first)
> does
> > require authentication.
> > </quote>
> >
> > Thanks in advance!
> >
> > ATTA
> > ----- Original Message ----- 
> > From: "James Mitchell" <jm...@apache.org>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Tuesday, September 23, 2003 9:17 AM
> > Subject: Re: [Poll] action mappings
> >
> >
> > > #1 with a twist.
> > >
> > > I'm using DispatchAction with 2 abstract base actions between
> > > my actions and the dispatch action.  The first one has helper
> > > methods for functionality not requiring authentication, and
> > > the second one (which extends the first) does require authentication.
> > >
> > > By overriding the execute in the second one, it allows me
> > > additional base functionality (helper methods) and seamless
> > > session management in one place.
> > >
> > > I've attached a crude example of what I mean.
> > >
> > > --
> > > James Mitchell
> > > Software Engineer / Struts Evangelist
> > > http://www.struts-atlanta.org
> > > 770.822.3359
> > > AIM:jmitchtx
> > >
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Mainguy, Mike" <MM...@kmart.com>
> > > To: <st...@jakarta.apache.org>
> > > Sent: Tuesday, September 23, 2003 11:05 AM
> > > 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: struts-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> >
>
> --------------------------------------------------------------------------
> --
> > ----
> >
> >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Poll] action mappings

Posted by James Mitchell <jm...@apache.org>.
Did you look at the attached text file?


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
770.822.3359
AIM:jmitchtx



----- Original Message ----- 
From: "atta-ur rehman" <at...@numetrics.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, September 23, 2003 12:59 PM
Subject: Re: [Poll] action mappings


> hi james,
>
> could you please explain, for a struts newbie, what do you mean by
>
> <quote>
> I'm using DispatchAction with 2 abstract base actions between my actions
and
> the dispatch action.  The first one has helper methods for functionality
not
> requiring authentication, and the second one (which extends the first)
does
> require authentication.
> </quote>
>
> Thanks in advance!
>
> ATTA
> ----- Original Message ----- 
> From: "James Mitchell" <jm...@apache.org>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, September 23, 2003 9:17 AM
> Subject: Re: [Poll] action mappings
>
>
> > #1 with a twist.
> >
> > I'm using DispatchAction with 2 abstract base actions between
> > my actions and the dispatch action.  The first one has helper
> > methods for functionality not requiring authentication, and
> > the second one (which extends the first) does require authentication.
> >
> > By overriding the execute in the second one, it allows me
> > additional base functionality (helper methods) and seamless
> > session management in one place.
> >
> > I've attached a crude example of what I mean.
> >
> > --
> > James Mitchell
> > Software Engineer / Struts Evangelist
> > http://www.struts-atlanta.org
> > 770.822.3359
> > AIM:jmitchtx
> >
> >
> >
> > ----- Original Message ----- 
> > From: "Mainguy, Mike" <MM...@kmart.com>
> > To: <st...@jakarta.apache.org>
> > Sent: Tuesday, September 23, 2003 11:05 AM
> > 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: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>
> --------------------------------------------------------------------------
--
> ----
>
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Poll] action mappings

Posted by atta-ur rehman <at...@numetrics.com>.
hi james,

could you please explain, for a struts newbie, what do you mean by

<quote>
I'm using DispatchAction with 2 abstract base actions between my actions and
the dispatch action.  The first one has helper methods for functionality not
requiring authentication, and the second one (which extends the first) does
require authentication.
</quote>

Thanks in advance!

ATTA
----- Original Message ----- 
From: "James Mitchell" <jm...@apache.org>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, September 23, 2003 9:17 AM
Subject: Re: [Poll] action mappings


> #1 with a twist.
>
> I'm using DispatchAction with 2 abstract base actions between
> my actions and the dispatch action.  The first one has helper
> methods for functionality not requiring authentication, and
> the second one (which extends the first) does require authentication.
>
> By overriding the execute in the second one, it allows me
> additional base functionality (helper methods) and seamless
> session management in one place.
>
> I've attached a crude example of what I mean.
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 770.822.3359
> AIM:jmitchtx
>
>
>
> ----- Original Message ----- 
> From: "Mainguy, Mike" <MM...@kmart.com>
> To: <st...@jakarta.apache.org>
> Sent: Tuesday, September 23, 2003 11:05 AM
> 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: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Poll] action mappings

Posted by James Mitchell <jm...@apache.org>.
#1 with a twist.

I'm using DispatchAction with 2 abstract base actions between
my actions and the dispatch action.  The first one has helper
methods for functionality not requiring authentication, and
the second one (which extends the first) does require authentication.

By overriding the execute in the second one, it allows me
additional base functionality (helper methods) and seamless
session management in one place.

I've attached a crude example of what I mean.

--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
770.822.3359
AIM:jmitchtx



----- Original Message ----- 
From: "Mainguy, Mike" <MM...@kmart.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, September 23, 2003 11:05 AM
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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

Re: [Poll] action mappings

Posted by Sgarlata Matt <sg...@bah.com>.
#3 - almost all of my actions descend from DispatchAction
----- Original Message ----- 
From: "Mainguy, Mike" <MM...@kmart.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, September 23, 2003 11:05 AM
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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Poll] action mappings

Posted by Timo Neumann <ne...@ff-muenchen.de>.
Mainguy, Mike wrote:

I started with #1 but then switched to #2.
As this is my first big struts project I might be wrong but I had the
impression that #2 would be preferrable because with #1 I would have to 
repeat the action mapping as a string in my action classes.
I saw that most of the respondents went with #1 so I wonder why they 
prefer it?

cheers,

Timo

> 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) ...

-- 
F&F Computer Anwendungen        Tel: +49 89 51727-352
und Unternehmensberatung GmbH   Fax: +49 89 51727-111
Westendstr. 195                 Mail: t.neumann@ff-muenchen.de
D-80686 Muenchen                http://www.ff-muenchen.de


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org