Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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