Design Patterns as a Sketchnote

| 2 min read

Initiative

We use so many tools, frameworks, we read so much code on a daily basis... I wanted to take a moment to go back to the basics of what I learnt at school and that I met here and there in my daily life. In order to better understand. To improve my thinking in the face of problems.

I was very surprised to see that the sketchnotes posted on Twitter had received some enthusiasm; I do them with pleasure on my free time and each like, each message is a reward that I did not expect. It also came with passionate and instructive debates, especially on the Singleton pattern.

All the sketchnotes on the design patterns I make are and will be added to this article.

Most sketchnote content is based on https://refactoring.guru

SOLID

5 basic principles OOP #SOLID that we sometimes find in some of the patterns mentioned next!

Turns out these principles are newer than I originally thought 😇

SOLID

Singleton

The series of design patterns in sketchnote begins with the Singleton. Widely used in front-end frameworks, but not always good practice when it comes to implementing it in our code.

Some debates on Twitter about if it's a good practice to use this pattern: https://twitter.com/AmelieBenoit33/status/1570313646605234177 - I'll summarize it soon!

Singleton

Builder

It reminds me of the character builder I played with in The Sims or some RPGs (weeks spent on Baldur's Gate, my childhood ❤️)

I often use this pattern to build datasets in unit tests - not always with a Director though.

Builder

Observer

Similar to a subscription system (magazine, newspaper, YouTube channel, etc.) where the publisher calls a subscriber method when an event occurs.

Widely used in frontend in various contexts!

Observer

Adapter

Simple to set up, it allows customers to consume APIs or data in a uniform way.

Adapter