springframework-course

Architecture of Spring Framework

The primary goal behind the development of Spring Framework was to provide a one-stop shop where you could connect and use modules based on your application’s needs. Spring’s modularity is related to the architecture of Spring. The Spring framework has roughly 20 modules that are utilised depending on the nature of the application.

The Spring Framework architectural diagram is shown below. This layered design includes all the modules that a developer may need while creating an enterprise application. Furthermore, the developer is able to select or delete any modules that are required or are not required. Because of its modular nature, Spring Framework can simply be integrated with other frameworks.

Image

Source: Spring Framework Documentation

Let’s go over each architectural module in detail:

1. Core Container Layer

As you can see, all the modules are specified on top of the Core container

2. Data Access/Integration Layer

This covers the modules used in an application to manage data access and transaction processing.

3. Web Layer

The Web layer refers to Spring modules that power web-based functions.

4. Miscellaneous

Along with AOP, there are numerous key modules such as Aspects Instrumentation, Messaging, and Testing.

Conclusion

In a nutshell,

  1. In Core, we will be using features of IoC Container, Events, Resources, i18n, Validation, Data Binding, Type Conversion, SpEL, AOP, and AOT.
  2. In Data Access, we will be using features of Transactions, DAO Support, JDBC, R2DBC, O/R Mapping, and XML Marshalling.
  3. In Web Servlet, we will be using features of Spring MVC, WebSocket, SockJS, and STOMP Messaging.
  4. In Integration, we will be using features of REST Clients, JMS, JCA, JMX, Email, Tasks, Scheduling, Caching, and Observability.
  5. In Testing, we will be using features of Mock Objects, TestContext Framework, Spring MVC Test, and WebTestClient.
  6. In Languages, we will be using different programming languages like Java, Kotlin, Groovy, Dynamic Languages.