In this tutorial, I’ll answer a question that was sent to me. The question pertains to how can we add additional features to code the right way.
When new features are needed it is a bad idea to add new code to older classes. This makes compact easy to understand classes complicated because they break the Single responsibility principle. I’ll show you here how the decorator design pattern instead places each special case behavior (Embellishment) into its own class.
This is a fabulous pattern. The code below will help you learn from the video. Continue reading Code Refactoring 16
