Design Patterns



Object Oriented Design Principles
Program to an interface, not an implementation.
Favor object composition over class inheritance.


This post is like a reference to all GoF design patterns introduced in This Developer's Planet blog.



Creational Patterns

Creates an instance of several derived classes
Creates an instance of several families of classes
A class of which only a single instance can exist
A fully initialized instance to be copied or cloned
Separates object construction from its representation
Structural Patterns
A single class that represents an entire subsystem
An object representing another object
Match interfaces of different classes
A tree structure of simple and composite objects
Separates an object’s interface from its implementation
Add responsibilities to objects dynamically
A fine-grained instance used for efficient sharing
Behavioral Patterns
Sequentially access the elements of a collection
A way of notifying change to a number of classes
Encapsulate a command request as an object
Encapsulates an algorithm inside a class
Defer the exact steps of an algorithm to a subclass
Alter an object's behavior when its state changes
A way of passing a request between a chain of objects
Defines simplified communication between classes
Defines a new operation to a class without change
Capture and restore an object's internal state
A way to include language elements in a program
Other Patterns
A way of passing a request between a chain of objects
Sharing and reusing the expensive resources 
A Null Object is an object with defined neutral behaviour

Comments

Popular Posts