Link Details

Link 132579 thumbnail
User 111696 avatar

By bloid
via insideria.com
Published: Nov 09 2008 / 14:36

The goal of this article is to help you gain a better understanding of the Strategy design pattern. The Strategy pattern is used to separate the areas of an application that differ from the areas of an application that remain the same. This design pattern sits on top of several fundamental OOP principals. For example the Strategy pattern uses the concept of programming to an interface rather than an implementation. Strategy also favors composition over inheritance. The reason you would use the Strategy pattern is to abstract an algorithm from a class and create a new class based on the algorithm. Using polymorphism the algorithms can be changed at runtime by the compositing class. I hope you’re as excited about the topic of design patterns as I am.
  • 6
  • 1
  • 1406
  • 481

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (6)



Voters Against This Link (1)