Integration of Struts, Spring and Hibernate for an E-Commerce System

Similar documents
Research Article. ISSN (Print) *Corresponding author Lili Wang

SPRING INTERVIEW QUESTIONS

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Portals, Portlets & Liferay Platform

The Spring Framework: An Open Source Java Platform for Developing Robust Java Applications

Enterprise Application Development In Java with AJAX and ORM

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

Java EE 7: Back-End Server Application Development

SSC - Web development Model-View-Controller for Java web application development

How to Build an E-Commerce Application using J2EE. Carol McDonald Code Camp Engineer

A Comparative Study of Web Development Technologies Using Open Source and Proprietary Software

Design Approaches of Web Application with Efficient Performance in JAVA

Customer Bank Account Management System Technical Specification Document

Framework Adoption for Java Enterprise Application Development

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

Specialized Programme on Web Application Development using Open Source Tools

Commercial software development with the help of J2EE architecture and MVC

MVC pattern in java web programming

JAVA ENTERPRISE IN A NUTSHELL. Jim Farley and William Crawford. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo.

JEE Web Applications Jeff Zhuk

How To Understand The Architecture Of Java 2Ee, J2Ee, And J2E (Java) In A Wordpress Blog Post

Tutorial: Design Patterns in the VSM

Japan Communication India Skill Development Center

COMPARISON BETWEEN SPRING AND ASP.NET FRAMEWORKS

Japan Communication India Skill Development Center

Client-server 3-tier N-tier

Core J2EE Patterns, Frameworks and Micro Architectures

Pro<DOC/> e-commerce Technology An Introduction

Japan Communication India Skill Development Center

A framework for web-based product data management using J2EE

SOFTWARE ARCHITECTURE FOR FIJI NATIONAL UNIVERSITY CAMPUS INFORMATION SYSTEMS

Performance Comparison of Persistence Frameworks

JAVA/J2EE DEVELOPER RESUME

HPC Portal Development Platform with E-Business and HPC Portlets

CrownPeak Java Web Hosting. Version 0.20

B. WEB APPLICATION ARCHITECTURE MODELS

Complete Java Web Development

A Guide to Migrating Enterprise Applications to Spring

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Contents. Client-server and multi-tier architectures. The Java 2 Enterprise Edition (J2EE) platform

Programma corso di formazione J2EE

Specialized Programme on Web Application Development using Open Source Tools

OpenShift is FanPaaStic For Java EE. By Shekhar Gulati Promo Code JUDCON.IN

An introduction to creating JSF applications in Rational Application Developer Version 8.0

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

Application of MVC Platform in Bank E-CRM

zen Platform technical white paper

Enterprise Applications

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

Java (J2SE & J2EE) and Web Development Training Catalog

Developing modular Java applications

Rapid Application Development. and Application Generation Tools. Walter Knesel

Java 2 Platform, Enterprise Edition (J2EE) Bruno Souza Java Technologist, Sun Microsystems, Inc.

Stock Trader System. Architecture Description

Inside the Digital Commerce Engine. The architecture and deployment of the Elastic Path Digital Commerce Engine

Japan Communication India Skill Development Center

SOA REFERENCE ARCHITECTURE: WEB TIER

JAVA Technologies QUARTER 1 DESKTOP APPLICATIONS - ESSENTIALS QUARTER 2 NETWORKING AND OPERATING SYSTEMS ESSENTIALS. Module 1 - Office Applications

Net-WMS FP Net-WMS SPECIFIC TARGETED RESEARCH OR INNOVATION PROJECT. Networked Businesses. D.8.1 Networked architecture J2EE compliant

Communiqué 4. Standardized Global Content Management. Designed for World s Leading Enterprises. Industry Leading Products & Platform

Building Web Applications, Servlets, JSP and JDBC

Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java

HPC PORTAL DEVELOPMENT PLATFORM

SAP Web Application Server 6.30: Learning Map for Development Consultants

Oracle Identity Analytics Architecture. An Oracle White Paper July 2010

Oracle Application Development Framework Overview

Web Frameworks. web development done right. Course of Web Technologies A.A. 2010/2011 Valerio Maggio, PhD Student Prof.

How To Write An Online Shopping Application In Java Ee

Web and Enterprise Applications Developer Track

MBA (e-commerce) 5 Yrs. Semester VI. Advance Java Programming

The end. Carl Nettelblad

How To Develop A Web Dialog For An Org Database With A Database On A Computer (Oracle)

An Easy, Secure and Reliable Online Shopping & Payment System

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

Java EE Web Development Course Program

PHP Web Authoring for Database Management based on MVC Pattern

Core Java+ J2EE+Struts+Hibernate+Spring

In this chapter, we lay the foundation for all our further discussions. We start

Virtual Credit Card Processing System

JBoss JEE5 with EJB3.0 on NonStop. JAVA SIG, San Jose

Techniques for Scaling Components of Web Application

Distributed Database Design

RS MDM. Integration Guide. Riversand

Web Application Architectures

What Is the Java TM 2 Platform, Enterprise Edition?

Client/server is a network architecture that divides functions into client and server

Operations and Monitoring with Spring

Introduction to Apache Roller. Matt Raible Apache Roller Committer June 2007

Web-based Automobile Sales Management System. Huabo Xiao

Transcription:

Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology IJCSMC, Vol. 3, Issue. 10, October 2014, pg.853 859 RESEARCH ARTICLE ISSN 2320 088X Integration of Struts, Spring and Hibernate for an E-Commerce System Neha Munsi 1, Nidhi Sehrawat 2, Mahak Jain 3 ¹Computer Science and Engineering & Maharshi Dayanand University, India ²Computer Science and Engineering & Maharshi Dayanand University, India 3 Computer Science and Engineering & Maharshi Dayanand University, India 1 nehamunsi@gmail.com; 2 nidhisehrawat94@outlook.com; 3 mahakjain140993@gmail.com Abstract This paper presents the concept of the Spring framework which is widely used in making enterprise wide Applications along with other frameworks. Spring framework insists that ordinary java beans can be used with slight modifications to them. This framework is used within J2EE architecture to make it easier to develop large scale java applications. This paper presents the architecture overview of spring framework along with the features of the framework that have made the framework useful for using it along with struts and hibernate. The integration of various frameworks for an E-commerce system such as university system has also been discussed in the paper. The Spring MVC framework as an important part is also discussed along with struts mvc. This paper has a proposed architecture for a website based system using the integration of Spring, Hibernate and Struts framework. Keywords Dispatcher, E-commerce, Hibernate, Integration, JavaEE, Mapping file, MVC, Spring, Struts I. INTRODUCTION With the impulse of advancement for network technique and the rapid development of electronic commerce, online shopping has become the latest consumptive mode for consumers, particular for our younger generations who are more accept new concept and tend to pay more attention to it. In consequence, more and more businessmen establish online malls and make this novel shopping concept accepted by consumers. In the past, the client/server architectures are adopted by the purchase-sell-stock management information system, which divides application into two parts. One is the server which is responsible for data management, and the other one is the Client which engages in the interaction with manager. As we known, the client/server architecture is has reflected the, the Inventory management system's upgrade also has been put on the agenda. The improved model and the Back-state management of online mall are very similar, and this will give us opportunities on the integration or mutual expansion between them. The purpose of this paper is to design an online store Back-state management system with 2014, IJCSMC All Rights Reserved 853

the Inventory management system in order to reduce unnecessary data's duplication for input and output and ensure time consistency between the two systems described above. In today s world, with the introduction of information technology and communication media many of the companies use frameworks for making the development of their applications easier. The business today demands web applications to advertise its company so it is very important to take care of the architecture used in development of the application. Framework can be considered as a set of functions helping the developers in creating the applications. The Spring Framework is an application type framework that helps to customize java applications effectively. Spring framework when used with JavaEE makes the development easier. Spring is a layered architecture so whenever an E- commerce system is developed using spring it has clear separation of layers. A. Architecture of Spring Framework II. SPRING FRAMEWORK The Spring framework provides one-stop shop for java based application on all layers (one tier- stand alone java application, web tier- in web application and enterprise tier tier- Enterprise Java Beans). It is modular, means choose spring module based on requirements, It does not inforce to add all the library files in your project classpath.: All the features of Spring framework are organized into 20 modules. The diagrammatic architecture as follows : Fig 1 Spring Framework Architecture Spring Core: It is core part of Spring and consists of the following modules Core, Beans, Context and Expression Language. The brief description is as follows: Core: It is fundamental module of the framework with IOC and Dependency Injection with singleton design pattern. Beans: This module is implementation of the factory design pattern through BeanFactory. The BeanFactory applies IOC to separate the application s configuration and dependency specification from actual program logic. Context: It (ApplicationContext) extends the concept of BeanFactory, adding support for - Internationalization (I18N) messages, Application lifecycle events and Validation. Also includes Enterprise services such as E-mail, JNDI access, EJB integration, Remoting, and Scheduling. Expression Language: The Spring3.0 introduces a new expression language Spring Expression Language (SpEL). It is a powerful expression language based on Java Server Pages (JSP) Expression 2014, IJCSMC All Rights Reserved 854

Language(EL). It is used to write expression language querying various beans, accessing and manipulating their properties and invoking the methods. Data Access : It is fundamental part of database access layer and consists of the following modules JDBC, ORM, OXM, JMS and Transaction management module. The brief description is as follows : JDBC: The JDBC modules provides a JDBC-abstraction layer that removes the complexity of the traditional JDBC code and parsing of database-vendor specific error code. ORM: The ORM module provide consistency/portability to your code regardless of data access technologies based on object oriented mapping concept like Hibernate, JPA, JDO and ibatis. It provides code without worrying about catching exceptions specific to each persistence technology (ex: SQLException thrown by JDBC API). OXM: The OXM introduces in Spring3.0 as separate module. It is used to converts object into XML format and vice versa. The Spring OXM provides a uniform API to access any of these OXM(Castor, XStream, JiBX, Java API for XML and XmlBeans) framework. JMS : The JMS module provides by reducing the number of line of code to send and receive messages. The API take car of JMS workflow and exception handling. Transaction : The Transaction module supports programmatic and declarative transaction management for POJO classes. All the enterprise level transaction implementation concepts can be implement in Spring. Web : It is core part of Web layer and consists of the following modules Web, Web-Servlet, Web-Struts and Web- Portlet. The brief description is as follows : Web : 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. Web-Servlet : The Web-Servlet module contains model-view-controller (MVC) based implementation for web applications. It provides all other features of MVC including UI tags and data validations. Web-Struts: The Web-Struts module contains the support classes for integrating a classic Struts web tier within a Spring application. It contains the classes to integrate Struts1.x and Struts2. 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. Others : There are few other important modules in Spring, which plays vital role in the framework to use all the features in various scenario. The modules are AOP, Aspect, Instrumentation, and Test. AOP : It contains API for AOP Alliance-complaint aspect-oriented programming implementations on various layers. You can introduce new functionalities into existing code without modifying it. Aspectj : The separate Aspects module provides integration with AspectJ. Test : The Instrumentation module provides class instrumentation support and classloader implementations to be used in certain application servers. 2014, IJCSMC All Rights Reserved 855

B. Features of Spring Framework Spring is a free, open source framework that offers a lot of functions to programmers. It was created by Rod Johnson and Juergen Hoeller. The most important features are the Inversion of Control, Aspect oriented programming and Spring MVC. Spring has its own MVC framework that can be used with other frameworks. The Aspect oriented programming, IoC and MVC are the important features. Aspect oriented Programming: With the help of AOP the various concerns present in a system can be separated easily. In spring aspects are joined together with the help of spring xml file and coding is well modularized. C. Spring MVC Model The Spring web MVC framework provides model-view-controller architecture and ready components that can be used to develop flexible and loosely coupled web applications. The MVC pattern results in separating the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements. 1) The Model encapsulates the application data and in general they will consist of POJO. 2) The View is responsible for rendering the model data and in general it generates HTML output that the client's browser can interpret. 3) The Controller is responsible for processing user requests and building appropriate model and passes it to the view for rendering. Fig 2 Spring MVC Model 2014, IJCSMC All Rights Reserved 856

III. E-COMMERCE SYSTEM USING SPRING AND OTHER FRAMEWORKS Spring framework can be used with many other frameworks for making of an E-commerce application such as struts and hibernate. Struts framework: This framework divides web system into three layers: Model, View and Controller. Model consists of JavaBeans, EJB; View consists of JSP files; Controller is carried out by Actions. Struts architecture can be shown as below: Fig 3 Struts Architecture Hibernate framework: This framework reduces the complexity and difficulty while manipulating the JDBC and SQL data. It maps Java classes to database tables efficiently. It is mainly associated with databases. A. Integration of Struts, Spring and Hibernate Struts, Spring and Hibernate frameworks can be combined together to make an efficient E-commerce applications The struts framework with an efficient MVC can help in developing the presentation tier. The Spring framework can help in handling the business logic. The Hibernate framework can help in handling the data present in the system and help in storing and retrieving the data to and from database respectively. 2014, IJCSMC All Rights Reserved 857

Fig 4 Integration of SSH Framework IV. PROPOSED SYSTEM The above Spring framework which is having a multitier architecture can be used with many other frameworks such as Struts which can be used for web presentation layer. It can also be easily integrated with Hibernate which is a powerful database connectivity layer. Although spring has its own MVC it can use the presentation tier of Struts. The proposed system here 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. 2014, IJCSMC All Rights Reserved 858

Fig 5 Proposed Architecture of E-Commerce System V. CONCLUSION Spring is a powerful framework for building enterprise applications. It can also be easily integrated with struts and hibernate frameworks for developing efficient enterprise applications thereby reducing the coupling and clear separation of layers. Due to its lightweight feature it is easy to use. Simple web server 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 used 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 integrated with any ORM tool such as Hibernate with the help of XML mapping. ACKNOWLEDGEMENT This research paper is made possible through the help and support from everyone, including: parents, teachers, family, friends, and in essence, all sentient beings. I dedicate my acknowledgment of gratitude towards my co- Authors Neha Munsi and Mahak Jain for supporting me and guiding me. REFERENCES [1] Rod Johnsonet," Professional Java Development with the Spring Framework", Publications John Wiley & Sons [2] 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 [3] Craig Walls with Ryan Breidenbach, " Spring in Action", Publications Manning 2008 [4] "Research of Structure Integration based on Struts and Hibernate", IEEE Conference 2010 [5] Model-View-controller Accessed from http://en.wikipedia.org/wiki/model-view-controller 2014, IJCSMC All Rights Reserved 859