Design Pattern
Design Pattern là các giải pháp tổng thể đã được tối ưu hóa, được tái sử dụng cho các vấn đề phổ biến trong thiết kế phần mềm mà chúng ta thường gặp phải hàng ngày. Đây là tập các giải pháp đã được suy nghĩ, đã giải quyết trong tình huống cụ thể.
Phân nhóm Design Pattern
23 Design Pattern được giới thiệu trong GoF, chia thành 3 nhóm:
Group | Pattern Name | Popularity | Complexity |
---|---|---|---|
Creational Pattern | 1. Singleton | ★★✰ | ★✰✰ |
Creational Pattern | 2. Factory Method | ★★★ | ★✰✰ |
Creational Pattern | 3. Abstract Factory | ★★★ | ★★✰ |
Creational Pattern | 4. Builder | ★★✰ | ★★★ |
Creational Pattern | 5. Prototype | ||
------------------ | -------------------------------- | -------------- | ---------------- |
Structural Pattern | 7. Bridge | ||
Structural Pattern | 8. Composite | ||
Structural Pattern | 6. Adapter | ||
Structural Pattern | 9. Decorator | ||
Structural Pattern | 10. Facade | ||
Structural Pattern | 11. Flyweight | ||
Structural Pattern | 12. Proxy | ||
------------------ | -------------------------------- | -------------- | ---------------- |
Behavioral Pattern | 13. Chain of responsibility | ||
Behavioral Pattern | 14. Command | ||
Behavioral Pattern | 15. Interpreter | ||
Behavioral Pattern | 16. Iterator | ||
Behavioral Pattern | 17. Mediator | ||
Behavioral Pattern | 18. Memento | ||
Behavioral Pattern | 19. Observer | ||
Behavioral Pattern | 20. State | ||
Behavioral Pattern | 21. Strategy | ||
Behavioral Pattern | 22. Template method | ||
Behavioral Pattern | 23. Visitor |