Tag Archives: dependency-injection

Dependency Injection – Interface Injection

What is Interface Injection? »    Also known as Method injection. »    In this case Dependency declared inside the dependent class in the form of interface. »    So any class that implements that interface can be substituted into dependent class. »    Dependency is injected as the parameter of method. »    Useful where the whole class does… Read More »

Dependency Injection (DI)

According to Wikipedia “Dependency injection is a software design pattern that implements Inversion of Control (IoC) and allows a program design to follow the dependency inversion principle (DIP).”  »    Dependency Injection (DI) is a design pattern that demonstrates how to create loosely coupled classes. »    It implements Inversion of Control (IoC) in our program i.e. Dependency Injection (DI) supply the dependencies… Read More »