Extending your objects with the decorator pattern

In this recipe, we will learn how to implement the decorator pattern, which provides the ability to extend the functionality of a class without the need for inheritance, which by design is static in nature. This recipe is important because inheritance doesn't support the ability to extend a class at runtime, a problem the decorator pattern addresses. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset