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
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment