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.
One Response
Subscribe to comments via RSS
Subscribe to comments via RSS
Leave a Reply
You must be logged in to post a comment.

on February 5, 2010 at 2:33 pm
· Permalink
post moar!