GofPatterns Gofpatterns  





Structural Patterns  «Prev 

Common Structural Patterns

Structural patterns primarily:
  1. Deal with objects delegating responsibilities to other objects. This results in a layered architecture of components with a low degree of coupling.
  2. Facilitate inter-object communication when one object is not accessible to the other by normal means or when an object is not usable because of its incompatible interface.
  3. Provide ways to structure an aggregate object so that it is created in full and to reclaim system resources in a timely manner.
Structural Patterns: Designing objects to satisfy particular project constraints. These work with the way objects are connected with other objects to ensure that changes in the system do not require changes to those connections.


Adapter pattern is a simple pattern that provides a wrapper for a class or object that uses a different interface.
Adapter pattern is a simple pattern that provides a wrapper for a class or object that uses a different interface.

Bridge Pattern decouples the interface from the implementation without using inheritance.
Bridge Pattern decouples the interface from the implementation without using inheritance.

Composite Pattern describes a tree-like structure in which individual parts have the same interface as the whole pattern.
Composite Pattern describes a tree-like structure in which individual parts have the same interface as the whole pattern.


Decorator Pattern adds responsibilities to individual objects by wrapping them in a class that exposes their original interface.
Decorator Pattern adds responsibilities to individual objects by wrapping them in a class that exposes their original interface.

Facade Pattern combines a group of diverse classes with complicated interrelations into a single, simple unified interface that handles the needs
Facade Pattern combines a group of diverse classes with complicated interrelations into a single, simple unified interface that handles the needs

Proxy Pattern is similar to the Adapter pattern in that a surrogate objects stands in between the client classes
Proxy Pattern is similar to the Adapter pattern in that a surrogate objects stands in between the client classes