Identify the aspects of your application that varies and separate them from what stays the same.
Program to an Interface, not to an Implementation.
Strategy Pattern:
Strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from the clients that uses it.
Each pattern describes a problem that occurs over and over again in our environments.and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over without ever doing it the same way twice.
Strategy using CDI and Producers:
https://www.nicolaferraro.me/2016/02/24/strategy-pattern-using-cdi/
Program to an Interface, not to an Implementation.
Strategy Pattern:
Strategy pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from the clients that uses it.
Each pattern describes a problem that occurs over and over again in our environments.and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over without ever doing it the same way twice.
Strategy using CDI and Producers:
https://www.nicolaferraro.me/2016/02/24/strategy-pattern-using-cdi/
Comments
Post a Comment