#354 Add maven model for feature toggle design pattern

This commit is contained in:
Joseph McCarthy
2016-01-25 21:14:24 +00:00
parent cf10bd1d05
commit d7526fc7c0
86 changed files with 1165 additions and 270 deletions

View File

@@ -10,20 +10,23 @@ tags:
- Difficulty-Beginner
---
**Also known as:** Wrapper
## Also known as
Wrapper
**Intent:** Attach additional responsibilities to an object dynamically.
## Intent
Attach additional responsibilities to an object dynamically.
Decorators provide a flexible alternative to subclassing for extending
functionality.
![alt text](./etc/decorator_1.png "Decorator")
![alt text](./etc/decorator.png "Decorator")
**Applicability:** Use Decorator
## Applicability
Use Decorator
* to add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects
* for responsibilities that can be withdrawn
* when extension by subclassing is impractical. Sometimes a large number of independent extensions are possible and would produce an explosion of subclasses to support every combination. Or a class definition may be hidden or otherwise unavailable for subclassing
**Credits**
## Credits
* [Design Patterns: Elements of Reusable Object-Oriented Software](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)