Spring Architecture

In last Spring tutorial, we learned about the history and versions of Spring. This post will explain about the spring architecture and mostly used containers of spring.

CORE CONTAINER



The core container consists of Beans, Core, Context, SpEL. It consists of factory for creating beans and managing bean dependencies.

1) The Bean provides BeanFactory used for creating beans and also it is the implementation of factory pattern.

2) The Core container includes IoC(Inversion of Control) and DI(Dependency Injection).

3) The Context module builds on the solid base provided by the Core and Beans modules and it is a medium to access any objects defined and configured. The ApplicationContext interface is the focal point of the Context module.

4) The SpEL module provides a powerful expression language for querying and manipulating an object graph at runtime.

 DATA ACCESS LAYER

                             


This layer is mainly for communicating with database. It reduces JDBC code by 50%.

1) The JDBC module provides a JDBC-abstraction layer that removes the need for tedious JDBC related coding.

2) The ORM module provides integration layers for popular object-relational mapping APIs, including JPA, Hibernate etc.

3) The OXM module provides an abstraction layer that supports Object/XML mapping implementations for JAXB, Castor, XMLBeans, JiBX and XStream.

4)The Java Messaging Service JMS module contains features for producing and consuming messages.

5)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
 
                                

The Web Layer consists of WebSocket, Servlet, Web and Portlet.

1) It is the home of Spring container. It handles all web related classes.

2) The Web 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.

3) The Web-MVC module contains Spring's Model-View-Controller (MVC) implementation for web applications.

4) The Web-Socket module provides support for WebSocket-based, two-way communication between the client and the server in web applications.

5) The Web-Portlet module provides the MVC implementation to be used in a portlet environment and mirrors the functionality of Web-Servlet module.

TEST

Spring container consists of Test module which is used for testing spring projects. It also provides support for TDD(Test Driven Development). Also test spring components with JUnit or TestNG.

NOTE:

There  are few other modules presented in Spring Architecture. Those are.,

 

 AOP stands for Aspect Oriented Language. This layer adds functionality to objects such as Logging, Security, Transactions. 
 

Comments

Popular posts from this blog

First Unique Character in a String

Balanced Binary Tree

Majority Element

Sequential Digits