Practicing Strategy Pattern with TypeScript
Hello everyone, how is it going. It’s has been a long time since the last time I updated my blog. At the moment I’m so busy with my research and studying. There are so many things to learn, especially Deep Learning and Mathematics.
This series is about how to apply Design Patterns in TS. And this, the first article of the series, is about Strategy Pattern.
The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
With Strategy pattern, our code will be more flexible, and client and even change their algorithms at run time