Decorator Pattern
Decorator Pattern
A Decorator
Allows dynamic allocation of new behaviours
within the object - at runtime
2
When to use it:
3
Advantages/Disadvantages
4
Implementation
1. Define decorator object that implement an interface of the extended
(decorated) object (component) by forwarding all requests to it
2. Perform the additional functionality before/after forwarding the request
5
Examples of use:
6
Thanks!
Any questions?