What is IOC in spring?

Answers were Sorted based on User's Feedback



What is IOC in spring?..

Answer / sujeev

IOC(Inversion of control)is a technique that allows object
configuration to be moved out of code and into a
configuration file. With Spring IOC, this is typically done
with an XML file.
The steps to use Spring IOC are:

1. Write Java Bean classes, with getter and setter methods
for each property to be configured by Spring.
2. Create an XML file that describes the Java Beans to be
configured.
3. Use an XMLBeanFactory to create configured beans. There
are other ways to read bean descriptions, but using an
XmlBeanFactory is more common.

Is This Answer Correct ?    80 Yes 17 No

What is IOC in spring?..

Answer / shoban

Ioc is the core container for complete spring framework.
Ioc is designed to just perform "dependency injection".
Spring core module comes with basic spring container whose
name will be "BeanFactory"
Ioc can be designed based on Servicelocator designpattern.
Spring basically supports 2 kinds of injection
1.setter injection
2.constructor injection.
Based on the injection you choose and write proper java code
in bean class.
Dependency injection uses the hollywood principal "Don't
call me i will call u".

The steps to use Spring IOC are:

1. Write Java Bean classes, with getter and setter methods
for each property to be configured by Spring.
2. Create an XML file that describes the Java Beans to be
configured.
3. Use an XMLBeanFactory to create configured beans. There
are other ways to read bean descriptions, but using an
XmlBeanFactory is more common.

Is This Answer Correct ?    17 Yes 4 No

What is IOC in spring?..

Answer / vinay

IOC is an architectural pattern describes to have an external entity to wire the objects at each creation time

Is This Answer Correct ?    15 Yes 3 No

What is IOC in spring?..

Answer / krishna chandra mohan a

IoC or Inversion of Control is a design pattern that
provided instances of a bean or class to another when they
needed. That means, we do not have to use new keyword to
create instance of dependent class. We will just create a
reference of dependent class and IoC pattern will set the
instance to the reference when needed.

Is This Answer Correct ?    9 Yes 0 No

What is IOC in spring?..

Answer / madhusudhakar

when we develop a project we will be providing code to take
care of creating the objects and setting dependencies of the
objects(this is normal course).

if we use spring container we need not creating the code for
creating the objects and setting up the dependencies. the
spring container takes care of this task . the task that is
normally carried out by our code is getting carried out by
the spring container this is called as IOC

Is This Answer Correct ?    4 Yes 0 No

What is IOC in spring?..

Answer / sagar date

The org.springframework.beans.factory.BeanFactory is the
actual representation of the Spring IoC
container that is responsible for containing and otherwise
managing the aforementioned beans.
The BeanFactory interface is the central IoC
container interface in Spring. Its responsibilities include
instantiating or sourcing application objects, configuring
such objects, and assembling the dependencies
between these objects.

Is This Answer Correct ?    4 Yes 2 No

What is IOC in spring?..

Answer / somnath mane

The basic concept of Inversion of control pattern is
that you do not create objects but describe how they should
be created.

Is This Answer Correct ?    6 Yes 4 No

What is IOC in spring?..

Answer / surendra

inversion of control is an architectural pattern describing an external entity(container)used to wire objets at creation time by injecting there dependencies

Is This Answer Correct ?    4 Yes 2 No

What is IOC in spring?..

Answer / saroj kumar das

IOC is an principle where an external agency is providing
the collaborators to the applicationcontext instead of
component is looking for them.

Is This Answer Correct ?    3 Yes 1 No

What is IOC in spring?..

Answer / alok kumar ranjan

IoC or Inversion of Control is one of the core features of
Spring. It helps in simplifying the implementation of
business logic. To use the Spring Framework to its full
potential, understanding the IoC container of the framework
is essential.

Is This Answer Correct ?    19 Yes 21 No

Post New Answer

More Java J2EE AllOther Interview Questions

httt method

2 Answers   HCL,


what is filter ?

2 Answers   SolutionNET,


What is an algorithm in java collection framework? : java collections

0 Answers  


What is the servletcontext listener and what is JspContext and page context pls tell in simple words.

1 Answers   IBM,


how to deploy the web application ?

2 Answers   Accent,






What do you understand by synchronization? Why is it important?

0 Answers  


2. Write a interface "Car" with the following methods void setName(String) String getName() void setColor(String) String getColor() void setModel(long) long getModel()

1 Answers  


what debugging tool that can be used to debug the java programs?

1 Answers   Inforica,


Hi Friends, i have searched in google but not clear. can you give bank example with synchronized keyword

0 Answers   TCS,


what is the difference between checked and unchecked Exceptions?

4 Answers   CTS,


What is java collection? : java collections

0 Answers  


What is the use of hashcode in java ?

0 Answers  


Categories