Open main menu

CDOT Wiki β

Changes

Strategy

316 bytes removed, 11:34, 17 April 2007
no edit summary
==Defenition==
Define Allows you to define a family set of algorithms, encapsulate each one, and make them interchangeableto be used by different objects. Strategy lets the algorithm vary independently from clients objects that use it.  In computer programming, the strategy pattern is a particular software design pattern, whereby algorithms can be selected on-the-fly at runtime. In some programming languages, such as those without polymorphism, the issues addressed by this pattern are handled through forms of reflection, such as the native function pointer or function delegate syntax.
Objects can be assigned to algorithms on runtime.
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.
1
edit