Sunday, September 19, 2021

Design Patterns Introduction

 Design Patterns

  • In software engineering, design patterns are time-tested solutions that mean general problems that are frequent to happen while you do development and there is a certain answer for that problem that falls under design patterns.
  • Now, It is not a good idea to put design patterns first place without identifying the problem.
  • In short, these are like templates or a blueprint of a particular problem.

When to use it?

  • Design Patterns help to speed up development as they are already a proven strategy or solution.
  • Refactoring code that is much more complex in nature design patterns helps to make it more reliable and maintainable.
  • It has documented problems and solutions accordingly.


Types of Design Patterns

Divided by categories to help us to share more meaningful

  1. Creational Patterns
    • This is about class instantiation
    • Also can be subdivided into class creational and objection creational patterns
    • Now little talk more on class creational which uses more inheritance features of object-oriented programming
    • And object creational pattern uses deligation to make them work
    • Examples are Factory Pattern, Abstract Factory Pattern, Builder Pattern, Factory Method, Prototype, Singleton
  2. Structural Patterns
    • This is about class and object composition
    • Examples are Adapter, Bridge, Composite pattern, Decorator Pattern, Facade Pattern, Proxy pattern, etc.
  3. Behavioral Patterns
    • This is above communication between objects
    • Examples are Chain of Responsibility Pattern, Comand Pattern, Interpreter Pattern, Iterator Pattern, Observer Pattern, etc.


Will see more dedicated posts upcoming with examples to digest and re-utilize in our day-to-day programming in an effective manner. 

No comments:

Post a Comment

C# Interview Prep: 100 Common Questions for 0-3 Years Experience

Common C# Interview Questions  Basics of C# Language: What is C#? C# (pronounced C sharp) is a modern, object-oriented programming language...