Difference between revisions of "Decorator pattern"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Created page with "In object-oriented programming, the '''decorator pattern''' (also known as Wrapper, an alternative naming shared with the Adapter pattern) is a design pattern that allows...")
 
(No difference)

Latest revision as of 08:17, 24 August 2016

In object-oriented programming, the decorator pattern (also known as Wrapper, an alternative naming shared with the Adapter pattern) is a design pattern that allows behavior to be added to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class.

The decorator pattern is often useful for adhering to the Single responsibility principle, as it allows functionality to be divided between classes with unique areas of concern.

See also

External links