(According to the msdn webcast courses)
Dependency inversion principle:
Abstraction should not depend on implementation details, but on abstraction. Implementation Details are often changeable.
Abstract A directly depends on implementation details B:
Abstract A depends on abstract B, and implementation B depends on abstract B:
Prototype Design Pattern: it often faces the construction of some complex objects with complex structures. Due to the changes in requirements, these objects also face drastic changes. We need to isolate these variable objects so that object changes do not affect customersProgramCall these objects.
Gof: Uses prototype instances to batch create object types. By copying these prototypes, you can create new objects.
When the objects used change frequently, the users and specific objects of the class objects are isolated and the variable classes must have stable interfaces.
For example, create a prototype of a specific object for the client program to call:
It is easier to clone or serialize classes.
<End>