Introduction to Spring Framework

Overview

Spring Framework is considered as one of the most popular application frameworks in the java community, introduced by Rod Johnson in 2003. It so efficiently facilitates the java application development and provides a very comprehensive infrastructure support to develop complex enterprise java applications very easily and rapidly. 

Millions of developers use spring framework to create easily testable and reusable code. As Spring Framework takes care of the infrastructure, so one can focus more on the application development part.

Dependency Injection is one of the most powerful features that Spring provides, and it works very well even after integration of Spring with any other framework.


Why use Spring?

Below are listed some of the notable features that Spring provides us –

  • Spring covers the important areas that other frameworks don’t. It mainly focuses on how to provide a better way to deal or manage business objects.
  • Spring is a lightweight container which contains and manages the life cycle of application objects.
  • Spring enables us to build applications using Plain Old Java Objects (POJOs) and to apply business related services non-invasively to POJOs. POJO programming enables continuous integration and testability.
  • Spring Framework provides powerful abstraction to JavaEE specifications such as JMS, JDBC, JPA and JTA.
  • It provides loose coupling among the classes using Dependency Injection.
  • Spring supports Aspect Oriented Programming, which aims at increasing modularity of the application, by separating the crosscutting concerns (transaction management, Security, Logging, etc.) from the actual business logic implementations.
  • Major benefit is its layered architecture, which allows us to be selective about which components we should use while providing a well-integrated framework for enterprise java application development.

Spring Framework provides powerful abstraction to JavaEE specifications such as JMS (Java Message Service), JDBC (Java Database Connectivity), JPA (Java Persistence API) and JTA (Java Transaction API).

It’s very important to understand that Java EE technology is a set of standards that many vendors can implement. The vendors are free to compete on implementations but not on standards or APIs. Java EE provisions the developers to use the same abstraction (the interface methods) to interact with a number of vendor-offered solutions. This means that if we are interacting with a relational database for persisting entities in our application, all the vendor offered solutions for ORM (i.e. Hibernate, SimpleORM or EclipseLink) might have different underlying implementations for the same persist method of the Java Persistence API (JPA). Same is with the other methods in the JPA specification provided by the Spring Framework.

Spring makes our life easier by providing integration with vendor-offered solutions to several different APIs (JMS, JDBC, JPA, JTA, etc.) as already mentioned. All we need to do is configure and wire up these tools/frameworks, in a number of easy-to-use mechanisms (XML, Bean configurations or Java Annotations).

Thus, Spring Framework provides powerful abstraction to several JavaEE specifications such as JMS, JDBC, JPA and JTA, and an easy integration of the vendor offered solution/implementation to the respective API specification.

Useful Links

Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.