This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Differece between Strategy Pattern and Command Pattern.

 
prithvi s zankat
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this recent thread.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic