Hey folks! few weeks ago i started a new challenge to learn about one design pattern everyday i called it “#DesignPatternsEveryday”.

Since i completed the challenge i thought i should share briefly what i learned about design patterns, let’s get started.

I will be going over most of the patterns and going to explain them in my own words, so if you find any mistakes or misinformation please let me know. i’m not a design patterns expert.

What are Design Patterns?

“Design patterns are typical solutions to common problems in software design. Each pattern is like a blueprint that you can customize to solve a particular design problem in your code.” - refactoring.guru

There are 3 categories of design patterns, we are going to cover them one by one.

  • Creational
  • Provides a way to create new objects which increases the flexibility and reusability.
  • Structural
  • Helps to structure & assemble objects and classes while making them flexible.
  • Behavioural
  • Helps to communicate between objects and concerned with responsiblities between objects.

Also note that, One thing is really important for utilizing design patterns in your project.

Never start with the mindset of “okay I’m going to use {this pattern} in the codebase”

Judge & analyze the code base, plan the logic and implementation first then apply design patterns to solve any particular problem only IF NECESSARY.

Design patterns are solution to problems, not solution finding problems.

Table of Contents

  • What are Design Patterns?
  • Day 1 - Abstract Factory Pattern
  • Day 2 - Builder Pattern
  • Day 3 - Factory Method
  • Day 4 - Singleton
  • Day 5 - Adapter Pattern
  • Day 6 - Bridge Pattern
  • Day 7 - Composite Design Pattern
  • Day 8 - Decorator Pattern
  • Day 9 - Facade Pattern
  • Day 10 - Proxy Design Pattern
  • Day 11 - Chain of Responsibility
  • Day 12 - Command pattern
  • Day 13 - Iterator pattern
  • Day 14 - Mediator Design Pattern
  • Day 15 - Observer Design Pattern
  • Day 16 - State Pattern
  • Day 17 - Strategy Design Pattern
  • Day 18 - Template Method
  • Day 19 - Visitor Pattern

#design-pattern #developer

Design Patterns Everyday
2.70 GEEK