Structural Design Patterns

Kamalmeet Singh
2 min readMay 23, 2023

--

Structural design patterns help put together different objects and classes to achieve a complete structure to solve the problem at hand. Mentioned in this post are commonly used structural design patterns.

Structural Design Patterns

Adapter: One of the most common structural patterns that helps two incompatible components talk to each other. For example, for a caller that communicates in JSON, but the provider service only understands XML, an adapter helps in this situation.

Reference: https://kamalmeet.com/design-patterns/adapter-design-pattern/

Composite: To manage the cases where there can be a cyclic relationship between objects, for example, a Manager himself is an Employee, and at the same time Manager has a relationship (manages) other employees.

Reference: https://kamalmeet.com/design-patterns/composite-design-pattern/

Facade: Hide complex implementation details from the caller, which calls the facade. The facade layer then communicates with various other implementing components and returns the final response back.

Reference: https://kamalmeet.com/design-patterns/facade-pattern/

Proxy: A common pattern hiding the actual implementation from the caller client. The client calls the proxy class or proxy layer, which in turn communicates with implementing component.

Reference: https://kamalmeet.com/design-patterns/proxy-design-pattern/

Bridge: The pattern that helps decouple an abstraction from its implementation.

Reference: https://kamalmeet.com/design-patterns/bridge-design-pattern/

Flyweight: The flyweight pattern helps reuse objects where ever possible and only creates a new object if the object is not available. It sounds a bit overlapping but object pool makes sure objects of the same type are pooled, whereas flyweight takes care of different object implementations, stored as a singleton.

Reference: https://www.tutorialspoint.com/design_pattern/flyweight_pattern.htm

Decorator: The core component is decorated or enhanced by additional decorator features on the fly.

Reference: https://www.tutorialspoint.com/design_pattern/decorator_pattern.htm

--

--

Kamalmeet Singh

Tech Leader - Building scalable, secured, cloud-native, state of the art software products | Mentor | Author of 3 tech books |