Lesson
Vocabulary: Chain of Responsibility
Vocabulary after construction: Chain of Responsibility
The previous exercise began with Expected Behavior and design pressure, not with this name.
The structure that emerged is traditionally called Chain of Responsibility.
What the reasoning established
- Stable role: Handlers share handle(context).
- Change pressure: Validation/processing steps can be inserted independently.
- Ownership/lifetime when relevant: The root assembles handler order explicitly.
- Structural consequence: The pipeline owns an ordered collection of handlers.
- Runtime topology: Pass through in order; first failure terminates.
Nearby distinction
Decorator: a chain routes through ordered possible handlers and may terminate; decorators wrap one component as one composed capability.
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…