STUDY COMMON DESIGN PATTERNS
1. About this project
This project contains many sample codes for demonstrating the usage of the following design patterns:
- The Strategy Pattern.
- The Observer Pattern.
- The Decorator Pattern.
- The Factory Pattern.
- The Singleton Pattern.
- The Command Pattern.
- The Adapter and Facade Patterns.
- The Template Method Pattern.
- The Iterator and Composite Patterns.
- The State Pattern.
- The Proxy Pattern.
2. Reference
- The problem in each module is from the book Head First Design Patterns, 2nd Edition by Eric Freeman and Elisabeth Robson.
- The code in this project is referenced from that book.
3. Object-Oriented (OO) Design Principles
- Encapsulate what varies.
- Favor composition over inheritance.
- Program to interfaces, not implementations.
- Strive for loosely coupled designs between objects that interact.
- Classes should be open for extension but closed for modification.