What are high level and low-level modules?

What are high level and low-level modules?

1 Answer. High level module is the interface / abstraction that will be consumed directly by the presentation layer. Low level on the other hand are bunch of small modules (subsystems) help the high level do their work.

What is a low-level class?

The class which is performing a task with the help of other class is a High-level class and the class which receives command or helps high-level class to perform a task is often regarded as a Low-level class. A high-level class of a particular layer may be a treated as a low-level class in upper layer classes.

What is the definition of the dependency inversion principle?

Based on this idea, Robert C. Martin’s definition of the Dependency Inversion Principle consists of two parts: High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions.

How is dependency inversion used in solid design?

It splits the dependency between the high-level and low-level modules by introducing an abstraction between them. So in the end, you get two dependencies: the low-level depends on the same abstraction. This might sound more complex than it often is.

How does the design principle change the direction of dependency?

The design principle does not just change the direction of the dependency, as you might have expected when you read its name for the first time. It splits the dependency between the high-level and low-level modules by introducing an abstraction between them. So in the end, you get two dependencies: the low-level depends on the same abstraction.

Can a high level module depend on a low level module?

High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions. An important detail of this definition is, that high-level and low-level modules depend on the abstraction.