Spring is one of the most popular open source framework for developing enterprise applications. It provides comprehensive infrastructure support for developing Java enterprise level applications. Spring also enables the developer to create high performing, easily testable, reusable and loose coupling enterprise Java application.
The main 4 key strategies of spring will simplify the development of an enterprise Java application.
- Spring is light weight and It minimally invasive development with POJO.
- Spring achieves the loose coupling through dependency injection and interface based programming.
- Declarative programming through aspects and common conventions.
- Boilerplate reduction through aspects and templates.
Above are the 4 key strategies of spring framework, which simplifies the development of the 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.[sociallocker]
- Spring enables the developers to develop the enterprise applications using POJOs (Plain Old Java Object). The benefit of developing the applications using POJO is, that we do not need an enterprise container such as an application server but we have the option of using a robust servlet container.
- 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.
- Spring WEB framework has a well-designed web MVC framework, which provides a great alternate to web framework.
- Spring can eliminate the creation of the singleton and factory classes.
- Spring framework is both complete and modular, because spring framework has a layered architecture.
- Spring provides a consistent transaction management interface that can scale down to a local transaction and scale up to global transactions (using JTA).
- 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.
- Spring framework has taken the best practice that have been proven over the years in several applications and formalized as design patterns.
- 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.
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.
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 advise 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 solutions 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.
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.
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 described above advantages of spring framework makes the framework to accept the world as Spring is a robust framework.[/sociallocker]
Happy Learning 🙂