Introduction -
Spring framework is the most popular Java EE(Java Enterprise Edition)
frameworks.
Spring is an open-source development framework for Enterprise Java.
The core features of the Spring Framework can be used in developing any Java
EE platform. Spring framework targets to make Java EE development easier to use
and promotes good programming practice by enabling a POJO- based programming
model.
The Spring Framework was written by Rod Johnson in October 2002, Since then
Spring has become an alternative technology as used in most Software
Companies.
You can read more about the Spring Framework.
If you are preparing an interview question in spring, then you may visit this Spring Interview Questions and Answers.
Features –
· Lightweight
Spring is lightweight when it comes to size and transparency because of its POJO implementation. The basic version of the Spring Framework is 2MB.
·
Inversion
of Control
Loose
coupling is achieved in Spring, with the Inversion
of Control or Dependency Injection. The basic concept of the
Dependency Injection or Inversion of Control is that, no need to create objects
means someone else will create the objects for you and you just have to use
that object, there comes IoC and DI in the picture.
Means
the Spring IOC and DI will be responsible for creating objects.
·
Aspect
Oriented Programming (AOP)
Spring
AOP enables Aspect-Oriented Programming in spring application.
AOP is a promising technology for separating
crosscutting concerns, something usually hard to do in object-oriented
programming. The application’s modularity is increased in that way and its
maintenance becomes significantly easier.
Means: AOP does not mix non-business logic with
actual Business logic in your Classes. To read more about Aspect
Oriented Programming.
· Spring MVC Framework
Spring comes with MVC(i.e Model And View) which is used for creating web applications, built on core Spring functionality. Spring MVC Framework has ready components that can be used to develop flexible and loosely coupled web applications.
· Container
Spring container and manages the life cycle and configuration of the application objects.
· Transaction Management:
Spring provides a consistent transaction management interface that can scale down to a local transaction and scale up to global transactions (JTA). It is a unit of work in which either all operation/work must execute or none of them.
· JDBC Exception Handling
Spring provides a convenient API to translate technology-specific exception which is thrown by JDBC, HIbernate, or JDO into consistent, unchecked exceptions, which simplifies the error handling strategy.
Spring Framework Architecture -
Spring is a well-organized architecture consisting of seven modules. Modules in the Spring framework are:
· Spring Web
One of the key components of Spring is the AOP framework. AOP is used in Spring. TO provide declarative enterprise services, especially as a replacement for EJB declarative services the most important such service is declarative transaction management, which builds on Spring's transaction abstraction.
To allow users to implement customs aspects, complementing their use of OOP with AOP
·
Spring ORM
The ORM package is related to the database access. It
provides integration layers for popular object-relational mapping APIs,
including JDO, Hibernate and iBatis.
·
Spring Web
The Spring Web module is part of
Spring?s web application development stack, which includes Spring MVC.
·
Spring DAO
The DAO (Data Access Object) support in Spring is primarily for standardizing the data access work using technologies like JDBC, Hibernate or JDO.
·
Spring Context
This package builds on the beans package to add support for message sources and for the observer design pattern, and the ability for application objects to obtain resources using a consistent API.
·
Spring Web MVC
This is the Module that provides the MVC implementations for the web applications.
·
Spring Core
The core package is the most important component of the Spring Framework.
This component provides Dependency Injection features. The BeanFactory provides a factory pattern that separates the dependencies like initialization, creation, and access of the object from your actual program logic.
Useful topics:
21 Spring Interview Questions and Answers
more topics are coming soon...
1 comments:
Click here for commentsHelpful content and easy to understand👍
ReplyConversionConversion EmoticonEmoticon