Skip to main content
  • 1831 Accesses

Abstract

In the world of API implementations, bridges are incredibly useful. In fact, they’re probably one of the most underused patterns. Of all patterns, this is the simplest to start putting into practice immediately. If you’re building a JavaScript API, this pattern can be used to ensure that the dependent classes and objects are coupled to it loosely. As defined by the Gang of Four, a bridge should “decouple an abstraction from its implementation so that the two can vary independently.” Bridges are very beneficial when it comes to event-driven programming, which is a style that is used often in JavaScript.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Ross Harmes and Dustin Diaz

About this chapter

Cite this chapter

(2008). The Bridge Pattern. In: Pro JavaScript Design Patterns. Apress. https://doi.org/10.1007/978-1-4302-0496-1_8

Download citation

Publish with us

Policies and ethics