Strategy pattern |
In computer programming, the strategy pattern is a particular design pattern (computer science), whereby Algorithms can be selected on-the-fly at runtime depending on conditions, like strategies in a war situation.
The strategy pattern is useful for situations where it is necessary to dynamically swap the algorithms used in an application. The strategy pattern is intended to provide a means to define a family of algorithms, encapsulate each one as an object, and make them interchangeable. The strategy pattern lets the algorithms vary independently from clients that use them.
=See also=
*First-class function *Facade memento strategy *Explicit strategy pattern
=External links=
*[http://home.earthlink.net/~huston2/dp/strategy.html Description] by Vince Huston *[http://www.javaworld.com/javaworld/jw-04-2002/jw-0426-designpatterns.html Strategy Pattern for Java article]|
|