Design Patterns in .Net
Common Design Patterns in C# 4.0
Design Patterns provide standardized and efficient solutions to software design and programming problems that are re-usable in your code. Software Architects and developers use them to build high quality robust applications.
1. Creational Design Patterns
These patterns deal with the process of objects creation in such a way that they can be decoupled from their implementing system. This provides more flexibility in deciding which objects need to be created for a given use case/ scenario. There are as follows:
- Factory Method : Create instances of derived classes
- Abstract Factory : Create instances of several classes belonging to different families
- Builder : Separates an object construction from its representation
- Prototype : Create a duplicate object or clone of the object
- Singleton : Ensures that a class can has only one instance
2. Structural Design Patterns
These patterns deal with the composition of objects structures. The concept of inheritance is used to compose interfaces and define various ways to compose objects for obtaining new functionalities. There are as follows:
· Adapter : Match interfaces of different classes
· Bridge : Separates an object’s abstraction from its implementation
· Composite : A tree structure of simple and composite objects
· Decorator : Add responsibilities to objects dynamically
· Façade : A single class that represents an entire complex system
· Flyweight : Minimize memory usage by sharing as much data as possible with similar objects
· Proxy : Provides a surrogate object, which references to other object
3. Behavioral Design Patterns
These patterns deal with the process of communication, managing relationships, and responsibilities between objects. There are as follows:
· Chain of Responsibility: Passes a request among a list or chain of objects.
· Command: Wraps a request under an object as a command and passed to invoker object.
· Interpreter
· Iterator
· Mediator
· Memento
· Observer
· State
· Strategy
· Visitor
· Template Method
Creational Design Patterns
a.
http://www.dotnet-tricks.com/Tutorial/designpatternslist
http://www.dotnet-tricks.com/Tutorial/designpatterns/NTEH250513-Gang-of-Four-(GOF)-Design-Patterns-in-.Net-.html
No comments:
Post a Comment