Warning: session_start() [function.session-start]: open(/var/lib/php-sessions//sess_9360fc884175566c0c43fb51b25643c8, O_RDWR) failed: Permission denied (13) in /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php:2) in /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php:2) in /datas/vol2/w4a141629/var/www/goprod.bouhours.net/htdocs/common.php on line 3
GOPROD • GOod PRactice in Object oriented Design
Login :
Password :

Design patterns

Chain of responsibility

Static diagram :

Static diagram

Description :

Type :  Be  (Behavioral)
Intent : Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.
Applicability : Use Chain of Responsibility when :
- more than one object may handle a request, and the handler isn't known a priori. The handler should be ascertained automatically.
- you want to issue a request to one of several objects without specifying the receiver explicitly.
- the set of objects that can handle a request should be specified dynamically.

Strong points :

  1. 1. Extensibility
    1. 1.1 Objects chaining factorization
    2. 1.2 Unique access point for the client class
    3. 1.3 Addition or removal of a new element in the chain does not need code modification

Pattern's participants :

Problems :

  1. 1. Knowledge chaining
Les têtes de mule
Cédric BOUHOURS
Cédric BOUHOURS
Cédric BOUHOURS

Warning: Unknown: open(/var/lib/php-sessions//sess_9360fc884175566c0c43fb51b25643c8, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php-sessions/) in Unknown on line 0