Decorator Pattern Added

What if you need to alter the functionality of a class method in some places without altering the original class? The Decorator pattern may be just what you’re looking for, and it comes with a bonus: you can chain object decorators together to add as many features as you need.

As with other design patterns, the Decorator pattern helps with maintainability. It allows you to write reusable code that can affect many objects whenever it is needed, but that will stay out of the way when it is not.

Posted on September 27, 2009 at 10:41 pm by Eric B · Permalink
In: Design Patterns

One Response

Subscribe to comments via RSS

  1. Written by thinsoldier
    on February 5, 2010 at 2:33 pm
    · Permalink

    post moar!

Subscribe to comments via RSS

Leave a Reply

You must be logged in to post a comment.