设计模式学习22 总结

整个设计模式的学习是通过msdn webcast来进行的,首先感谢“李建忠”老师辛勤的讲解(这个视频教程的时间可能是比较老的,好像是05年东西),但是通过整个教程的学习,感觉还是收获很多,对于面向对象有了更深的理解。

下面是整个设计模式的总结:

  Creational Patterns
  Abstract Factory   Creates an instance of several families of classes,解决的多系列对象创建问题。
  Builder   Separates object construction from its representation,解决的是复杂对象创建,这个对象的各个部分是变化,但是算法是相对固定的。
  Factory Method   Creates an instance of several derived classes,对象创建时,对象的内容是不断变化的,但是对象接口是相对固定的。
  Prototype   A fully initialized instance to be copied or cloned,对象可能是不断变化的,但是接口是相对固定的。
  Singleton   A class of which only a single instance can exist。

  Structural Patterns
  Adapter   Match interfaces of different classes,将现有系统应用到新系统中,解决接口不匹配问题。
  Bridge   Separates an object’s interface from its implementation,解决的是对象在两个维度的变化。
  Composite   A tree structure of simple and composite objects,整体部分结构,树形组织接口。
  Decorator   Add responsibilities to objects dynamically,动态给某个对象增加功能。
  Facade   A single class that represents an entire subsystem
  Flyweight   A fine-grained instance used for efficient sharing
  Proxy   An object representing another object

  Behavioral Patterns
  Chain of Resp.   A way of passing a request between a chain of objects
  Command   Encapsulate a command request as an object
  Interpreter   A way to include language elements in a program
  Iterator   Sequentially access the elements of a collection
  Mediator   Defines simplified communication between classes,解决的是多个类之间交互的问题,使用一个单独的类来管理。
  Memento   Capture and restore an object's internal state
  Observer   A way of notifying change to a number of classes
  State   Alter an object's behavior when its state changes
  Strategy   Encapsulates an algorithm inside a class
  Template Method   Defer the exact steps of an algorithm to a subclass
  Visitor   Defines a new operation to a class without change,类拓展。

设计模式目录:

                                                                                                                                               2010年暑假于Club

posted @ 2010-07-24 20:53  qiang.xu  阅读(739)  评论(0编辑  收藏  举报