Design Patterns - SPLessons

Structural Pattern

Chapter 9

SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

Structural Pattern

Structural Pattern

shape Description

Structural Pattern defines how objects are combined to form large systems. Structural Pattern deals with the connection between objects and is classified into seven types.

Adapter Pattern

Adapter Pattern is a sub category of structural pattern and is used to combine two unrelated interfaces to work together. The interface of a system can be changed easily. It allows two or more previously incompatible objects to interact.It allows reusability of existing functionality.

Bridge Pattern

Bridge Pattern is used to separate object interface from its implementation and can hide the implementation details. It allows the hiding of implementation details from the client.

Composite Pattern

Composite Pattern is used to represent the system structure in tree form. The structure of the system can be designed easily using composite pattern. It makes easier to you to add new kinds of components. It provides flexibility of structure with manageable class or interface. It is used when you want to represent a full or partial hierarchy of objects.

Decorator Pattern

Decorator Pattern adds additional tasks to an object at run time. Object is not effected and the cost of the adding responsibilities is minimized. It enhances the extensibility of the object, because changes are made by coding new classes. It simplifies the coding by allowing you to develop a series of functionality from targeted classes instead of coding all of the behavior into the object.

Flyweight Pattern

Flyweight Pattern makes objects to share the common properties. Space is saved and memory management can be done effectively using Flyweight Pattern.

Proxy Pattern

Proxy Pattern is used when you want to use the class as an interface. Object can be represented by another object using Proxy Pattern.

Facade Pattern

Facade Pattern is a one kind of structural pattern that can represent the subsystem in a single class.


shape Key Points

  • Adapter Pattern allows reusability of existing functionality.
  • Composite Pattern makes easier to you to add new kinds of components.
  • The Decorator Pattern is also known as Wrapper.