Summary
In this chapter we discussed ways in which we can structure our code to increase performance or mitigate incompatibilities between classes or create modular code.
The following table summarizes the structural design patterns:
|
Design pattern |
Summary |
|
The façade pattern |
This provides a simple interface for the existing complex functionalities |
|
The adapter pattern |
This helps in communication between two incompatible existing classes |
|
The bridge pattern |
This helps in communication between two classes, which are under heavy modification |
|
The composite pattern |
This enables unified access to a part and part-whole hierarchy |
|
The decorator pattern |
This adds capabilities to an existing class without changing its behavior |
|
The flyweight ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access