Structural Patterns  «Prev  Next»

Structural Design Patterns

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:

  1. Adapter: Adapts one interface for a class into one that a client expects
  2. Bridge: Decouple an abstraction from its implementation so that the two can vary independently
  3. Composite: A tree structure of objects where every object has the same interface
  4. Decorator : Add additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes
  5. Facade: Create a simplified interface of an existing interface to ease usage for common tasks
  6. Flyweight: A high quantity of objects share a common properties object to save space
  7. Proxy: A class functioning as an interface to another thing

Sub-Patterns

  1. Aggregate: A version of the Composite pattern with methods for aggregation of children
  2. Extensibility: also known as Framework - hide complex code behind a simple interface
  3. Pipes and filters: A chain of processes where the output of each process is the input of the next
  4. 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.
.