Managing complex objects and collections of objects can quickly turn into a mess.Structuralpatterns were designed to help you think about object composition and to change disorder into order.
Structural patterns come in different shapes and sizes. Some consume one interface and expose the same or a slightly modified version of that interface to the user. Others consume multiple objects, or enhance their behavior in aspects that are completely unrelated to the functionality of consumed objects.
In this chapter, we'll firstly look into three unrelated structural patterns that cover different use cases. At the end, the bridge pattern will introduce us to the area of patterns that consume only one interface and mostly leave it unchanged, which will be the main topic of the next chapter. In this chapter, you will learn about the following:
- A composite pattern, which allows clients to ignore the difference between simple and complex objects...