October 2017
Intermediate to advanced
396 pages
10h 2m
English
The Factory idea avoids direct instantiation of an object of a class, and we also have to create another module that is responsible for wiring the dependencies between classes. This module is known as a dependency injector, and is based on the Inversion of Control (IoC) pattern. According to the IoC Framework, the Container it is responsible for object instantiation, and to resolve the dependencies among classes in the application. This module has its own life cycle of construction and destruction for the object defined under its scope.
In the following diagram, we have used the dependency injection pattern to resolve the dependencies of the TransferServiceImpl class:
Read now
Unlock full access