Summary
Knowledge of structural patterns along with newly added Java syntax enhancements not only improves maintainability but also enforces all previously learned OOP concepts and improves responsiveness to potential deviations in code behavior such as exceptions, unexpected crashes, or logical issues.
We built a solid foundation through the examples in this chapter and learned how to use the adapter pattern to create collaboration between mutually incompatible objects, and also how to transparently separate an object’s implementation from its abstraction using the bridge pattern. The composite pattern presented a way to organize and wrap objects into a tree structure around the underlying business logic. We investigated the possibility of expanding an object’s functionality by using the decorator pattern. A way to simplify communication between objects was presented by the facade pattern, followed by the filter pattern, which allows us to select only the instances...