Home >Common Problem >What are the structural design patterns?
Structural design patterns include Composite, Facade, Proxy, Adapter, Decrator, Bridge and Flyweight (Flyweight).
In the design mode, the structural types are:
1. Composite, the combination mode: Combine objects into The tree structure represents the relationship between parts and the whole, and Composite enables users to use single objects and combined objects consistently.
2. Facade, appearance mode: Provides a consistent interface for a set of interfaces in the subsystem. Fa?ade provides a high-level interface, which makes the subsystem easier to use.
3. Proxy, proxy mode: Provide a proxy for other objects to control access to this object
4. Adapter, adapter mode: Convert one type of interface into another interface that the customer wants. The Adapter mode allows classes that cannot work together because of incompatible interfaces to work together.
5. Decrator, decoration mode: Dynamically add some additional responsibilities to an object. In terms of added functions, the Decorator mode is more flexible than generating subclasses.
6. Bridge, bridge mode: Separates the abstract part from its implementation part so that they can change independently.
7. Flyweight, flyweight mode
For more related knowledge, please visit PHP Chinese website! !
The above is the detailed content of What are the structural design patterns?. For more information, please follow other related articles on the PHP Chinese website!