Difference - What Is Dependency Injection (DI) & Inversion Of Control (IOC) | Spring Tutorial

Описание к видео Difference - What Is Dependency Injection (DI) & Inversion Of Control (IOC) | Spring Tutorial

#IOC #and #DI

#IOC : It is called IoC because control of the object is inverted. It is not the programmer, but someone else who controls the object.
IoC is relative in the sense that it only applies to some objects of the application. So there may be IoC for some objects, whereas others are under the direct control of the programmer.

#DI : While Dependency injection is a pattern used to create instances of objects that other objects rely on without knowing at compile time which class will be used to provide that functionality. IoC relies on dependency injection because a mechanism is needed in order to activate the components providing the specific functionality.

Комментарии

Информация по комментариям в разработке