A point of view on relying on the inversion principle

xiaoxiao2021-03-06  48

A point of view on relying on the inversion principle

Bob Uncle teaches us: 1) The high level does not depend on the bottom, but the high-level and underlying are related to abstraction; 2) Abstraction does not depend on the details, but the details depend on abstraction; very classic methodology. But a point of his old man is that I can't agree. He believes that structured programming is generally on the bottom level, and even "relying on inverted" this name is so.

However, the design is well designed, and it is not really "high-level dependency bottom layer." For example, the bottom layer of a communication device in our company can be three or four different devices, but the high-level does not need to pay attention to the real equipment, because the intermediate equipment abstraction layers have deal with all specific devices, and abstraction Interface: Open Open Close Close Read Read WRITE Write, as abstract and as very elegant. This abstraction layer application in the operating system is more extensive, such as the abstraction of the file system, seems to have a direct relationship with structured. Like OO, it can be designed to design the "high-rise and underlying interdependence".

转载请注明原文地址:https://www.9cbs.com/read-85034.html

New Post(0)