Should you make your C++ classes more intelligent or centralize the intelligence and use dumbed-down surrounding classes? The natural world tends to prefer a pass-the-parcel style of distributed intelligence, which reduces single points of failure and potentially leads to more stable systems. In this article, Stephen Morris shows you how to raise the IQ of your classes while simultaneously allowing other (possibly) more-qualified classes to handle specific problems. The chain of responsibility pattern provides an elegant model for facilitating this behavior.
I’m glad when OSNews posts links to articles on design patterns. At first I didn’t know what to make of them, but after reading “Design Patterns Explained: A New Perspective on Object-Oriented Design”, I have found them invaluable.
As a side note, it seems nobody is posting comments to stories with the widget icons (marked “General Development”.) Just an observation.
Though I know this pattern, still I found it to be interestng and came to know of a beautifull implementation in networking.
Thanks.