Re: deprecated perform method in Action means roll your own Command Pattern

2002-10-25 Thread David Graham
I don't have that book so I can't reference it but the basic command pattern 
states that commands know how to execute themselves.  So, the Struts Action 
class is an implementation of this pattern.  Each Action just knows how to 
execute one command like SavePersonAction puts a person in a database.

BRW, the perform method was deprecated to allow declarative exception 
handling.

David






From: Tony Baity <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: deprecated perform method in Action means roll your own 
Command Pattern
Date: Fri, 25 Oct 2002 04:55:55 -0700 (PDT)


David,
Perhaps I misinterpreted the UML for command pattern as is shown in 
"Applied Java Patterns" by Sun. I was assuming that the Action class was a 
combination of the aCommand:Command and the :Receiver on page 52 and 
herefore contained both the execute() and the doAction() (AKA perform).
-Tony

 David Graham <[EMAIL PROTECTED]> wrote:I'm not sure what you mean 
by all that. The perform method was just
replaced by execute so it's still an implementation of the command pattern.
Perform now just wraps a call to execute to maintain backward compatibility
but I imagine it will be removed in later versions.

David



>From: Tony Baity
>Reply-To: "Struts Users Mailing List"
>To: Struts Users Mailing List
>Subject: deprecated perform method in Action means roll your own Command
>Pattern
>Date: Thu, 24 Oct 2002 18:13:40 -0700 (PDT)
>
>
>Hello,
>Just got back on the list again... man is it busy here
>hey... about the command pattern that appears to be disappearing from the
>Action class... do we roll our own now just using Action as a base class?
>I really like that combined execute and perform functionality... so that 
I
>can weed out common (background) functionality between Action classes and
>keep the size of the individual Action subclasses down to a minimum... 
and
>also perhaps put common initialization in an init() method (which is in 
the
>execute method just above the execution of the perform)
>So... judging from the deprecation that I now (guess its been there for a
>while but just haven't looked) find in the Action class there will be a 
day
>when the perform method is GONE! Also, the example Actions now (BTW when
>did this change) override the execute not the perform. Are command 
patterns
>then considered part of the business logic?
>... if so, then I am confused since I have always considered the Action
>classes borderline business logic since they basically hold the steps of 
a
>transaction.
>-Tony ( I think the really cool people now hang out in the Commons user
>group)
>
>
>
>
>-
>Do you Yahoo!?
>Y! Web Hosting - Let the expert host your web site


_
Broadband? Dial-up? Get reliable MSN Internet Access.
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail:
For additional commands, e-mail:



-
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site


_
Internet access plans that fit your lifestyle -- join MSN. 
http://resourcecenter.msn.com/access/plans/default.asp


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



Re: deprecated perform method in Action means roll your own Command Pattern

2002-10-25 Thread Tony Baity

David,
Perhaps I misinterpreted the UML for command pattern as is shown in "Applied Java 
Patterns" by Sun. I was assuming that the Action class was a combination of the 
aCommand:Command and the :Receiver on page 52 and herefore contained both the 
execute() and the doAction() (AKA perform).
-Tony
 
 David Graham <[EMAIL PROTECTED]> wrote:I'm not sure what you mean by all that. 
The perform method was just 
replaced by execute so it's still an implementation of the command pattern. 
Perform now just wraps a call to execute to maintain backward compatibility 
but I imagine it will be removed in later versions.

David



>From: Tony Baity 
>Reply-To: "Struts Users Mailing List" 
>To: Struts Users Mailing List 
>Subject: deprecated perform method in Action means roll your own Command 
>Pattern
>Date: Thu, 24 Oct 2002 18:13:40 -0700 (PDT)
>
>
>Hello,
>Just got back on the list again... man is it busy here
>hey... about the command pattern that appears to be disappearing from the 
>Action class... do we roll our own now just using Action as a base class?
>I really like that combined execute and perform functionality... so that I 
>can weed out common (background) functionality between Action classes and 
>keep the size of the individual Action subclasses down to a minimum... and 
>also perhaps put common initialization in an init() method (which is in the 
>execute method just above the execution of the perform)
>So... judging from the deprecation that I now (guess its been there for a 
>while but just haven't looked) find in the Action class there will be a day 
>when the perform method is GONE! Also, the example Actions now (BTW when 
>did this change) override the execute not the perform. Are command patterns 
>then considered part of the business logic?
>... if so, then I am confused since I have always considered the Action 
>classes borderline business logic since they basically hold the steps of a 
>transaction.
>-Tony ( I think the really cool people now hang out in the Commons user 
>group)
>
>
>
>
>-
>Do you Yahoo!?
>Y! Web Hosting - Let the expert host your web site


_
Broadband? Dial-up? Get reliable MSN Internet Access. 
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



-
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site


Re: deprecated perform method in Action means roll your own Command Pattern

2002-10-24 Thread David Graham
I'm not sure what you mean by all that.  The perform method was just 
replaced by execute so it's still an implementation of the command pattern.  
Perform now just wraps a call to execute to maintain backward compatibility 
but I imagine it will be removed in later versions.

David



From: Tony Baity <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: deprecated perform method in Action means roll your own Command 
Pattern
Date: Thu, 24 Oct 2002 18:13:40 -0700 (PDT)


Hello,
Just got back on the list again... man is it busy here
hey... about the command pattern that appears to be disappearing from the 
Action class... do we roll our own now just using Action as a base class?
I really like that combined execute and perform functionality... so that I 
can weed out common (background) functionality between Action classes and 
keep the size of the individual Action subclasses down to a minimum... and 
also perhaps put common initialization in an init() method (which is in the 
execute method just above the execution of the perform)
So... judging from the deprecation that I now (guess its been there for a 
while but just haven't looked) find in the Action class there will be a day 
when the perform method is GONE! Also, the example Actions now (BTW when 
did this change) override the execute not the perform. Are command patterns 
then considered part of the business logic?
... if so, then I am confused since I have always considered the Action 
classes borderline business logic since they basically hold the steps of a 
transaction.
-Tony ( I think the really cool people now hang out in the Commons user 
group)




-
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site


_
Broadband? Dial-up? Get reliable MSN Internet Access. 
http://resourcecenter.msn.com/access/plans/default.asp


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



deprecated perform method in Action means roll your own Command Pattern

2002-10-24 Thread Tony Baity

Hello,
Just got back on the list again... man is it busy here
hey... about the command pattern that appears to be disappearing from the Action 
class... do we roll our own now just using Action as a base class?
I really like that combined execute and perform functionality... so that I can weed 
out common (background) functionality between Action classes and keep the size of the 
individual Action subclasses down to a minimum... and also perhaps put common 
initialization in an init() method (which is in the execute method just above the 
execution of the perform)
So... judging from the deprecation that I now (guess its been there for a while but 
just haven't looked) find in the Action class there will be a day when the perform 
method is GONE! Also, the example Actions now (BTW when did this change) override the 
execute not the perform. Are command patterns then considered part of the business 
logic?
... if so, then I am confused since I have always considered the Action classes 
borderline business logic since they basically hold the steps of a transaction.
-Tony ( I think the really cool people now hang out in the Commons user group)
 



-
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site