Encyclopedia > Chain of responsibility pattern

  Article Content

Chain-of-responsibility pattern

Redirected from Chain of responsibility pattern

In computer programming, chain-of-responsibility pattern is one of design patterns where command objects are coming from somewhere, processing logic is spread between a number of objects and the commands are distributed.

Each object is smart enough to know wither it can handle something, how to pass it off, and how to add to the end of the chain.

Permutations: Commands may be sent in alternate directions out, forming a tree of responsibility. Recursion could continue until the command is processed, or the entire tree has been explored.

An XML interpreter (parsed, but not yet executed) example might be fitting.

This pattern promotes the idea of loose coupling[?], a programming practice.

The article is originally from Perl Design Patterns Book



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Springs, New York

... is 89.82% White, 1.47% African American, 0.20% Native American, 1.45% Asian, 0.02% Pacific Islander, 3.86% from other races, and 3.17% from two or more races. 16.24% of the ...

 
 
 
This page was created in 25.4 ms