Become a member

Wednesday, November 28, 2007

Design Patterns

When to use a specific pattern? Here is a quick guideline for solving a design problem using pattern. I have also included some useful definitions related to Interfaces since they are so much related to OO design. When want to adapt a class's interface to match the interface a client expects :- ADAPTER want to provide a sample interface into a collection of classes :- FACADE want to define an interface that applies to individual objects and groups of object :- COMPOSITE want to decouple and abstraction from its implementation so that the two vary independently :- BRIDGE want tocentralize responsibility in a single instance of a class :- SINGLETON want to decouple an object from awareness of which other objects depend on it :- OBSERVER wnat to centralize responsibilty in a class that oversees how a set of other objects interact :- MEDIATOR want to let an object act on behalf of other object : - PROXY Want to allow a request to escalate up a chain of objects until one handles it :- CHAIN of RESPONSIBILITY want to centralize responsibility in shared fine-grained objects :- FLYWEIGHT

No comments: