Structural Design Patterns (original) (raw)

Last Updated : 6 May, 2026

Structural Design Patterns focus on organizing classes and objects to build larger, efficient, and maintainable software structures. They simplify relationships, support code reuse, and help create scalable architectures.

**Example: A drawing editor that lets users draw and arrange graphical elements (lines, polygons, text, etc.) into pictures and diagrams. The drawing editor's key abstraction is the graphical object, which has an editable shape and can draw itself.

Types of Structural Design Patterns

There are mainly 7 types of Structural design patterns

types_of_STRUCTURAL

Structural Design Patterns

1. Adapter Design Pattern

Adapter or Adapter Design Pattern also knows as wrapper. It converts the interface of a class into another interface which clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.

**Uses

Adapter pattern is used to make an existing class compatible with a new interface without changing its source code.

2. Bridge Design Pattern

By separating an object's implementation (how it does something) from its abstraction (what it does), the Bridge Design Pattern enables the two to develop separately.

Imagine you have different types of devices (like TVs and Radios) and different ways to control them (like Remote and Voice Control). Instead of tightly coupling each device with each control type, the Bridge pattern lets you connect them loosely.

**Uses

Bridge pattern is used to separate an abstraction from its implementation so that both can vary independently.

3. Composite Design Pattern

Composite Design Pattern composes objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.

**Uses

Composite pattern is used to treat individual objects and compositions of objects uniformly in a part-whole hierarchy.

4. Decorator Design Pattern

The Decorator Design Pattern allows adding new features to an object dynamically without changing its structure. Instead of creating multiple variations, you wrap the original object with additional functionalities.

**Uses

To add responsibilities to individual objects dynamically and transparently, that is, without affecting other objects.

5. Facade Design Pattern

Facade Design Pattern provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.

**Uses

Facade pattern is used to provide a unified and simplified interface to a set of interfaces in a subsystem.

6. Flyweight Design Pattern

The Flyweight Design Pattern reduces memory usage by sharing common data across multiple objects instead of creating duplicates. It separates shared properties from unique ones to optimize resource usage.

**Uses

The Flyweight pattern's effectiveness depends heavily on how and where it's used. Apply the Flyweight pattern when all of the following are applicable:

7. Proxy Design Pattern

The Proxy Design Pattern provides a surrogate or placeholder object that controls access to another object, allowing additional operations like access control, lazy loading, or logging without modifying the original object.

**Uses

Proxy method is applicable whenever there is a need for a more versatile or sophisticated reference to an object than a simple pointer. Here are several common situations in which the Proxy pattern is applicable:

Importance

Structural patterns provide several key benefits:

Challenges

Using structural patterns also comes with some challenges: