posts - 37,comments - 7,trackbacks - 0

A Pattern is a solution to a problem in a context.

1.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. 

2.The Observer Pattern:    
difine a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.

3.The Decorator Pattern : 
attaches additional responsibilities to an object dynamically.Decorators provide a flexible alternative to subclassing for extending functionality.

4.The Factory Method Pattern: 
defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.

5.The Abstract Factory Patter:
provides an interface for creating families of related or dependent objects without specifying their concrete classes.

6.The Singleton Pattern:
ensures a class has only one instance, and provides a global point of access to it.

7.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.

8.The Adapter Pattern:
converts the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.

9.The Facade Pattern:
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.

10.The Template Method Pattern:
defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.

11.The Iterator Pattern:
provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.

12.The Composite Pattern:
allows you to composite objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformaly.

13.The State Pattern:
allows an object to alter its behavior when its internal state changes. The object will appear to change its class.


posted on 2005-08-09 17:22 Dave 阅读(145) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: