A design pattern is a documented best practice or core of a solution that has been applied successfully in multiple environments to solve a problem that recurs in a speciﬁc set of situations.
Architect Christopher Alexander describes a pattern as “a recurring solution to a common problem in a given context and system of forces.”
- The term context refers to the set of conditions/situations in which a given pattern is applicable.
- The term system of forces refers to the set of constraints that occur in the speciﬁc context.
Design patterns are not theoretical constructs. A design pattern can be seen as an encapsulation of a reusable solution that has been applied successfully to solve a common design problem.
Though design patterns refer to the best known ways of solving problems, not all best practices in problem resolution are considered as patterns. A best practice must satisfy the Rule of Three to be treated as a design pattern.
Design patterns do not provide solutions to every problem found in real-world software design and development. Design patterns are about providing elegant, reusable solutions to commonly encountered software development problems in a particular context.
Môn học Design Patterns
Study guide: download
Slides: Tất cả các slide dựa trên 2 cuốn sách “HeadFirst DesignPatterns” và Software “Architecture Design Patterns in Java”
2. Basic Patterns;
6. Behavioral Patterns; source code demo
1. Lab report 1: Đọc hiểu ví dụ “Online Shopping UML Examples” sau đó viết lại bằng Việt ngữ, vẽ lại 1 số mô hình trong ví dụ này.
Hạn chót nộp bài: 11/06/2012.
2. Lab report 2: Consider a Web hosting company that offers hosting services on both Windows and UNIX platforms. Suppose that the Web hosting company offers three different types of hosting packages — Basic, Premium and Premium Plus — on both platforms. Design an GUI application using the Abstract Factory pattern to query the features of different types of hosting packages offered by the Web hosting company.
Hạn chót nộp bài: 03/07/2012
- Requirements: download
- Dead-line: vào buổi học cuối.
Các vấn đề liên quan:
Code của DoFactory.Design Pattern Framework 3.5 CS các bạn download về tham khảo