Monday, April 22, 2013

Design Pattern in Microsoft.NET



Design Pattern
ASP.NET Example or Implementation
Adaptor and Bridge Pattern
List box,  Data Grid  and Tree View
Abstract Factory
Paint Graphics
Iterator and Composite Pattern
Enumeration interface
Singleton
Exceptions
Façade Pattern
ADO.NET Database connections
Proxy Pattern
 C# Timer



Creational
  • Abstract Factory Pattern
    • Provide an interface to create and return one of several families of related objects
      • E.g., FFT (Fast Fourier Transform )
  • Builder Pattern
    • Separate the construction the complex object from its representing so that several different representations can be created, depending on the needs of programs
  • Prototype Pattern
    • Start with an instantiated class and copies or clones it to make a new instances. These instance can then be further tailored using their public methods
  • Singleton
    • It's a class of which there can be no more than once instance. It provide a single global point  of access to that instance
Structural
  • Adapter Pattern
    • It can be used to make one class interface match another to make programming easier
  • Composite Pattern
    • It's a composition of objects, each of which may be either simple or itself a composite object
  • Proxy Pattern
    • It's frequently a simple object take place of a more complex object that may be invoked later
  • Flyweight Pattern
    • It's a pattern for sharing objects, where each instance does not contains it's own state but stores it externally
  • Façade Pattern
    • It used to make single class represent the entire subsystem
  • Bridge Pattern
    • It separates an object's interface from it's implementation, so you can vary them separately
  • Decorator Pattern
    • It used to add responsibilities to objects dynamically
Behavioral
  • Chain of Responsibility Pattern
    •  It allows a decoupling between objects by passing a request from one object to the next in a chain until the request is recognized.
  • Command Pattern
    • It utilizes simple objects to represent execution of software commands and allows you to support logging and undoable operations.  
  • Interpreter Pattern
    •  It provides a definition of how to include language elements in a program.
  • Iterator pattern
    • It defines how communication between objects can be simplified by using a separate object to keep all objects from having to know about each other.
  • Memento Pattern
    • It defines how you might save the contents of an instance of a class and restore it later.
  • Observer Pattern
    • It  defines the way a number of objects can be notified of  a change
  • State Pattern
    • It  allows an object to modify its behavior when its internal state changes.
  • Strategy Pattern
    • It encapsulates an algorithm inside an class
  • Template Method Pattern
    • It provides an abstract definition of an algorithm.
  • Visitor Pattern
    • It adds polymorphic functions to a class noninvasively



The above information is a good summary point to define and describe each design patterns. we could keep this as a reference point for technical interview.


Reference:

This note is picked from the following book. any body wants to learn in details
please check out this link
http://www.amazon.com/Design-Patterns-C-Software/dp/0321718933


 

No comments:

Post a Comment