Thursday, February 22, 2018

IoC with DI explained

What is IoC?

The literal meaning of IoC is "Inversion of Control". You can get an idea from this is that in general IoC is related to invert the controls or responsibilities.

Technically IoC means that the main class does not depends upon the concrete implementation of other class instead of this it should depend upon the abstraction of that class. IoC invert the control/responsibility to other entity.

Lets explain this with an example. Lets suppose we  have an Entertainment Management Committee (EMC) in an organization. EMC is responsible to arrange different types of events in that organization.

No comments:

Post a Comment