Spring Framework

Spring Projects

Spring Project 1

IOC Concept of Spring Framework
Previous Home Next

Introduction :The spring framework work the concept inversion of control , this concept provide the facility to create an object ,satisfied the dependency and lifecycle management. In the case of conventional approach creation of an object ,dependency satisfaction and lifecycle management all of these task are responsible for application developer.Problem associated with conventional usage of an object are:

  • An application developer need to focus on object creation ,dependency satisfaction and lifecycle management in addition to object usage.
  • Conventional method create tight coupling between object and there user. The tight coupling always create maintenance problem.
  • Conventional approach result in memory wastage because each user creates own object which prevent object reusability.

 

IOC propose the runtime environment called IOC container that should be used by the application developer to request object. If creation of an object their dependency satisfaction and lifecycle management is manage by IOC container then application developer can focus on used to object. Object can be shared among and loose coupling between object and user can be provided. Following two approach are used to provide the Implementation of IOC.

  1. Dependency Injection
  2. Dependency Lookup

Dependency Injection (DI):In case of DI (Dependency Injection) ,dependency of object are satisfied by IOC container on its own i.e IOC container are not ask to satisfied the dependency of an object.

Dependency Lookup (DL):In case of DL (Dependency Lookup) ,dependency of an object are satisfied only when IOC container is asked to do so.

Note: The spring framework does not support dependency lookup (DL) only support dependency injection (DI) approach.

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: