Differences

This shows you the differences between two versions of the page.

Link to this comparison view

it:ad:patterns:bridge [2019/03/24 12:02] (current)
Line 1: Line 1:
 +# IT:​AD:​Patterns:​Adapter #
 +
 +
 +
 +<callout type="​Navigation"​ class="​small">​
 +* [[../​|(UP)]]
 +{{indexmenu>​.#​2|nsort tsort}}
 +
 +
 +</​callout>​
 +
 +
 +<panel title="​Summary">​
 +* Used to work around incompatibilities in two libs.
 +* Often accomplised by wrapping.
 +    * eg: wrapping OtherLib (eg: MailLibrary) within a class of ours (SmtpService),​ that implements our interface (eg: IMessageService).
 +
 +
 +</​panel>​
 +
 +
 +## Notes ##
 +* Has similar traits to [[IT/​AD/​Patterns/​Adapter/​]]
 +    * The difference is that the [[IT/​AD/​Patterns/​Adapter/​]] is usually designed *afterwards*,​ to get things to work, whereas the [[IT/​AD/​Patterns/​Bridge/​]] is usually designed *beforehand*,​ to allow for future independent change.
 +* Has similar traits to [[IT/​AD/​Patterns/​Facade/​]]
 +    * The difference is that the [[IT/​AD/​Pattern/​Adapter/​]] gets two *existing* interfaces to work together -- whereas a [[IT/​AD/​Pattern/​Facade/​]] *projects* a *new* simpler Interface.