Thursday, March 3, 2016

Design Pattern - 1 - Strategy Pattern

Design Principle 1: Identify the parts of the application that can vary and separate them from what stays the same. Encapsulate what varies.

Design Principle 2: Program to an interface, not an implementation.

Design Principle 3: Favor composition over inheritance.

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.

Courtesy: Head First Design Patterns

No comments: