Wednesday 8 February 2012

Decorator Design Pattern

Type of Structural Pattern:

Purpose: Add additional responsibilities dynamically to an object.

Adapter Vs Decorator: Adapter changes the object interface it self, But the decorator does not change the object it will add aditional responsiblity to it.

Key:
1) Decoration adds functionality to objects at runtime which would make debugging system functionality harder.
2) Decoration it is also possible to remove the added functionalities dynamically.

No comments:

Post a Comment