Sign in Go Pro

Design Patterns

The Decorator Pattern

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Previous

About

The Decorator pattern allows you to easily compose objects by 'decorating' an instance with other decorators. Learn how to build a decorator in this lesson. The [Decorator](https://en.wikipedia.org/wiki/Decorator_pattern) is one of the most important and useful design patters defined by the [Gang of Four](https://en.wikipedia.org/wiki/Design_Patterns): it allows a single instance of an object to **increase its functionality**, without modifying either its source or affecting the other instances of the same class. And respecting the [SOLID](https://en.wikipedia.org/wiki/SOLID_(object-oriented_design)) principles as well!

Lessons in Design Patterns