↑ arvau

Wikipedia / Structural pattern

A structural pattern is a software design pattern that encapsulates relationships between entities.

Examples

Examples include:

  1. Adapter pattern: Adapts one interface for a class into one that a client expects.

    1. Adapter pipeline: Use multiple adapters for debugging purposes.

    2. Retrofit Interface Pattern: An adapter used as a new interface for multiple classes at the same time.

    Aggregate pattern: A version of the Composite pattern with methods for aggregation of children.

  2. Bridge pattern: decouple an abstraction from its implementation so that the two can vary independently.

    1. Tombstone: An intermediate lookup object contains the real location of an object.

    Composite pattern: A tree structure of objects where every object has the same interface.

  3. Decorator pattern: Supports adding additional functionality to an object at runtime. Prevents issue where subclassing would result in an exponential rise of new classes.

  4. Extensibility pattern: a.k.a. framework, Hides complex code behind a simple interface.

  5. Facade pattern: Creates a simplified interface of an existing interface to ease usage for common tasks.

  6. Flyweight pattern: A large quantity of objects share a common properties object to save space.

  7. Marker interface pattern: An empty interface to associate metadata with a class.

  8. Pipes and filters: A chain of processes where the output of each process is the input of the next.

  9. Opaque pointer: A pointer to an undeclared or private type, to hide implementation details.

  10. Proxy pattern: A class functioning as an interface to another thing.

See also

References