Categories: All - flexibility - responsibilities - requests

by tom ni 14 years ago

1158

Design Pattern

The chain of responsibility design pattern focuses on decoupling the sender and receiver of requests, allowing for flexible assignment of responsibilities across multiple handlers. This pattern ensures that requests are automatically ascertained and handled by the appropriate handler, which can be dynamically specified.

Design Pattern

Design Pattern

Command

user interface toolkits
support undo operations
parameterize requests

Composite

Chain of responsibility

used in our project
implementation
representing requests

request objects

qt's event system

a single handler function

hard-coded operation invocation

connecting successors
implementing the successor chain

define new links

use existing links

consequences
liabilities

unhandled maybe

benefits

flexibility in assigning responsibilities

Reduce coupling

collaborations
participants
Client
ConcreteHandler
Handler
structure
applicability
request automatical ascertain

handler specified dymatically

request to one

multi handlers

motivation
help facility
Intent
decouple requests

receiver

sender