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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights 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
DOI: https://doi.org/10.1007/978-1-4302-0496-1_8
Publisher Name: Apress
Print ISBN: 978-1-59059-908-2
Online ISBN: 978-1-4302-0496-1
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books