The Decorator pattern is a structural pattern that lets you attach additional functionalities to an object dynamically. In other words, the client has the freedom to create an object and then extend it by adding a variety of “features” to it. A good analogy to simplify this pattern is: “Wrapping a gift, putting it in a box, and wrapping the box”.

The Decorator pattern is classified among structural design patterns which are all about Class and Object composition. Structural class-creation patterns use inheritance to compose interfaces. Structural object-patterns define ways to compose objects to obtain new functionality. …


The Builder pattern is a creational design pattern that handles the construction of complex objects step by step (or brick by brick). It is probably the easiest pattern to spot if the existing code needs such design. The Builder pattern allows the creation of different representations of an object using the same construction code.

Builder pattern is classified in the creational design patterns which is all about class/object instantiation. More precisely, how to effectively use inheritance (class-creation patterns) or delegation (object-creation patterns). [by Design Patterns explained simply]

Example: Let’s start with an example on my favorite topic. Food!! More precisely…


The Bridge pattern is a very important design pattern. It is commonly used in industry as it is an easy way to simplify classes by separating the low-level logic implementation from the high-level definition of a class (which is usually abstracted/inherited). The purpose of this guide is to explain this pattern in three easy, clean steps.

The Bridge pattern is classified among structural design patterns which are all about Class and Object composition. Structural class-creation patterns use inheritance to compose interfaces. Structural object-patterns define ways to compose objects to obtain new functionality. [by Design Patterns explained simply]

Step 1 —…


Observer pattern is a very commonly used pattern. In fact, it is so common that is being standardized in many programming languages/libraries. In Java, it exists injava.util.Observer (deprecated in Java 9). In Python it as close as apip install pattern-observer. In C++, we can sometimes use boost library, more precisely #include <boost/signals2.hpp>. However, it is widely used in industry as a custom-made solution. To be able to use it correctly and understand its complexity, we need to dive in and explore it.

Observer pattern is classified among the behavioral design patterns. Behavioral design patterns are most specifically concerned with communication…


Facade pattern is often needed when there is a large number of interdependent classes or because parts of the code are unavailable. It is used as a camouflage to cover the complexities of a large system and therefore provides a simple interface to the client. In other words, it is a wrapper class used to hide the implementation details.

Facade pattern is classified as a structural design pattern. This design patterns is all about Class and Object composition. Structural class-creation patterns use inheritance to compose interfaces. Structural object-patterns define ways to compose objects to obtain new functionality. …


This is another quick-guide to mastering a very commonly used design pattern, the Singleton pattern. Singleton pattern is one of the simplest but most controversial design patterns (with pros and many cons). This is one of the main reasons why it is very common in programming interviews.

Singleton pattern is classified in the creational design patterns which is all about class/object instantiation. More precisely, how to effectively use inheritance (class-creation patterns) or delegation (object-creation patterns). [by Design Patterns explained simply]

Singleton definition: In mathematics, is defined as “a set which contains exactly one element”. This pattern is very simple to…


This is a quick-guide to mastering one of the most commonly used design patterns, the Abstract Factory. Even though the coding examples will be in C++ as I am more comfortable with, they can be easily adjusted to any programming language like Java, Python, C#, Javascript and more.

Abstract Factory is classified in the creational design patterns which is all about class/object instantiation. More precisely, how to effectively use inheritance (class-creation patterns) or delegation (object-creation patterns). [by Design Patterns explained simply]

Factory definition: “It is a building or group of buildings where products are manufactured/created”. Products are then being sent…

Andreas Poyias

C++ software developer. PhD in the development of highly compressed data structures. I am a proud nerd that enjoys programming!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store