Software Design – The Composite Pattern
The Composite Pattern is one that is not taken advantage of as often as it might outside of frameworks. This is an approach to design that allows you to treat a family of objects the same. It is a quintessential reason for and use of an interface. The flexibility is critical to being able to handle groups of different objects the same way any individual one would be treated. The Composite Pattern Defined As always, we will start with the “Gang of Four” intent to set the stage for our discussion. “Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.” I think it may be most comfortable to focus on... Read more