The objective of this chapter is to learn about structural patterns. Structural patterns are patterns that focus on creating complex structures by making use of relations between objects and classes. Most structural patterns are based on inheritance. In this chapter, we will focus only on the following GOF patterns:
- The adapter pattern
- The proxy pattern
- The bridge pattern
- The decorator pattern
- The composite pattern
- The façade pattern
- The flyweight pattern
There are other identified structural patterns that we may not be able to cover in detail, but it is worth knowing about them. These are the following:
- Marker interface: This uses an empty interface to mark specific classes (such as serializable), thus making searching by interface name possible. For more information, please read the article, Item 37 - using marker interfaces to define types...