Applying Open-Closed Principle with Decorator Pattern in Typescript

In the recent days some of my study focus is the SOLID principles, Clean Architecture and some related topics like Design Patterns, and I need to confess that I was using the OOP techiniques in the wrong way since college, I realised that what I was writing was just procedural code separated in different files with classes and methods, there wasn’t a single advantage by using OOP like that, so I decided to change.

Decorators between Class-based & Prototype-based programming languages

Implementing the decorator pattern will differ between Class-based and Prototype-based programming languages because of the difference in their nature. I will talk in this article about implementing the decorator pattern in both Javascript and C# programming languages. And consider some real-life scenarios to use them.

Design Patterns — Decorator Design Pattern

The decorator design pattern is a software design pattern that helps you add responsibilities to an object at runtime. This pattern is considered to be a structural design pattern. This type of pattern focuses on the relationships between classes and how they can help solve specific problems.