essential Design Patterns for Building Scalable and Maintainable Code

design patterns are reusable solutions to commonly occurring problems in software design.

Chinmay
2 min readSep 2, 2024
Photo by Krisztian Tabori on Unsplash

Design patterns can be categorized in multiple ways, but the most popular one is the following:

  • Creational design patterns
  • Structural design patterns
  • Behavioral design patterns
  • Concurrency design patterns
  • Architectural design patterns

[CS-BCA]*

Creational Design Patterns

These patterns deal with object creation mechanisms which optimize object creation compared to a basic approach. Creational design patterns solve this problem by somehow controlling object creation.

Some of the popular design patterns in this category are:

  • Factory method
  • Abstract factory
  • Builder
  • Prototype
  • Singleton

[FAB-PS]*

Structural Design Patterns

These patterns deal with object relationships. They ensure that if one part of a system changes, the entire system doesn’t need to change along with it. The most popular patterns in this category are:

  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy

[ABCD_FFP]*

Behavioral Design Patterns

These types of patterns recognize, implement, and improve communication between disparate objects in a system. They help ensure that disparate parts of a system have synchronized information.

Popular examples of these patterns are:

  • Chain of responsibility
  • Command
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Visitor

[CCI-MMO-SSV]*

Concurrency Design Patterns

These types of design patterns deal with multi-threaded programming paradigms. Some of the popular ones are:

  • Active object
  • Nuclear reaction
  • Scheduler

[ANS]*

Architectural Design Patterns

Design patterns which are used for architectural purposes. Some of the most famous ones are:

  • MVC (Model-View-Controller)
  • MVP (Model-View-Presenter)
  • MVVM (Model-View-ViewModel)

Let’s remember them all: 😉

[CS-BCA]*

C — FAB-PS
S — ABCD_FFP
B — CCI-MMO-SSV
C — ANS
A — MVC, MVP, MVVM

* - mnemonic

if you liked this article or found it useful, then a follow would be much appreciated. Alternatively, you could buy me a coffee! All the support is much appreciated. :-)

--

--

Chinmay

I often describe myself as a software professional having the mindset to break things but the toolset to create and restore.