Besides of the Spring terminology, when we start with Spring we start to hearing about Spring boot, Spring Cloud, Spring MVC, Spring AOP, etc. and then we don’t know how to start and in the worst of the case we drop it to learn it. So, we can continue explaining those modules, project, etc. so let’s begin with the Spring Architecture.
Spring is a framework that is separated in different modules. This can be seen when crea a project with maven, where the JAR files are added, instead of one big JAR. Spring is created in a modular way, this means that you decide which modules use, without using the whole framework.


Spring Modules
The Spring Framework is organized in about 20 modules. The modules are grouped into Core Container, Data Access/Intgration, Web, AOP (Aspect Oriented Programming), Aspects, Instrumentation, Messaging and Test, as is shown in the following diagram:


Core Container
This module has the modules: Beans, Core, Context, and Spring Language (SpEL). This modules provides the fundamental functionality of the Spring Framework, like the Inversion of Control (IoC), dependency injection, internationalization as well support for querying the object at run time.
Core and Beans module
This modules provides the fundamental parts of the framework, including the IoC and dependency injection features. The BeanFactory is a sophisticated implementation of the factory pattern. It removes the need for programmatic singletons and allows you to decouple the configuration and specification of dependencies from your actual program logic.
Context Module
The module builds on the solid base provided by the Core and Beans modules. The Context module inherits its features from the Beans module and adds support for internationalization (using, for example, resource bundles), event-propagation, resource-loading, and the transparent creation of contexts by, for example, a servlet container. The Context module also supports Java EE features such as EJB, JMX ,and basic remoting. The ApplicationContext interface is the focal point of the Context module.
Expression Language
This module provides a powerful expression language for querying and manipulating an object graph at runtime. This is an extension of the unified expression language (unified EL) as specified in the JSP 2.1 specification. The language supports setting and getting property values, property assignment, method invocation, accessing the context of arrays, collections and indexers, logical and arithmetic operators, named variables, and retrieval of objects by name from Spring’s IoC container. It also supports list projection and selection as well as common list aggregations

Data access/ Integration Layer
Spring has a great integration with data and integration layers, and provides support to interact with databases. It contains modules like JDBC, ORM, OXM, JMS, and Transactions.
JDBC module
This module provides a JDBC-abstraction layer that removes the need to do tedious JDBC coding and parsing of database-vendor specific error codes.
ORM module
This module provides integration layers for popular object-relational mapping APIs, including JPA, JDO and Hibernate. Using the ORM package you can use all of these O/R-mapping frameworks in combination with all of the other features Spring offers, such as the simple declarative transaction management feature mentioned previously.
OXM module
The module provides an abstraction layer that supports Object/XML mapping implementations for JAXB, Castor, XMLBeans, JiBX and XStream.
JMS Module (Java Messaging Serivice)
The Java Messaging Service (JMS) module contains features for producing and consuming messages.
Transaction
The Transaction module supports programmatic and declarative transaction management for classes that implement special interfaces and for all your POJOs (plain old Java objects).

Web (MVC/remoting) Layer
This layer contains the Web, Servlets, Portlets, and Sockets modules to support the creation of a web application. Spring offers a web framework of its own called Spring MVC.
Spring Web module
This module provides basic web-oriented integration features such as multipart file-upload functionality and the initialization of the IoC container using servlet listeners and a web-oriented application context. It also contains the web-related parts of Spring’s remoting support.
Web-Servlet module
This module contains Spring’s model-view-controller (MVC) implementation for web applications. Spring’s MVC framework provides a clean separation between domain model code and web forms, and integrates with all the other features of the Spring Framework.
Web-Portlet module
The Web-Portlet module provides the MVC implementation to be used in a portlet environment and mirrors the functionality of Web-Servlet module.

Test Layer
The Test module supports the testing of Spring components with JUnit or TestNG. It provides consistent loading of Spring ApplicationContexts and caching of those contexts. It also provides mock objects that you can use to test your code in isolation.

AOP Layer
Spring’s AOP module provides an AOP Alliance-compliant aspect-oriented programming implementation allowing you to define, for example, method-interceptors and pointcuts to cleanly decouple code that implements functionality that should be separated. Using source-level metadata functionality, you can also incorporate behavioral information into your code, in a manner similar to that of .NET attributes.

Aspects
The separate Aspects module provides integration with AspectJ.

Instrumentation
The Instrumentation module provides class instrumentation support and classloader implementations to be used in certain application servers.

Spring projects
We already review the Spring modules, now is the turn of the Spring modules. Spring also provides solutions to different enterprise application problems through Spring projects. some of them are:

Spring Boot
Spring Boot is used to develop micro services. It makes developing applications easy through features like startup projects, auto configuration, and actuator. Spring Boot has gained massive popularity since it was first released in 2014.

Spring Cloud
Spring Cloud allows the development of cloud native applications that can be dynamically configured and deployed. It provides functionality for handling common patterns in distributed systems.

Spring Data
Spring Data provides consistent access to SQL and NoSQL databases.

Spring Integration
Spring Integration implements the patterns outlined by the book Enterprise Application Integration Patterns. It allows enterprise applications to be connected easily through messaging and declarative adapters.

Spring Batch
Spring Batch provides functionality to handle large volumes of data with the ability to restart, ability to read from and write to different systems, chunk processing, parallel processing, and transaction management.

Spring Security
Spring Security provides security solutions for different applications be it a web application or a REST service. It also provides authentication and authorization features.

Spring Session
Spring Session manages session information and makes it easier to share session data between services in the cloud regardless of the platform/container. It also supports multiple sessions in a single browser instance.

Spring Mobile
Spring Mobile offers device detection and progressive rendering options that make mobile web application development easy.

Spring Android
Spring Android facilitates the development of Android applications.

I hope that now is clearer, that we review a little the Spring modules and teh Sprong projects.
THanks for Reading and Happy Learning!!!


Leave a comment