Yahoo Interview Question
Software Engineer / DevelopersSpring IOC is Inverson of Control.
Definition of IoC - this is a principle of describing an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to procedural programming.
Spring IoC - container is where the BeanFactory interface is located. IoC takes the responsibility for making things happen into the framework away from the java code.
Basically, with spring a lot of the navigation, transitions, etc.. are moved into the XML files and the java code is used for the actual code logic. IoC is the mechanism that makes that happen.
Example: you create a backing-bean for a JSP that processes a search. the java code will hold the logic process the search the XML files will hold the logic for the page navigation(if the search is successful/error/non successful what to do) plus they wire the dependencies to other classes - etc...
inversion of control?
- Zaphod March 03, 2010dependency injection?