The structural design pattern solves the coupling problem between the modules from the structure of the program. The following seven modes are included:
- Adapter mode: An excuse for the class can be matched to another interface
- Combination mode: The combination of objects
- Proxy mode: A Simple object instead of a complex object that will be called later
- Appearance Mode: A class represents a subsystem
- Enjoy meta mode: used to share objects, where each instance does not save its own state. Instead, the state is saved externally
- Bridging mode: Separating the interface of an object from its implementation
- Decorating mode: Dynamically adding responsibility to objects structural design patterns are the solution of coupling problems between modules from the structure of the program
Adapter Mode:Source Link: an example that lets you understand the adapter pattern
Meaning: transform the interface of one class into another interface that the customer wants.
Combination mode:original link: Java design pattern Learning 10--Combination mode
Meaning: The relationship between the part and the whole is represented by a tree structure, so that the client can treat some objects in the same way as the objects that are grouped together.
Proxy mode: original link: design pattern Reading notes-----Agent mode
Meaning: by referencing the proxy object to access the real object is the design motive of the proxy mode.
To be continued to improve ....
Structural patterns of Java design patterns