-
Book Overview & Buying
-
Table Of Contents
TypeScript 5 Design Patterns and Best Practices - Second Edition
By :
The Bridge pattern is a structural design pattern that splits an abstraction from its implementation and allows both entities to be extended individually without them being tightly coupled.
In large software systems, different components often need to interact with various underlying implementations. For example, consider a system that supports multiple user interfaces (UIs), such as desktop, web, and mobile. Each UI type may share a common abstraction (such as a user interface component) but requires distinct implementations tailored to their specific platforms. The Bridge pattern allows developers to manage these complexities by keeping the abstraction separate from the implementation.
One analogy that represents this pattern is a universal remote control system for various electronic devices. The remote control (abstraction) works with multiple types of devices, such as TVs, DVD players, or sound systems (implementations). New types of remotes or devices...