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



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 is one of the most important and useful design patters defined by the Gang of Four: 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 principles as well!


There are no comments on this lesson, start the conversation below ...

You need to go PRO to post comments.

Lessons in Design Patterns