aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Differece between Strategy Pattern and Command Pattern. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Differece between Strategy Pattern and Command Pattern." Watch "Differece between Strategy Pattern and Command Pattern." New topic
Author

Differece between Strategy Pattern and Command Pattern.

prithvi s zankat
Greenhorn

Joined: Jul 18, 2005
Posts: 12
What is/are the difference(s) between COMMAND PATTERN & STRATEGY PATTERN?
I confused because the logic of putting/selection generic object at run time and then executing the generic method is happening in both the patterns.

In both the patterns, an Interface is there between the context and implementation.

I think I still am not able to elaborate my confusion, but confusion is there.
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
Check out this recent thread.


Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I went back to review that. I liked that Ilja said the distinction wasn't all that important. Command, Strategy and State may look an awful lot alike structurally but vary in why, how and when you choose which implementation class to use.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Differece between Strategy Pattern and Command Pattern.