Overview

Structural patterns focus on how classes and objects are composed to form larger structures. They use inheritance to compose interfaces and define ways to compose objects to obtain new functionality.

Common Patterns

  • Adapter: Allows objects with incompatible interfaces to collaborate.
  • Decorator: Lets you attach new behaviors to objects by placing these objects inside special wrapper objects that contain the behaviors.
  • Facade: Provides a simplified interface to a library, a framework, or any other complex set of classes.
  • Proxy: Lets you provide a substitute or placeholder for another object.
  • Composite: Lets you compose objects into tree structures and then work with these structures as if they were individual objects.

Related Terms