O'Reilly logo

TypeScript Design Patterns by Vilic Vane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Bridge Pattern

Bridge Pattern decouples the abstraction manipulated by clients from functional implementations and makes it possible to add or replace these abstractions and implementations easily.

Take a set of cross-API UI elements as an example:

Bridge Pattern

We have the abstraction UIElement that can access different implementations of UIToolkit for creating different UI based on either SVG or canvas. In the preceding structure, the bridge is the connection between UIElement and UIToolkit.

Participants

The participants of Bridge Pattern include:

  • Abstraction: UIElement

    Defines the interface of objects to be manipulated by the client and stores the reference to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required