Sunday, November 20, 2011

OODesign - Design Pattern 5 (Behavioral Patterns)

Ref: http://www.oodesign.com/design-principles.html

Template Method

> Define the skeleton of an algorithm in an operation, deferring some steps to subclasses.
> Template Method lets subclasses redefine certain steps of an algorithm without letting them to change the algorithm's structure.


Visitor Pattern
> Represents an operation to be performed on the elements of an object structure.
> Visitor lets you define a new operation without changing the classes of the elements on which it operates.


Null Object Pattern
> Provide an object as a surrogate for the lack of an object of a given type.
> The Null Object Pattern provides intelligent do nothing behavior, hiding the details from its collaborators.

No comments:

Post a Comment