Notes from Strategy Pattern Pluralsight Course

Date Published: July 20, 2020

Notes from Strategy Pattern Pluralsight Course

The Strategy Pattern is a common pattern that allows the program to select an algorithm/strategy at runtime.

I recently finished going through the course C# Design Patterns: Strategy by Filip Ekberg on Pluralsight.

Strategy Pattern -> extensible, robust, and testable software

This pattern allows you to select an algorithm at runtime.

Strategy Pattern Characteristics:

  • Context has reference to and invokes strategy
  • IStrategy defines interface for strategy
  • Strategy is the concrete implementation of the strategy

Like many other patterns, the Strategy Pattern does tend to add complexity, so be cautious with it.

Anytime you implement an interface, you can say you're implementing the Strategy Pattern.

Thanks for reading! I hope you find this and other articles here at ilyanaDev helpful! Be sure to follow me on Twitter @ilyanaDev.


Copyright © 2021