Totel:56 Click:
1
2 3 4 5 6 7 8 9 10 11 12
Spring Interview Questions And Answers
Page 1
Questions 1
What is spring?
Answer
Spring is an open source framework, created by Rod Johnson. Spring is created to address the complexity of enterprise application development. Spring makes it possible to use plain-vanilla JavaBeans to achieve things that were previously only possible with EJBs. However Spring's usefulness isn't limited to server-side development. Any Java application can benefit from Spring in terms of simplicity, testability, and loose coupling.
Spring is a lightweight container, with wrappers that make it easy to use many different services and frameworks. Lightweight containers accept any JavaBean, instead of specific types of components.
Spring Web Services aims to facilitate contract-first SOAP service development, allowing for the creation of flexible web services using one of the many ways to manipulate XML payloads.
Questions 2 What are the various modules of Spring?
Answer
The Spring framework is made up of seven well defined modules. These modules give you everything you need to develop enterprise-ready applications.
All of Spring's modules of are built on top of the core container. The container defines how beans are created, configured and managed-more of the nuts and bolts of Spring.
* The core container
* Application context module
* Spring's AOP module
* JDBC abstraction and DAO module
* Object/relation mapping integration module
* Spring's web module
* The Spring MVC framework
Questions 3 Explain the IoC (Inversion of Control) in Spring framework?
Answer
Inversion of control is at the heart of the Spring framework. The org.springframework.beans and org.springframework.context packages provide the basis for the Spring Framework's IoC container.
The basic concept of the Inversion of Control pattern (dependency injection) is that programmers don’t need to create your objects but describe how they should be created. In a IOC scenario, the container creates all the objects, connects them together by setting the necessary properties, and determines when methods will be invoked. The implementation pattern types for IOC used by SpringFramework are as follows:
* Dependencies can be assigned through JavaBeans properties (setter methods).
* Dependencies are provided as constructor parameters and are not exposed as JavaBeans Setter properties.
Questions 4
What is (AOP) aspect-oriented programming?
Answer
Aspect oriented programming is often defined as a programming technique that promotes separation of concerns within a software system. Systems are composed of several components, each responsible for a specific piece of functionality.
AOP gives you aspects. Aspects enable modularization of concerns such as transaction management that cut across multiple types and objects.
AOP is used in the Spring Framework:
* To provide declarative enterprise services, especially as a replacement for EJB declarative services. The most important such service is declarative transaction management.
* To allow users to implement custom aspects, complementing their use of OOP with AOP.
Questions 5
What are the various approaches use by IoC pattern for decoupling of component in Spring framework?
Answer
The IoC (Inversion of Control) pattern uses three different approaches in order to achieve decoupling of control of services from your components:
* Interface Injection : Your components explicitly conformed to a set of interfaces, with associated configuration metadata, in order to allow the framework to manage them correctly.
* Setter Injection : External metadata is used to configure how your components can be interacted with.
* Constructor Injection : Your components are registered with the framework, including the parameters to be used when the components are constructed, and the framework provides instances of the component with all of the specified facilities applied.
Goto Page:
1
2 3 4 5 6 7 8 9 10 11 12
Spring Objective Questions And Answers
Spring Objective Questions And Answers
Spring Interview Questions And Answers
Spring Interview Questions And Answers
R4R,Spring Objective, Spring Subjective, Spring Interview Questions And Answers,Spring,Spring Interview,Spring Questions ,Spring Answers