January 2020
Intermediate to advanced
532 pages
13h 31m
English
The chain-of-responsibility (CoR) pattern is used to process the request using a chain of request handlers, whereas each handler has its own distinct and independent responsibility.
This pattern is quite common in many applications. For example, web servers usually handle HTTP requests using so-called middleware. Each piece of middleware is responsible for performing a specific task—for example, authenticating requests, maintaining cookies, validating requests, and performing business logic. A specific requirement about the CoR pattern is that any part of the chain can be broken at any time, resulting in an early exit of the process. In the preceding web server example, the authentication middleware may ...
Read now
Unlock full access