2010-03-10

Proxy Design Pattern

Introduction:
Sometimes you become into a case where you does not or can not reference an object directly, but you still want to interact with that object to do some job. The intent of the proxy design pattern is to control access to an object by providing placeholder for it. Below example will make the idea clear to you.....
 





        

2010-03-09

Iterator Design Pattern

Iterator Design Pattern

Introduction:
Sometimes you want to access a collection of objects in a sequential way without even expose how things is going inside your implementation . Iterator Design Pattern Provides you with a Skelton of how to design your classes to solve this issue.
 



2010-03-07

Prototype Design Pattern

Introduction:
Sometimes we have a case where we want to build an object based on another object instead of creating a new fresh object each time, we can make a copy of an already existing object instantly and start using the new created object. By doing so, we do not have to repeat ......
 

2010-03-05

Flyweight Design Pattern

Introduction:

Flyweight design pattern target to minimizes the memory usage by sharing as much data as possible with other similar objects. It is very useful when have large amountof objects in memory which have lot of similar values. by sharing the similar values between all the objects, memory usage will be much less.

Click here to read more!





2010-03-02

Strategy Design Pattern


Introduction:

Sometimes you want your object to behave differently if its internal status changed. The strategy Design pattern enables client code to choose which behavior from a family of behaviors and give client code a simple way to enable that behavior.


Click here to read more!




Singleton Design Pattern


Introduction:
There is some cases when you want to have one and only one instance of a specific class and prevent anybody from having the ability to create more than one instance of that class. Singleton Design pattern came to solve this issue by defining a well known structure for your class

Abstract Factory Design Pattern

    Introduction:
    Sometimes you want to create an instance of class that is related to a family of classes without specifying the exact concert class. Factory design pattern came to solve this issue and make it easy for us.
    In order to avoid duplicating the code that make the decision everywhere an instance is created, we need a mechanism for creating instances of related classes without necessarily knowing which will be instantiated.
    There are 2 types of Factory Design Pattern: