yet another blog

[Tech] Decorator design pattern

12 Mar 2020

The decorator pattern allows behaviour to e added to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class. provides an alternative to subclassing for extending functionality. supports the Single Responsibility Principle, as it allows functionality to be devided between classes with unique areas of concern.


comments powered by Disqus