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.
Add your comment