Dec 26, 2008

Design pattern

Design 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 Method lets a class defer instantiation to subclasses.
Builder: Separate the construction of a complex object from its representation so that the same construction process can create different representations.
Lazy initialization: Tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed.
Object pool: Avoid expensive acquisition and release of resources by recycling objects that are no longer in use
Prototype: Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
Singleton: Ensure a class has only one instance, and provide a global point of access to it.
Adapter: Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.
Bridge: Decouple an abstraction from its implementation so that the two can vary independently.
Composite: Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
http://en.wikipedia.org/wiki/Design_pattern_(computer_science)

No comments:

Post a Comment