Solly
Lesson

Vocabulary: Mediator

Vocabulary after construction: Mediator

The previous exercise began with Expected Behavior and design pressure, not with this name.

The structure that emerged is traditionally called Mediator.

What the reasoning established

  • Stable role: Inventory, payment, and event publishing are independent participants.
  • Change pressure: Participant implementations change independently; workflow ordering is stable.
  • Ownership/lifetime when relevant: The composition root wires participants; the coordinator owns only workflow state.
  • Structural consequence: A coordinator receives each participant.
  • Runtime topology: reserve → pay → publish, with release compensation on pay failure.

Nearby distinction

Observer: Mediator owns required workflow coordination; Observer publishes completed facts to independent reactions.

Simplify

Ask whether any abstraction can be removed while preserving the original acceptance behavior and design-stress property. If yes, prefer the simpler design.

Use the pattern name to communicate a structure you can already justify. Do not use the name as a recipe that replaces requirements analysis.

Sign in with an enabled provider to save your lesson progress.
Sign in to track progress

Loading sign-in options…