Field Notes: Using the Decorator Pattern
The power of the Decorator pattern requires that the instantiation of the chains of objects be completely decoupled from the Client objects that use it. This is most typically accomplished through the use of factory objects that instantiate the chains based upon some configuration information.
The Decorator Pattern: Key Features
|
Get Design Patterns Explained: A New Perspective on Object-Oriented Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.