Behavioral patterns
Chain of Responsibility
Passes a request along a chain of handlers until one of them deals with it.
Article
Chain of Responsibility: pass it on until someone takes care of it
The Chain of Responsibility pattern through complaints in a pierogi place: a bot, a shift manager and the owner form a chain, and a complaint travels until it reaches someone authorised. The classic variant and the middleware pipeline, code in five languages.
Related articles
- Decorator – adding behaviour layer by layer
Decorator wraps an object in another object with the same interface and adds behaviour before or after the call. An example of caching, retries and logging for an exchange rate provider in C#,…
Challenges
Around the topic
- Łańcuch zobowiązań / Chain of Responsibility article · web · Refactoring.Guru
- Design Patterns: Elements of Reusable Object-Oriented Software book · openlibrary · Erich Gamma, John Vlissides, Richard Helm, Ralph Johnson
- Building a Request Pipeline for Separating Concerns with Pipes & Filters video · youtube · CodeOpinion
- Design Patterns – Iterators, Observers, and Chains, Oh My podcast · apple-podcasts · Coding Blocks
- Chain of Responsibility article · web · Refactoring.Guru