Structural Design Pattern - Software Engineering

Structural Design Pattern - Software Engineering  👽

In the industry we have to use Design Patterns to develop systems. There are 3 types of design patterns.

  1. Creational Design Pattern - helps instantiate objects
  2. Structural Design Pattern - helps organize relationships between objects
  3. Behavioral Design Pattern - helps solve communication problems between objects
In this blog we will discuss about Structural Design Pattern.

Structural Design Patterns 

  • Structural design patterns focus on the composition of classes and objects to form larger structures while ensuring flexibility and maintainability. 
  • These patterns provide solutions to ease the design of relationships between entities, making systems easier to extend and change.

Key characteristics of structural design patterns : 

  • Flexibility : Allowing changes to a software system's structure without major modifications to its individual components.
  • Reusability : By defining relationships between entities, structural patterns promote code reuse.
  • Scalability : Enabling the system to scale by efficiently managing object interactions.

Common structural design patterns: 

  1. Adapter Design Pattern  : Converts one interface into another interface expected by clients.
  2. Bridge Design Pattern : Separates an idea from how it's implemented, allowing both to change independently.
  3. Composite Design Pattern : Allows individual objects and compositions of objects to be treated uniformly.
  4. Decorator Design Pattern : Adds new features to an object without changing its code.
  5. Facade Design Pattern : Offers an easy way to use a complex system.
  6. Flyweight Design Pattern : Saves memory by reusing shared parts of objects.
  7. Proxy Design Pattern : Uses a substitute to manage access, add features, or save costs.
                           A trick to remember Behavioral Design Patterns :

                            A Big Cat Danced For Fun, Playing Piano.
                                    
                                     ABCD2FP

Benefits of structural design patterns

  • Simplify system architecture.
  • Enhance the flexibility of object composition.
  • Improve code maintainability and readability.
  • Support the adherence to SOLID principles, especially the "Open/Closed" principle.



Blogs that you can refer to improve your knowledge about Design Patterns. 

Comments

Popular posts from this blog

Sorting Algorithms - JAVA👽

Object Oriented Programming - JAVA- class boundary, variable types, modifiers, java main method

Object Oriented Programming - JAVA- Method Overriding