OO Principles for Design pattern
Strategy Pattern
- Encapsulation what varies
- Favor composition over Inheritance
- Program to interfaces, not implementations
Observer Pattern
- Strive for loosely coupled designs between objects that interact
Decoration Pattern
- Classes should be open for extension but closed for modification
Factory Pattern & Abstract Factory Pattern
- Depend on abstraction. Don't depend on concrete classes