The Strategy Pattern
Defines a family of algorithms, encapsulates each one, and makes them interchangeable.
Strategy lets the algorithm vary independently from clients that use it.
Observer Pattern
Defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Decorator Pattern
Attach additional responsibilities to an object dynamically.
Decorators provide a flexible alternative to subclassing for extending functionality.
Factory Pattern
Abstract Factory
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
Factory Method
Define an interface for creating an object, but let subclasses decide which class to instantiate.
Factory Pattern lets a class defer instantiation to the subclasses.
Singleton
Ensure a class only has one instance and provide a global point of access to it.
The Command Pattern
encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.
The adapter pattern
Adapter Converts the interface of a class into aniother interface clients expect. Lets classes work together that couldnt otherwise because of incompatible interfaces.
Facade Provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
posted on 2007-11-22 12:26
豪 阅读(303)
评论(0) 编辑 收藏 引用 所属分类:
DesignPattern