Spring Architecture – Spring Modules

In this tutorial we will take a look on spring architecture and various spring modules.

Spring Framework is organized into 20 modules which are arranges in 6 groups as listed below.

  1. Core Container
  2. Aspect Oriented Programming
  3. Instrumentation
  4. Web
  5. Data Access/Integration
  6. Test

Lets discuss each of them in brief.

Spring Architecture and Spring Modules

Spring Architecture - Spring Modules

Image Source

Core Container

Spring core container is the basis for the complete Spring framework. It provides an implementation for IoC that supports dependency injection. This provides a convenient environment to program the basic to enterprise applications avoiding the need of writing factory classes and methods in most of the situations. This even avoids the need of programming the singletons. This includes modules such as beans, core, context and expression language.

Aspect Oriented Programming

This module provides an implementation of Aspect Oriented Programming. It is a proxy based framework which is implemented in Java. It is developed based on AOP Alliance API, which enables us to use the advices developed under Spring AOP to be used with other AOP implementations, that means it allows us to migrate all the components implemented using Spring AOP to any other AOP implementation or to integrate any existing AOP alliance complaint component to work with Spring AOP.

Instrumentation

The instrumentation module includes class instrumentation support. This includes specialized ClassLoader implementations to use in some servers solving the class loading issues which is one of the most common and serious issues in deploying the application services.

Data Access/Integration

The Spring Framework support for DAO includes a consistent exception hierarchy and a convenient translation from data access API-specific exceptions to the Spring DAO exception hierarchy packages into the org.springframework.dao package with DataAccessException as the base exception. Moreover, to perform this translation transparently, Java Spring framework includes templates for most of the generally used data access APIs like JDBC, Hibernate, JDO, JPA, iBatis and Oracle Toplink. Spring Framework also includes a set of abstract DAO classes that can be extended by our DAO implementations to simplify the DAO implementation in using the low level data access APIs.

Web

This module includes all the support for developing robust and maintainable web application in a easy approach. It also includes support for building MVC based web application. This part of the support from Spring is titled as Spring Web MVC framework. This Spring Web MVC is an open source web application framework. It is one of the most efficient and high performance open source implementation of Model 2 based Model-View-Controller (MVC).

Test

This module provides support with the help of JUnit or TestNG in a simplified way testing the spring components. It provides consistent loading of Spring ApplicationContexts and caching of those contexts. It also provides mock objects that can be used to test codes in isolation.

You can watch below video to get quick overview of spring framework architecture and modules.

Comment below if you have queries or found anything incorrect in above tutorial for Spring Architecture.

Leave a Comment

Your email address will not be published. Required fields are marked *