1.Four essential elements of a pattern:
(1)Pattern name;
(2)Problem;
(3)Solution;
(4)Consequences: The results and trade-offs of applying the pattern.
2.One person's pattern can be another person's primitive building block.
3.The design patterns in this book are descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context.
4.In design with procedural laugnages, "Inheritance", "Encapsulation" and "Polymorphism" can also be design patterns.
(1)Pattern name;
(2)Problem;
(3)Solution;
(4)Consequences: The results and trade-offs of applying the pattern.
2.One person's pattern can be another person's primitive building block.
3.The design patterns in this book are descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context.
4.In design with procedural laugnages, "Inheritance", "Encapsulation" and "Polymorphism" can also be design patterns.
本文探讨了设计模式的概念,包括模式的四个关键要素:模式名称、问题、解决方案及后果,并阐述了个体模式如何成为解决特定问题的基础构建块。本书中的设计模式描述了定制化的对象和类,用于在特定上下文中解决通用设计问题。此外,还指出在面向过程的语言中,继承、封装和多态也可视为设计模式。
669

被折叠的 条评论
为什么被折叠?



