The Decorator Pattern
The decorator pattern is one of the classic structural patterns. A decorator wraps an existing object and provides additional functionality (decoration) whilst providing the same interface as the original object. One example which comes to mind is from an episode of Flight of the Conchords. Bret tries to ‘upgrade’ an ordinary mobile phone by gluing … Read more