DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Frameworks
  4. Architecture of Spring Framework: Modularity and Spring Modules

Architecture of Spring Framework: Modularity and Spring Modules

Learn more about modularity in the Spring Framework.

Ranga Karanam user avatar by
Ranga Karanam
CORE ·
Apr. 23, 19 · Presentation
Like (3)
Save
Tweet
Share
15.55K Views

Join the DZone community and get the full member experience.

Join For Free

One of the most important features of the Spring Framework is modularity — it is not one big monolith framework. Let's take a closer look at the architecture of the Spring Framework, Spring modules, and how they are organized.

Spring Architecture and Modules

Let’s look at the modules that are present in a typical Spring project. image info

It is not organized as one big JAR file. It is composed of a large number of smaller JAR files.

Spring is organized into modules. Here is how Spring is organized conceptually: image info

Container

This is the most heavily used part of the Spring Framework. This includes modules such as:

  • Beans: to manage application dependencies
  • Core
  • Context: to maintain the application context

Database Access and Integration

Spring provides excellent options for implementing data and integration layers.

The important data access modules are:

  • JDBC: to talk to relational database using JDBC
  • ORM: provides integration with all ORM (Object Relational Mapping) frameworks, such as Hibernate and MyBatis.
  • JMS: If you want to talk to another application over a queue, JMS provides an excellent option. Spring has good integration with JMS.
  • OXM: This module provides good integration in scenarios where object to XML mappings are required.
  • Transactions: Transaction management is an important part of data access integration functionality. Ideally, you want the transaction to be fully successful, or completely rolled back. If a transaction has four steps and failed at the third step, the previous two successful steps must also be rolled back. Spring has great support for transaction management.

Web

Additionally, Spring offers support for developing your web layer:

  • Spring MVC: It is Spring’s own web framework
  • Struts: Spring also provides great integration with Struts.

Cross-Cutting Features

An application is typically developed in multiple layers. For example, a web application is often designed to have three layers: web, business, and data:

image info

There are many things that are applicable to more than one layer. Those are called cross-cutting concerns.

Unit Testing

One important cross-cutting concern is unit testing. We want to be able to unit test code in all the three layers mentioned above. The Spring Test Framework provides great support for unit testing.

AOP

AOP stands for aspect-oriented rogramming. This module is useful for implementing features such as security and logging, and Spring AOP provides basic AOP features.

Spring can be integrated with the AspectJ framework to conduct advanced AOP. For more, check out the video below:

image info


In this article, we had a brief look at the modular structure of the Spring Framework. It is not a single monolith but is organized as a set of small modules.

Join our free Spring Boot in 10 Steps course.

Spring Framework Framework Architecture Web application unit test Modularity (networks) Integration

Published at DZone with permission of Ranga Karanam, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Generate Code Coverage Report Using JaCoCo-Maven Plugin
  • Public Cloud-to-Cloud Repatriation Trend
  • Spring Boot Docker Best Practices
  • Promises, Thenables, and Lazy-Evaluation: What, Why, How

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: