The Dependency Inversion Principle say:
How can I practically find the High-level and the Low-level modules in my applications, is there any clear definition for them?
This is how usually I refer them:
High Level Module --> this module represent more business aspect rather than technical aspect. It can be refered as an abstraction rather than implementation, and usually achieved through interfaces.
Some example maybe: RegisterAccount
, PostAnswer
, PostQuestion
, AddComment
, InsertComment
.
Since Low Level Module represent more technical aspect rather than the business aspect. Say for example we take the InsertComment
HLM. The LLM should be:
A High Level Module can be a Low Level Module in another context. Taking another example, AddComment
's LLM should be:
InsertComment
)The same apply for other HLM as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With