Dependency inversion ensures that your higher-level modules are independent of lower-level modules. Thus, your application logic is independent of your business model or business logic. There is a clear separation of problems.
The principle says that your application defines and owns the interface that your business level should implement. Thus, your business layer depends on your interface defined by your application. Thus, dependencies are inverted.
By expanding this, if you now have three applications, each with its own interfaces implemented by the business layer, your business layer can change, and as long as they implement the interfaces as they should, your applications will not be wiser.
A good Java example of this principle and how such a project will be structured can be found here on my website: http://www.jeenisoftware.com/maven-dip-principle-example/
Dependency inversion is associated not so much with design as with the interface, although this happens, it is more related to the implementation of the service. In other words, a kind of design-oriented design.
Adam davies
source share