跳转到内容

设计模式:可复用面向对象软件的基础

维基百科,自由的百科全书

这是本页的一个历史版本,由洪旭留言 | 贡献2006年9月18日 (一) 02:08编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
This article is about the book by Gamma et al. For other meanings, see design pattern.
"GoF" redirects here. GoF is also used as an acronym for Harry Potter and the Goblet of Fire.

Design Patterns: Elements of Reusable Object-Oriented Software (ISBN 0-201-63361-2) is a 软件工程 book proposing standard solutions and naming conventions to common problems in software design. The book's authors are Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, known as the "Gang of Four" or simply "GoF". The book is divided into two parts, with the first giving the definition of software design patterns and the second giving a list of practical reusable design patterns. It is accompanied by examples in C++ and Smalltalk.

创建范例

This Design pattern is all about class instantiation. This pattern can be further divided into class-creation patterns and object-creational patterns. While class-creation patterns use inheritance effectively in the instantiation process, object-creation patterns use delegation effectively to get the job done.

结构范例

This design pattern is all about Class and Object composition. Structural class-creation patterns use inheritance to compose interfaces. Structural object-patterns define ways to compose objects to obtain new functionality.

行为范例

This design pattern is all about Class's objects communication. Behavioral patterns are those patterns that are most specifically concerned with communication between objects.

外部链接

Template:Design Patterns Patterns zh:设计范例