Summary

In this chapter, we learned about structural design patterns including Composite, Decorator, Adapter, Bridge, Façade, Flyweight, and Proxy. Again we found some of these patterns are highly inter related and even similar to each other to some degree.

For example, we mixed Composite Pattern with Decorator Pattern, Adapter Pattern with Proxy Pattern, compared Adapter Pattern and Bridge Pattern. During the journey of exploring, we sometimes found it was just a natural result to have our code end in a pattern that's similar to what we've listed if we took writing better code into consideration.

Taking Adapter Pattern and Bridge Pattern as an example, when we are trying to make two classes cooperate, it comes out with Adapter Pattern and when ...

Get TypeScript Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.