Design Problems
-
Extending Functionality at Run-Time
-
How can responsibilities
be added to (and withdrawn from)
an object dynamically?
-
How can the functionality of an object be extended
at run-time?
-
How can a simple class be defined
that is extended at run-time
instead of implementing all foreseeable functionality
in a complex class?
-
Flexible Alternative to Subclassing
-
How can a flexible alternative be provided to subclassing
for extending the functionality of a class at compile-time?
Refactoring Problems
-
Inflexible Code
-
How can classes that include hard-wired extensions
(compile-time implementation dependencies)
be refactored?
Move Embellishment to Decorator (144)
[JK05]