In software engineering, structural design patterns are design patterns that ease the design by identifying a simple way to realize relationships between entities. Structural patterns are for tying together existing function.
Examples of Structural Patterns include:
Adapter: Adapts one interface for a class into one that a client expects
Bridge: Decouple an abstraction from its implementation so that the two can vary independently
Composite: A tree structure of objects where every object has the same interface
Decorator : Add additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes
Facade: Create a simplified interface of an existing interface to ease usage for common tasks
Flyweight: A high quantity of objects share a common properties object to save space
Proxy: A class functioning as an interface to another thing
Sub-Patterns
Aggregate: A version of the Composite pattern with methods for aggregation of children
Extensibility: also known as Framework - hide complex code behind a simple interface
Pipes and filters: A chain of processes where the output of each process is the input of the next
Private class data: Restrict accessor/mutator access
Design phase
The phase of a software project that concerns itself with the discovery of the structural components of the software system to be built, not with implementation details.
Ad Gang of Four Patterns
Figure 3.1 provides a visualization of the Structural design patterns.
Figure 3.1: Structural patterns focus on creating new structures from existing ones
The focal points for Structural design patterns lie in creating new structures without destroying the old ones. On top of that, the standard of loose coupling for reuse and change are both maintained and enhanced in the Structural patterns.
.