Chitika

Wednesday, October 3, 2012

Design patterns in .net

Hi Friends,
There are 23 design patterns that are used in the application development.These are divied into thre sub groups: Creational 

                                              Structural
                                              Behavioral

Creational

Creational patterns is used when object construction and referencing are the concerns.In short,the responsibility of instantiating instances of objects from the client, by which keeping the code loosely coupled and the responsibility of creating complex objects in one place having the Single Responsibility and
Separation of Concerns principles.
The patterns which comes  in the Creational group:
Abstract Factory: Provides an interface to create families of related objects.
Factory: Enables a class to delegate the responsibility of creating a valid object. 
Builder: Enables various versions of an object to be constructed by separating the construction
for the object itself.
Prototype: Allows classes to be copied or cloned from a prototype instance rather than creating
new instances.
Singleton: Enables a class to be instantiated once with a single global point of access to it.

Structural

Structural patterns is used when the composition and relationships of objects to fulfill the needs of
larger systems.
The patterns which comes  in the Structural group:
Adapter: Enables classes of incompatible interfaces to be used together. 
Bridge: Separates an abstraction from its implementation, allowing implementations and
abstractions to vary independently of one another.
Composite: Allows a group of objects representing hierarchies to be treated in the same way
as a single instance of an object.
Decorator: Can dynamically surround a class and extend its behavior. 
Facade: Provides a simple interface and controls access to a series of complicated interfaces
and subsystems. 
Flyweight: Provides a way to share data among many small classes in an efficient manner.
Proxy: Provides a placeholder to a more complex class that is costly to instantiate.

Behavioral

Behavioral patterns is used when the communication between objects in terms of responsibility and
algorithms. The patterns in this group encapsulate complex behavior and abstract it away from the
flow of control of a system, thus enabling complex systems to be easily understood and maintained.
The patterns which comes  in the Behavioral group:
Chain of Responsibility: Allows commands to be chained together dynamically to handle a
request.
Command: Encapsulates a method as an object and separates the execution of a command
from its invoker.
Interpreter: Specifies how to evaluate sentences in a language.
Iterator: Provides a way to navigate a collection in a formalized manner.
Mediator: Defines an object that allows communication between two other objects without
them knowing about one another.
Memento: Allows you to restore an object to its previous state.
Observer: Defines the way one or more classes can be alerted to a change in another class.
State: Allows an object to alter its behavior by delegating to a separate and changeable state
object.
Strategy: Enables an algorithm to be encapsulated within a class and switched at run time to
alter an object’s behavior.
Template Method: Defines the control of flow of an algorithm but allows subclasses to override
or implement execution steps.
Visitor: Enables new functionality to be performed on a class without affecting its structure.

These all are the patterns which are used in the aplication development.
Do you have question in your mind, how many i am using?
Check the below link ,You will be happy as a .NET Framework user
Happy Coding :)

No comments:

Post a Comment