Monthly Archives: December 2006

the decorator describes a solution to the problem of adding functionality to an object without actually changing any of the code in that object.

how do i recognize where i need a decorator?

the formal definition of the strategy, as given by “design patterns, elements of reusable object-oriented software” by erich gamma, richard helm, ralph johnson and john vlissides is:

attach additional responsibilities to an object dynamically

the need to dynamically alter the functionality (or behavior) of an object arises in either of two situations. first, where the source code for the object is simply not available; perhaps… Continue reading