Mediator (cont’d)
Consequences
- colleague classes become more reusable
- limits subclassing
- centralizes control
- less opportunities to replace objects to change the behavior
Implementation
- Mediator as an Observer, Colleagues act as Subject
- straightforward in IBM Smalltalk with callback Observer variation
- abstract Mediator class is often not needed in Smalltalk
Known Uses
- Smalltalk/V Pane-ViewManager communication
- ET++