Dependency Injection (DI) is a design pattern/technique that removes dependencies from computer code, making the application easier to maintain and test.
injecting a object into another object i.e. dependency injection
Ways of Injecting dependencies
Dependency Injection can be done in two ways.
- Using setter injection
- Using constructOr injection
inversion of control vs dependency injection
IOC continer: it is a pre defined program, that maintain the object lifecycle(creation, object hold into memory, destroy).
Add new comment
Standard (Image)