Adding behaviour without subclassing
A data source may be cached, logged, retried, or any combination. With inheritance this needs a subclass for every combination.
How does the decorator pattern avoid that?
A data source may be cached, logged, retried, or any combination. With inheritance this needs a subclass for every combination.
How does the decorator pattern avoid that?