Strategy

E173620

Strategy is a behavioral design pattern that defines a family of algorithms, encapsulates each one, and makes them interchangeable so that clients can vary their behavior independently from the algorithms they use.

All labels observed (1)

Label Occurrences
Strategy canonical 1

How this entity was disambiguated

Statements (49)

Predicate Object
instanceOf behavioral design pattern ⓘ
design pattern ⓘ
software engineering concept ⓘ
allows runtime selection of algorithm ⓘ
variation of behavior without modifying client ⓘ
alsoKnownAs Policy pattern ⓘ
applicableWhen algorithm should be selected at runtime ⓘ
clients should not know algorithm implementation details ⓘ
different variants of an algorithm are needed ⓘ
many related classes differ only in behavior ⓘ
authorsDescribedBy Erich Gamma ⓘ
John Vlissides ⓘ
Ralph Johnson ⓘ
Richard Helm ⓘ
belongsToCategory behavioral pattern ⓘ
consequence eliminates conditional statements for algorithm choice ⓘ
increases number of objects and classes ⓘ
contextDelegatesTo Strategy for algorithm execution ⓘ
contextHolds reference to Strategy ⓘ
definedIn Gang of Four design patterns ⓘ
definesInterface common method for all algorithms ⓘ
enables switching algorithms at runtime ⓘ
testing algorithms independently ⓘ
encapsulates algorithm ⓘ
behavior ⓘ
encourages loose coupling between client and algorithms ⓘ
exampleUseCase compression with different algorithms ⓘ
payment with different payment methods ⓘ
routing with different pathfinding algorithms ⓘ
sorting with different comparison strategies ⓘ
hasIntent define a family of algorithms ⓘ
encapsulate each algorithm ⓘ
let clients vary behavior independently from algorithms ⓘ
make algorithms interchangeable ⓘ
hasRole ConcreteStrategy implements algorithm ⓘ
Context uses a Strategy object ⓘ
Strategy declares algorithm interface ⓘ
originatesFrom Design Patterns: Elements of Reusable Object-Oriented Software ⓘ
promotes composition over inheritance ⓘ
open-closed principle ⓘ
single responsibility principle ⓘ
relatedTo Decorator pattern ⓘ
linked to: Decorator

State pattern ⓘ
linked to: ConcreteState

Template Method pattern ⓘ
linked to: Template Method
solvesProblem conditional logic for algorithm selection ⓘ
hard-wired algorithms in client code ⓘ
typicalParticipants ConcreteStrategy ⓘ
Context ⓘ
Strategy interface ⓘ

How these facts were elicited

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.