Integration of Struts & Spring & Hibernate For Enterprise Applications
Integration of Struts & Spring & Hibernate For Enterprise Applications
OPEN
Journal
ACCESS
ABSTRACT: The proposal of this paper is to present Spring Framework which is widely used in
developing enterprise applications. Considering the current state where applications are developed using
the EJB model, Spring Framework assert that ordinary java beans(POJO) can be utilize with minimal
modifications. This modular framework can be used to develop the application faster and can reduce
complexity. This paper will highlight the design overview of Spring Framework along with its features that
have made the framework useful. The integration of multiple frameworks for an E-commerce system has
also been addressed in this paper. This paper also proposes structure for a website based on integration of
Spring, Hibernate and Struts Framework.
Keywords- Spring Framework, IOC, Struts, Hibernate, E-commerce
I. Introduction
Frameworks are abstraction layer on existing technology. If developers directly works on technologies
of java then project development time and cost will increase time to time.Non Invasive Frameworks does not
force a developer to extend this class from a framework specific class or implement a framework specific
interface.Spring framework is a complete and a modular framework. It means complete application can be
developed using spring framework or some selective operations of the project can be developed using this
modular framework.Even though java enterprise is widely used, it has some limitations such as transaction
support, security, distributed computing [1],[5].Spring framework has few advantages over other frameworks
like:
1) Simplicity using POJO
2) Testability without using 3rd party servers or container
3) Dependency Injection
Spring framework has a layered architecture so when an E-commerce application is developed using
spring framework it has clear separation of presentation layer, business layer, persistence layer. The layered
architecture of spring framework allows users to select about which of its components users can use.
www.ijmer.com
Inversion of Control: The central part of Spring Framework is Spring Container. It manages how beans
are created configured and managed in a spring container. This module provides the functional/basics part of the
spring framework called Dependency Injection.
The same system with the help of AOP can be drawn as follows: All the four functionalities are provided to one
class named as service [6].
www.ijmer.com
www.ijmer.com
www.ijmer.com
Hibernate
www.ijmer.com
PROPOSED SYSTEM
Spring framework which is modular and having a multitier architecture can be used with multiple other
frameworks such as Struts, Hibernate. Although spring has its own MVC which can be used in developing the
entire application.
The proposed system can be considered here with the help of a website such as that of a Shopping Cart where
user requests items and buys items. It generally has three layer i.e. presentation layer, business layer and
database layer.
A. Presentation layer:
The Presentation Tier is generally responsible for displaying the output on screen in a look and feel
appearance. User Interface is the user sees when they open a web page in the browser. It is what is presented to
the user on the client side within their web browser. It is responsible for handling requests and forwarding the
response back to client. It provides with the views that can be provided to the users such as Jsp, HTML
documents. The presentation layer can be done using either spring MVC or struts.
B. Business layer:
The business layer is also called as functional Process Logic, Business Rules and all the logic related to
functionality can be kept in Business layer. In this layer we can typically define POJO, beans, interfaces,
classes, functions, procedures, properties file. The business layer can be handled using spring framework
because it has various features such as scheduling, dependency injection, internationalization, distributed
transactions.
C. Data Access layer:
The data access layer or persistence layer can used for connectivity with any database. It can handle several
operations called by user including creation of databases.
The general architecture for the three tier can be as follows:
The proposed architecture for the website consisting of the three layers is as follows:
www.ijmer.com
IV. Discussion
The spring framework has MVC model. Struts framework which is used for presentation tier also has
MVC model. But there are some differences between the two with regards to the MVC model. The differences
can be explained as follows[17]:
1) The Spring MVC supports more number of views than that of the struts1.x such as struts1.x only supports
JSP and Tiles, but spring MVC supports Velocity, PDF, excel in addition to JSP and Tiles.
2) Spring MVC is well organized as compared to struts.
3) Struts framework has been around for long time, so it is easy for use as compared to spring because
documentation of spring has to be read before using it.
4) Spring MVC web tier are easier to test because the testing can be performed without server.
| IJMER | ISSN: 22496645 |
www.ijmer.com
VI. Conclusions
Being a modular framework spring is a powerful framework for developing enterprise applications. It
can also be easily integrated with hibernate, struts and frameworks for developing complete enterprise
applications thereby reducing the coupling and clear separation of layers. Due to its lightweight feature it is easy
to use. Web servers such as Tomcat can also be used during integration of spring with other frameworks.
Considering the present scenario wherein there is struts2 framework that can be implemented for web tier spring
framework can be used effectively for all the three tiers to build an efficient enterprise application. The spring
framework can be easily be integrated with any ORM tool such as Hibernate, iBATIS.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
Chunsheng Zhao, Mai Jiang, Zhiyong He, The Design of E-Commerce System Architecture Based on Struts2, Spring and
Hibernate, IEEE Transaction Paper Dated 2010.
JiyaJiang , Tong Liu , Yu Liu,The Construction of E-Business Portal Based on Struts, Spring and Hibernate, IEEE
Transaction Paper Dated 2009.
Praveen Gupta, Prof. M.C. Govil, Spring Web MVC Framework for rapid open source J2EE application development: a
case study, International Journal of Engineering Science and Technology, Vol. 2(6), 2010, 1684-1689
Praveen Gupta, Prof. M.C. Govil, MVC Design Pattern for the multi framework distributed applications using XML,
spring and struts framework , International Journal on Computer Science and Engineering, Vol. 02, No. 04, 2010, 1047 1051
Rod Johnsonet, Professional Java Development with the Spring Framework, Publications John Wiley & Sons 2005
Craig Walls with Ryan Breidenbach, Spring in Action , Publications Manning 2008
Introduction to the Spring framework accessed from: http://www.ibm.com/developerworks/web/library/wa-Spring1/
Model-View-controller Accessed from: http://en.wikipedia.org/wiki/Model-view-controller
Hao, Xiafei, Tang, Hongxi. Struts+Spring+Hibernate Integrated Framework and its Use in Log Accounting and analyzing
System, International Conference Dated 2010.
KeJu, Jiang Bo, Applying IoC and AOP to the Architecture of Reflective Middleware, International Conference Dated
2007.
Research of Structure Integration based on Struts and Hibernate, IEEE Conference 2010.
Erxiang Chen Personnel department Research and Design on Library Management System Based on Struts and Hibernate
Framework, IEEE Conference 2009.
Hui Li, Jingjun Zhang, Lei Wang, The Research and Application of Web-Based System with Aspect-Oriented Features,
IEEE International Conference Dated 2010.
DipankarMajumdar, Migration from Procedural Programming to Aspect Oriented Paradigm, IEEE International
Conference Dated 2009.
Hui Li ,GuiJun Xu , Mingji Zhou, Lingling Si, Aspect-oriented Programming for MVC Framework , IEEE Paper Dated
2010.
Robert J. Walker, Elisa L.A. Baniassad and Gail C. Murphy, An Initial Assessment of Aspect -oriented Programming,
ACM Paper Dated 2009.
www.ijmer.com