Chain-of-responsibility pattern: Difference between revisions

Content deleted Content added
This isn't the end of a sentence, nor is it the kind of abbreviation which requires a full stop.
Line 5:
This pattern promotes the idea of [[loose coupling]].
 
The chain-of-responsibility pattern is structurally nearly identical to the [[decorator pattern]], the difference being that for the decorator, all classes handle the request, while for the chain of responsibility, exactly one of the classes in the chain handles the request. This is a strict definition of the Responsibility concept in the [[Design Patterns|GoF]] book. However, many implementations (such as loggers below, or UI event handling, or servlet filters in Java, etc.) allow several elements in the chain to take responsibility.
 
==Overview==