A commentary on behavioral patterns

Sometimes, some behavioral patterns overlap each other, while other times, they make perfect individual sense uniquely. For example, in terms of the class diagram, the structural implementation state and strategy patterns are quite similar, but they exhibit completely different behavior as well as have their own different intent. Remember, the state pattern always involves a state machine situation.

One could argue that there is an overlap between the chain of responsibility and the decorator pattern; while both satisfy the single responsibility principle, one tackles the addition of the functionality dynamically through the design of the structure and other via its behavior. Also, there is a big difference between the class diagram and implementation of the decorator and the chain of responsibility pattern.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.118.229