IOC (Inversion of Control) or Dependency Injection
IOC (Inversion of Control) or Dependency Injection
IOC (Inversion of Control) or Dependency Injection
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 1
JAVA Means DURGA SOFT
Problem: Dependency Look Up i.e. If the resource of the application spending some time to
search and gather its dependent values required in the business logic from the other resource
of the application then it is called as Dependency Look Up. In Dependency Look Up resource
pulls its dependent values from other resources of the application.
Ex: The way we get the JDBC data resource object from JNDI registry comes under Dependency
Look Up.
In dependency look up resource cannot used dependent values directly in the business
logic. The resource must spend time to search and gather dependent values before utilizing
them in business logic.
Solution: Use Dependency Injection i.e. if underlying server software or container software or
frame work software or JRE or special resource of the application dynamically assigns its
dependent to resources then it is called as Dependency Injection.
In Dependency Injection resource can directly use the injected values in business logic
without spending time to search and gather them.
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 2
JAVA Means DURGA SOFT
Ex:
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 3
JAVA Means DURGA SOFT
DURGA SOFTWARE SOLUTIONS ,202 HUDA Maitrivanam, Ameerpet , Hyd. Ph: 040-64512786 Page 4