mirror of
https://github.com/JakubVojvoda/design-patterns-cpp.git
synced 2025-12-18 13:24:37 +03:00
add Mediator pattern
This commit is contained in:
12
mediator/README.md
Normal file
12
mediator/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
## Mediator
|
||||
|
||||
Mediator pattern has behavioral purpose and applies on objects.
|
||||
The pattern defines an object that encapsulates how a set of objects interact.
|
||||
It promotes loose coupling by keeping objects from referring to each
|
||||
other explicitly, and it lets you vary their interaction independently.
|
||||
|
||||
### When to use
|
||||
|
||||
* a set of objects communicate in well-defined but complex ways
|
||||
* reusing an object is difficult because it refers to and communicates with many other objects
|
||||
* a behavior that's distributed between several classes should be customizable without a lot of subclassing
|
||||
Reference in New Issue
Block a user