Hello again ,
This is last article about design pattern .
In this article we will check what are different design pattern and how and when they are implemented.
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.
The GoF Design Patterns are divided
into 3 categories : Creational Patterns, Structural Patterns and Behavioral
Patterns. I am going to explain each GoF Design Pattern in detail and will show
you examples of how to write good C# 4.0 code that implement those patterns.
Creational
Patterns
- Abstract Factory Pattern: Create instances of classes belonging to different
families
- Builder Pattern: Separate representation and object construction
- Factory Method Pattern: Create instances of derived classes
- Prototype Pattern: Clone or copy initialized instances
- Singleton Pattern: Class with only one single possible instance
Structural
Patterns
- Adapter Pattern: Match interfaces of classes with different interfaces
- Bridge Pattern:: Separate implementation and object interfaces
- Composite:
Simple and composite objects tree
- Decorator:
Dynamically add responsibilities to objects
- Facade:
Class that represents subclasses and subsystems
- Flyweight:
Minimize memory usage by sharing as much data as possible with similar
objects
- Proxy:
Object that represents another object
Behavioral
Patterns
- Chain of Responsibility: Pass requests between command and processing objects
within a chain of objects
- Command:
Encapsulate a method call as an object containing all necessary
information
- Interpreter:
Include language elements and evaluate sentences in a given language
- Iterator:
Give sequential access to elements in a collection
- Mediator:
Encapsulates and simplifies communication between objects
- Memento:
Undo modifications and restore an object to its initial state
- Observer:
Notify dependent objects of state changes
- State:
Change object behavior depending on its state
- Strategy:
Encapsulate algorithms within a class and make them interchangeable
- Template Method:
Define an algorithm skeleton and delegate algorithm steps to subclasses so
that they may be overridden
- Visitor:
Add new operations to classes without modifying them
Hope it help you for quick reference.
Regards
Amey
Start where you are. Use what you have. Do what you can.
No comments:
Post a Comment