Browse By

Design Patterns in C#

Let us start from the formal definition i.e. Design patterns are solution to the Software architectural problem that we developers find repeatedly in our real world application development.

Antonym of Design Patterns

Cowboy_Coding_DartleLet’s discuss about opposite process of Design patterns, so that we will get a clear idea of what is exactly the Design patterns are. The processes which I consider as an opposite way to Design patterns are Un-standard Coding or Cowboy Coding, which is an informal or straight away process of solving problems without proper methodologies. We may get into the final solution which we are expecting but its not the way we should follow, because the code written in such a manner will not be a reusable, standard and scalable one under more circumstances.

Raise of Design Patterns

            Good_Code_Practice_DartleDevelopers started learning the correct methodology only after loads of trial and errors. Later this paved the path for good code practice and Design Patterns came into exist.

Types of Design Patterns

The Design Patterns are broadly classified into three types and each types holds various sub patterns.

Creational Patterns

Creational patterns provide ways to instantiate Single or groups of related objects. It gives us an easier way to create objects. The patterns under this category are

  • Abstract Factory Pattern
  • Builder Pattern
  • Factory Method Pattern
  • Prototype Pattern
  • Singleton Pattern

Structural Patterns

Structural patterns provide a manner to define relationships between classes or instances.

  • Adapter Pattern
  • Bridge Pattern
  • Composite Pattern
  • Decorator Pattern
  • Façade Pattern
  • Flyweight Pattern
  • Proxy Pattern

Behavioral Patterns

The last pattern but not the least one, which mostly deals with the communication between classes and instances.

  • Chain of Responsibility Pattern
  • Command Pattern
  • Interpreter Pattern
  • Iterator Pattern
  • Mediator Pattern
  • Memento Pattern
  • Observer Pattern
  • State Pattern
  • Strategy Pattern
  • Template Method Pattern
  • Visitor Pattern

Caution using Design Patterns

            Design Patterns caution A coder should have a good understanding over Design Patterns before implementing that in his development because it can be disastrous and create many problems if implemented it in the wrong way.

However if Design Patterns used in a right way then this definitely going to be your Savior.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>