Nhảy tới nội dung

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:

GroupPattern NamePopularityComplexity
Creational Pattern1. Singleton★★✰★✰✰
Creational Pattern2. Factory Method★★★★✰✰
Creational Pattern3. Abstract Factory★★★★★✰
Creational Pattern4. Builder★★✰★★★
Creational Pattern5. Prototype
--------------------------------------------------------------------------------
Structural Pattern7. Bridge
Structural Pattern8. Composite
Structural Pattern6. Adapter
Structural Pattern9. Decorator
Structural Pattern10. Facade
Structural Pattern11. Flyweight
Structural Pattern12. Proxy
--------------------------------------------------------------------------------
Behavioral Pattern13. Chain of responsibility
Behavioral Pattern14. Command
Behavioral Pattern15. Interpreter
Behavioral Pattern16. Iterator
Behavioral Pattern17. Mediator
Behavioral Pattern18. Memento
Behavioral Pattern19. Observer
Behavioral Pattern20. State
Behavioral Pattern21. Strategy
Behavioral Pattern22. Template method
Behavioral Pattern23. Visitor