Answer the question
In order to leave comments, you need to log in
Is there a difference between IoC and DI?
Can you please tell me if there is a difference between the dependency inversion principle and the "dependency injection" pattern?
Doubts arise because both do the same thing - add one object to another based on the interface. As a result of this, code cohesion is reduced because any object can be passed, as long as it conforms to a specific interface.
However, in many articles this method of reducing connectivity is called differently, and often within the same article.
Answer the question
In order to leave comments, you need to log in
IoC is more general than DI. DI is a special case of IoC.
https://stackoverflow.com/questions/6550700/invers...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question