Chain of Responsibility
There are 2 entries for the tag Chain of Responsibility

Speaking to a colleague about the Decorator pattern, I think I was unduly harsh on decorators the last time I wrote on the subject.  I'll start off by re-iterating my opinion that writing pass-through methods is for the most part a horrible waste of time and a code smell to boot.  However, there are some cases where proxy/decorator functionality is useful where there are relatively few methods you need to proxy.  Ironically, one of these is my very first post.  It employs the decorator pattern to give you a class that executes Retlang Commands, but allows you to halt processing...

This is the last pattern I'm writing up, and it's one of my favourites.  The chain of responsibility pattern is a brilliant way of dealing with special cases and functional complexity, and it does it in a way that allows you to gain the advantages of hard coding without the disadvantages of inflexibility.  Here's the basic idea: you have a list of Handlers.  Each has two operations: Do I handle this message? Process the message. The original GoF statement of chain of responsibility implements the list as a linked list, hence the term "chain".  This has the...