"Design Model Design Pattern" reading notes
Bridge mode
Alias
Handle / Body
structure
purpose
A bridge is created between the interface / Abstract and Implementation. Thus,
1. It is easy to provide different implementations for the interface
2, the interface can be easily expanded (derived) and is not related to the specific implementation
Contact and differences with other modes
1, Abstract Factory can be used to create Bridge
AbstractProduct ß -------- à Implementor
2, the difference between Bridge and Adapter
The main purpose of Adapter is to utilize an existing implementation. The purpose of Bridge is to provide different implementations for one (possible extension) interface.
Reference
"Design Pattern" Gang-Of-4 1997