Cidenet+Blog+Clean Dev Practices+Structural patterns

Structural patterns

Structural patterns are concerned about the composition of classes and objects to form larger structures. These define how each component or entity should be structured to achieve flexible modules that need to interconnect with each other to form a larger system.

Within the structural patterns, there are class patterns and object patterns, the difference between these two is that class patterns describe how inheritance can be used to provide more usable interfaces, while object patterns describe how objects can be arranged into larger structures using object compositing, or by nesting objects within others.

Structural patterns help us attack problems such as:

  • Interconnect two classes that cannot work together due to incompatibility of interfaces.
  • Compose objects into tree-like structures to represent hierarchies.
  • Add tasks to objects dynamically.
  • Represent a subsystem using a single class.
  • Share objects efficiently.
  • In the next bulletins, each of the creational patterns will be deepened, which are: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, and Proxy.

Sources:

https://www.gofpatterns.com/design-patterns/module5/structural-design-pattern.php

https://sourcemaking.com/design_patterns/structural_patterns

Design Patterns : Elements of Reusable Object-Oriented Software

 

Contact us

Allow us to contact you

    Medellín - Colombia

  • Calle 47D #72-29
  • (+57) 4 3222567
  • comunicaciones@cidenet.com.co

    United States

  • 1200 Colorado Blvd, Denver Colorado 80220
  • (+1) 7723619239
  • jceballos@cidenet.net
WhatsApp