2. Spring Framework Module (Architecture)

 

Spring Framework Architecture

The Spring Framework is a comprehensive framework for enterprise Java development. It provides a modular and organized way to build enterprise-level applications. The framework is divided into several modules, each addressing specific concerns. 


Types 

1. The Core Container:

2. Data Access / Integration

3. The Web  

4. Miscellaneous (AOP)  



1. Spring Core Container:
  •    CORE: This module provides the fundamental parts of the framework,  its including the IoC (Inversion of Control) container and Dependency Injection features.
  •   BEAN : It deals with the creation and management of Java objects (beans) and their dependencies.A sophisticated implementation of factory pattern called BeanFactory, is provided by, Bean module.
  • CONTEXT : This module builds on the core and beans modules, providing a way to access application objects and services in a consistent manner. It has access rights for any objects that define and configure. In Context module, the major point is ApplicationContext interface.
  •   SpEL (spring- Expression Language ) : It is an extension to the EL defined in JSP. It provides support to setting and getting property values, method invocation, accessing collections and indexers, named variables, logical and arithmetic operators, retrieval of objects by name etc. It also does manipulation of an object graph at run-time execution.


2. Data Access and Integration:
 - In this part of Spring Architecture, we are going to discuss OXM, JMS, ORM, Transaction Modules, and JDBC.
   
  •  JDBC: It provides JDBC (Java Database Connectivity) support to interact with relational databases.The JDBC module contains a JDBC-abstraction layer which removes the need for JDBC related coding.
  •   ORM: The Spring Framework doesn’t have its own ORM implementation. But it offers the integration layers with other popular Object Relational Mapping tools such as iBATIS, Hibernate etc.
  •  OXM: This module provides support for Object-XML Mapping (OXM) for working with XML.With the help of this module, we can ease the mappings between Java object and XML documents. The module can extend. Hence, it provides integration with various other popular frameworks such as JAXB, Castor, XStream etc.
  •  JMS : This module supports Java Message Service (JMS) for messaging within Spring applications.The JMS module or Java Messaging Services is a Spring module used for sending and receiving messages.
  •  TRANSACTION : This module supports programmatic and declarative transaction management for classes.The Spring Transaction Management module is for coordinating the Java objects transaction.


3. Model-View-Controller (MVC)
The Web module in Java Spring contains several frameworks, use to ease the task of developing the web related applications. Various popular MVC frameworks like JSF, Struts etc can integrate with the Web module. 

  •    WEB : This module provides basic web-oriented integration features.
  •    WEB MVC: Implements the MVC design pattern for building web applications. It provides a flexible and configurable implementation for building web-based applications.
  •    WEB-SOCKET : The Web-Socket module provides support for WebSocket-based, two-way communication between the client and the server in web applications.
  •    WEB-Portlet: The Web-Portlet module provides the MVC implementation to be used in a portlet environment and mirrors the functionality of Web-Servlet module.The functionality of Web-Portlet is same that of the Web-Socket module of Spring.


4. Miscellaneous / Aspect-Oriented Programming (AOP):

  • AOP : The AOP that is Aspect Oriented Programming is a Spring Framework module. It implements cross-cutting concerns. It can alternatively understand as an interceptor which intercepts some processes like a method which is intercepted by Spring AOP during its execution for adding an extra functionality.

(Example : Spring AOP is like having a supervisor who watches over the construction site and makes sure everyone follows the safety rules. In programming terms, it intercepts or watches certain processes (methods) in your code and adds extra functionality, like logging or security checks, without changing the original code. It helps keep your code organized and adds common features easily. ) 


  •  ASPECTS : This module provides integration with AspectJ, a powerful and flexible AOP framework.

  •  MESSAGING  : This module provides support for STOMP (Simple Text Oriented Messaging Protocol) and WebSocket-based messaging.

  •  INSTRUMENT : This module provides instrumentation support for classloading and class instrumentation. Instrumentation in the Spring Framework refers to the ability to intercept and manipulate method calls, typically for monitoring, logging, security, or performance measurement purposes.


5. Test :

  •    TEST : It provides support for testing Spring components with JUnit or TestNG.The Testing module is for providing support to classes for writing integration and unit tests. It uses JUnit or TestNG type frameworks.


 





Comments

Popular posts from this blog

1. Spring Overview

10. Spring - MVC Framework