The strategy pattern allows you to change the implementation of something used at runtime . The decorator pattern allows you augment (or add to) existing functionality with additional functionality at run time.
Read moreHow is the strategy pattern defined?
In computer programming, the strategy pattern (also known as the policy pattern) is a behavioral software design pattern that enables selecting an algorithm at runtime . Instead of implementing a single algorithm directly, code receives run-time instructions as to which in a family of algorithms to use.
Read moreWhat is the difference between pattern and strategies?
State Pattern defines the “what” and “when” part of an Object. Example: What can an object when it’s in a certain state. Strategy pattern defines the “How” part of an Object. Example: How a Sorting object sorts data.
Read moreWhat is the difference between strategy design pattern and State design pattern?
State design pattern is used to define and manage state of an object, while Strategy pattern is used to define a set of interchangeable algorithm and lets client to choose one of them. So Strategy pattern is a client driven pattern while Object can manage there state itself.
Read more