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

What is difference between Application Server and Web Server?

1 Answers   Logica CMG, SCS,


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

0 Answers   TCS,


What are the classes in the java collection framework? : java collections

0 Answers  


How do I find jre path in windows?

0 Answers  


What are the different types of ways where you can iterate over a list? : java collections

0 Answers  






What is the difference between comparable and comparator in java.util pkg?

0 Answers  


How many controlers are there in spring? Plz send me ans

1 Answers   HCL,


What is the enumerator of the java collection framework? : java collections

0 Answers  


what is the difference between checked and unchecked Exceptions?

4 Answers   CTS,


what are advantages of HQL? what are advantages of Native SQL? what are advantages of Criteria API?

1 Answers   TCS,


Q1. A. Write note on "The class path Environment Variable". B. Which are different kinds of source code? Q2. A. How to create an interface? B. Why convert an applet to an application? Q3. A. How to use Media tracker Class. B. How to use string tokenizer class. Q4. A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on "The properties class" Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.

1 Answers  


waht are architecture of web application?

2 Answers  


Categories