Advantages of Spring Framework

By | 2018-04-12T12:45:32+00:00 September 27th, 2015|Spring|2 Comments

Spring Framework:

Spring is one of the most popular open source framework for developing enterprise applications. It provides comprehensive infrastructure support for developing Java based applications.

Spring also enables the developer to create high performing, reusable, easily testable and loose coupling enterprise Java application.

Key Strategies of Spring :

  1. Spring is a light weight framework and It minimally invasive development with POJO.
  2. Spring achieves the loose coupling through dependency injection and interface based programming.
  3. Spring supports declarative programming through aspects and common conventions.
  4. Boilerplate reduction through aspects and templates.

Above are the 4 key strategies of spring framework simplifies the development of Java enterprise application.

Advantages of Spring Framework:

The Spring framework addresses most of the infrastructure functionalities of the Enterprise applications. Following are the few major advantages of Spring Framework.

  1. Spring enables the developers to develop enterprise applications using POJOs (Plain Old Java Object). The benefit of developing the applications using POJO is, that we do not need to have an enterprise container such as an application server but we have the option of using a robust servlet container.
  2. Spring provides an abstraction layer on existing technologies like servlets, jsps, jdbc, jndi, rmi, jms and Java mail etc., to simplify the develpment process.
  3. Spring comes with some of the existing technologies like ORM framework, logging framework, J2EE and JDK Timers etc, Hence we don’t need to integrate explicitly those technologies.
  4. Spring WEB framework has a well-designed  web MVC framework, which provides a great alternate to lagacy web framework.
  5. Spring can eliminate the creation of the singleton and factory classes.
  6. Spring provides a consistent transaction management interface that can scale down to a local transaction and scale up to global transactions (using JTA).
  7. Spring framework includes support for managing business objects and exposing their services to the presentation tier components, so that the web and desktop applications can access the same objects.
  8. Spring framework has taken the best practice that have been proven over the years in several applications and formalized as design patterns.
  9. Spring application can be used for the development of different kind of applications, like standalone applications, standalone GUI applications, Web applications and applets as well.
  10. Spring supports both xml and anotation configurations.
  11. Spring Framework allows to develop standalone, desktop, 2 tire – n-tire architecture and distributed applications.
  12. Spring gives built in middleware services like Connection pooling, Transaction management and etc.,
  13. Spring provides a light weight container which can be activaed without using webserver or application server.

And more over the Spring framework consists of features organized into about 20 modules, these modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented Programming ), Instrumentation and Test.

Lets see each module in Spring Framework –

Spring Core Container :

The Spring Core container is the basis for the complete spring framework. The Spring core container provides an implementation for IoC supporting Dependency Injection. The container provides a consistent means of configuring and managing the Java objects using call backs. The container is also responsible for managing the objects life cycle such as

  • Creating the Objects
  • Calling initialization methods
  • Configuring objects by writing them together

Spring AOP (Aspect Oriented Programming) :

Spring AOP module provides an implementation of AOP (Aspect Oriented Programming). The Spring AOP is a proxy-based framework implemented in Java and it is developed based on AOP Alliance API, which enables us to use the advice developed under Spring AOP to be used with other AOP implementations, meaning it allows us to migrate the components implemented using Spring AOP to some other AOP implementation or to integrate any existing AOP alliance complaint component to work with Spring.

Spring JDBC and DAO Module:

The Spring framework supports for DAO includes a consistent exception hierarchy and a convenient translation from data access API-specific exceptions to the Spring DAO exception hierarchy.

The Spring framework provides a solution for the various problems identified by using JDBC as low-level data access API for implementing DAO, by giving thin, robust and highly extensible JDBC abstraction framework.

ORM Module:

The ORM (Object Relational Mapping) module for the Spring framework provides a high level abstraction for well-accepted object-relational mapping APIs such as Hibernate, JPA, JDO, OJB and iBatis. The Spring ORM module is not replacing or a competitive for any existing ORMs; instead it is designed to reduce the complexity by boilerplate code from the application in using the ORMs.

J2EE (Java Enterprise Edition):

The JEE module of Spring framework is build on the solid base, provided by the core package. This provides a support for using the remoting services in a simplified manner. This supports to build POJOs and expose them as remote objects without worrying about specific remoting technology given rules.

Web Module:

The Web module of Spring framework includes all the support for developing robust an maintainable web application in a simplified approach. It even includes support for MVC-based applications development.

The above described advantage of spring framework makes the framework to accept the world as Spring is a robust framework.

Happy Learning 🙂

About the Author:

Hi Folks, you have reach this so far, that shows you like what you are learning. Then why don't you support us to improve for bettor tutorials by leaving your valuable comments and why not you keep in touch with us for latest updates on your favorite blog @ facebook , twitter , Or Google+ ,

2 Comments

  1. ashraypachgane@gmail.com'
    Ashray Pachgane June 7, 2017 at 11:58 am - Reply

    Thanks Chandrashekhar for publishing such a useful article.

  2. arorapriya965@gmail.com'
    Priya February 27, 2018 at 5:21 am - Reply

    The Spring Framework is a comprehensive tool for supporting applications using Java programming language. Many thanks for sharing this.

Leave A Comment