According to the msdn webcast courses)
Gof: separates abstract and implementation parts so that they can all change independently.
As shown in:
Obviously, when implementation details B are changeable, we usually consider using the prototype mode to construct the system. However, when abstract B is easy to change for some reason, that is, the variable object changes from two dimensions or more vertices, we should consider the bridging mode.
: Both red and blue are changeable, and the red part is dominant. The blue implemetor (which can be extended to more changing directions) class is combined into the primary abstract class role action in the form of an abstract class, in the primary implementation object refined1_action, the dependencies between impla and implb are isolated (the specific objects in the following sections are not mutually dependent ).
Example: In a tank war game that needs to run on both the PC and mobile platforms at the same time, there are two changes in the tank type. On the one hand, there are many different types of tanks, and on the other hand, the operation and drawing methods of the same tank running on the two platforms are also changing (different ).
In the tank abstract class, "Combination" Changes in multiple directions, platform changes are combined in the form of fields, and the platform abstract class is used, this isolates the implementation of specific platforms. Changes in all aspects depend only on the internal system. Changes in the tank type do not depend on the platform. Changes in the same platform do not depend on the tank type.
Abstract classes are usually used.
Conclusion