Software Design – The Strategy Pattern
Our review of the behavioral design patterns moves on to look at the Strategy pattern. This is one that you might not recognize from the name. However, it is relatively common in use (or at least it should be). The Strategy Pattern Defined As always, we will start with the “Gang of Four” intent to set the stage for our discussion. “Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it” Some people start to hear static when the word algorithm is used. It seems too theoretical and does not apply to a practical approach. Unfortunately, that is the core aspect of a strategy. There is a process... Read more