December 2017
Intermediate to advanced
468 pages
13h 12m
English
The decorator pattern attaches additional responsibilities to an object dynamically. It provides an alternative way (by composition) to subclass and to extend the functionality of an object at runtime.
This pattern creates a decorator class by wrapping the original class to provide additional functionalities without impact to the signature of methods.

Observe the preceding diagram as it depicts invoice functionalities extended by composition dynamically (runtime).
Let's list the benefits:
Read now
Unlock full access