Structural Patterns

These design patterns concern class and object composition. Concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionality.

  • Design Pattern,  Structural Patterns

    Decorator Design Pattern

    As like name suggest this type of pattern is used to add new functionality without altering the class, Decorator pattern allows to add new functionality in an existing object without altering its structure. This type of design pattern comes under structural pattern as this pattern acts as a wrapper to existing class.

  • Design Pattern,  Structural Patterns

    Filter Design Pattern

    Filter pattern or Criteria pattern is a design pattern that enables developers to filter a set of objects, using different criteria, chaining them in a decoupled way through logical operations. This type of design pattern comes under structural pattern as this pattern is combining multiple criteria to obtain single criteria.

  • Design Pattern,  Structural Patterns

    Composite Design Pattern

    Composite pattern is used where we need to treat a group of objects in similar way as a single object. It composes objects in term of a tree structure to represent part as well as whole hierarchy. This type of design pattern comes under structural pattern as this pattern creates a tree structure of group of objects.

  • Design Pattern,  Structural Patterns

    Adapter Design Pattern

    Adapter pattern works as a bridge between two incompatible interfaces. This type of design pattern comes under structural pattern as this pattern combines the capability of two independent interfaces. This pattern involves a single class which is responsible to join functionality of independent or incompatible interfaces. A real life example could be a case of card reader which acts as an adapter between memory card and a laptop. You plugins the memory card into card reader and card reader into the laptop so that memory card can be read via laptop.