Development of E-Institute Management System Based on Integrated SSH Framework

Similar documents
Java EE Application Assembly & Deployment Packaging Applications, Java EE modules. Model View Controller (MVC)2 Architecture & Packaging EJB Module

2005, Cornell University

Research on software development platform based on SSH framework structure

Spring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics

com Spring + Spring-MVC + Spring-Boot + Design Pattern + XML + JMS Hibernate + Struts + Web Services = 8000/-

Struts: Struts 1.x. Introduction. Enterprise Application

APPLICATION OF JAVA TECHNOLOGY IN THE REGIONAL COMPARATIVE ADVANTAGE ANALYSIS SYSTEM OF MAIN GRAIN IN CHINA

Remote Health Service System based on Struts2 and Hibernate

Construction of SSI Framework Based on MVC Software Design Model Yongchang Rena, Yongzhe Mab

JAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP

Java Spring Hibernate Interview Questions And Answers For

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Comparative Analysis of EJB3 and Spring Framework

Sitesbay.com. A Perfect Place for All Tutorials Resources. Java Projects C C++ DS Interview Questions JavaScript

A Decision Support System Based on SSH and DWR for the Retail Industry

Socket attaches to a Ratchet. 2) Bridge Decouple an abstraction from its implementation so that the two can vary independently.

Java Spring Hibernate Interview Questions And Answers For

SSC - Web development Model-View-Controller for Java Servlet

Wiring Your Web Application with Open Source Java

VALLIAMMAI ENGINEERING COLLEGE

Prototype 1.0 Specification

POJOs to the rescue. Easier and faster development with POJOs and lightweight frameworks

Lightweight J2EE Framework

/ / JAVA TRAINING

~ Ian Hunneybell: CBSD Revision Notes (07/06/2006) ~

114. Jakarta Struts. Prerequisites. Version 1.1.3

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline

(p t y) lt d. 1995/04149/07. Course List 2018

SPRING MOCK TEST SPRING MOCK TEST I

Data Access on Tourism Resources Management System Based on Spring JDBC Jifu Tong

Appendix A - Glossary(of OO software term s)

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

J2EE Technologies. Industrial Training

Java Enterprise Edition

Full Stack Java Developer Course

A Quick Introduction to Struts

Fast Track to Spring 3 and Spring MVC / Web Flow

POJOs in Action DEVELOPING ENTERPRISE APPLICATIONS WITH LIGHTWEIGHT FRAMEWORKS CHRIS RICHARDSON MANNING. Greenwich (74 w. long.)

Page 1

Java Training Center, Noida - Java Expert Program

Hibernate Interview Questions

Specialized - Mastering Spring 4.2

Java Advance Frameworks

Data Interface Design for Java-Based Mysql Database

An Efficient Approach of Building a New Software Web Framework for Better Software Solutions with DAO Layer

1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master

HIBERNATE MOCK TEST HIBERNATE MOCK TEST I

Spring framework was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003.

Reusability Evaluation of a Domain-Specific Web Application Framework

Building Web Applications With The Struts Framework

JVA-117A. Spring-MVC Web Applications

ADVANCED JAVA TRAINING IN BANGALORE

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

Research of Structure Integration based on Struts and Hibernate

COWLEY COLLEGE & Area Vocational Technical School

COURSE 9 DESIGN PATTERNS

CONFIGURING A SPRING DEVELOPMENT ENVIRONMENT

Migrating traditional Java EE applications to mobile

Oracle Fusion Middleware 11g: Build Applications with ADF I

Chapter 6 Enterprise Java Beans

THIS IS ONLY SAMPLE RESUME - DO NOT COPY AND PASTE INTO YOUR RESUME. WE ARE NOT RESPONSIBLE Name: xxxxxx

Application Servers in E-Commerce Applications

JSF-based Framework for Device Management System Design and Research

Java EE 6: Develop Web Applications with JSF

Call: Core&Advanced Java Springframeworks Course Content:35-40hours Course Outline

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Oracle 10g: Build J2EE Applications

Java J Course Outline

Type of Classes Nested Classes Inner Classes Local and Anonymous Inner Classes

Enterprise Java Unit 1-Chapter 2 Prof. Sujata Rizal Java EE 6 Architecture, Server and Containers

Development of web applications using Google Technology

Data Expression Methods in Enterprise application using J2EE Architecture

Outline. Project Goal. Overview of J2EE. J2EE Architecture. J2EE Container. San H. Aung 26 September, 2003

Integrated Architecture for Web Application Development Based on Spring Framework and Activiti Engine

CORE JAVA. Saying Hello to Java: A primer on Java Programming language

CHAPTER 4: ARCHITECTURE AND SYSTEM DESIGN OF PROPOSED EXPERT SYSTEM: ESOA

Campus Cloud A Management Information System on Cloud

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

JAVA Training Overview (For Demo Classes Call Us )

JAVA MICROSERVICES. Java Language Environment. Java Set Up. Java Fundamentals. Packages. Operations

DESIGN PATTERN - INTERVIEW QUESTIONS

Spring Interview Questions

purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc.

Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p.

Oracle Fusion Middleware 11g: Build Applications with ADF I

APPLICATION ON IOC PATTERN IN INTEGRATION OF WORKFLOW SYSTEM WITH APPLICATION SYSTEMS

1Z Java SE 5 and 6, Certified Associate Exam Summary Syllabus Questions

COMP9321 Web Application Engineering

Application Architectures, Design Patterns

Developing Applications with Java EE 6 on WebLogic Server 12c

MARATHWADA INSTITUTE OF TECHNOLOGY, AURANGABAD DEPARTMENT OF MASTER OF COMPUTER APPLICATIONS ADVANCE JAVA QUESTION BANK

Software Architecture With ColdFusion: Design Patterns and Beyond Topics Outline Prepared by Simon Horwith for CFUnderground 6

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

Oracle Developer Day

Implementing a Numerical Data Access Service

Web Application Development Using JEE, Enterprise JavaBeans and JPA

JAVA SYLLABUS FOR 6 MONTHS

1 Software Architecture

The dialog boxes Import Database Schema, Import Hibernate Mappings and Import Entity EJBs are used to create annotated Java classes and persistence.

Transcription:

Development of E-Institute Management System Based on Integrated SSH Framework ABSTRACT The J2EE platform is a multi-tiered framework that provides system level services to facilitate application development. The main drawback of classical J2EE architecture is its poor performance on business application due to its heavy weight EJBs. Combining the three popular open sources Struts, Spring, and Hibernate (SSH), provides an alternative lightweight approaches for building J2EE enterprise based web application. This paper analyses the merits of integrated SSH framework and describes its specific use in E- Institute Management (E-IM) as an effective web application framework. By using SSH framework, not only the efficiency of system development increases greatly and high usage of code generation tools and application layout template reduce the workload of coding, but also it provides a convenient platform for higher software reusability, reliability and maintainability. Keywords - Framework; Struts; Spring; Hibernate; E-IM Lakshmi R Assistant Professor, Department of Information Science and Engineering, Global Academy of Technology, Bangalore, India 2. STRUTS SPRING HIBERNATE FRAMEWORK 2.1 Struts framework The most popular design pattern usually applied is Model- View-Controller (MVC) which divides the system into three components each responsible for specific task. The model contains the application data and manages the core functionality. The visual display of the model and feedback to the users are managed by the view. Controller interprets input from the user and controls the model and view to change appropriately. Struts [1], which is a very useful technology to construct web application by Java servlet and JSP, provides an open source code framework based on MVC architecture. Components of Struts are as shown in Fig 1. 1. INTRODUCTION In recent years, the web based applications have received greater attention and have become more pervasive. Consequently, the complexity of developing a web application has grown rapidly and J2EE is regarded the most popular platform for building such application systems. To ensure the reuse and efficiency of development process, adopting J2EE technologies to build the web application must select a system framework which has a good performance and being examined. SSH is expected to be a good framework for solving such problems. It uses layered structure and provides a good integrated framework for web applications at all levels in minimizing the interlayer coupling and increasing the efficiency of development. Programmers in the course of practice achieved some successful development pattern which proved practical, such as MVC and ORM, etc. These separate the presentation layer, business layer and data persistent layer thus ensuring reusability and maintainability. The E- Institute Management supplies more advanced techniques in daily transaction management, administrative management and appreciation service. In this paper, web application framework based on SSH is discussed and applied to develop E-IM system. The basic theory of SSH framework is discussed in next section. Fig 1 Struts Framework The business logic of the system is done in Model layer and it contains Action and Action Form objects. Action object encapsulates the processing logic and business calling logic modules and submits the request to the appropriate view component to generate response. ActionForm component describes the data of client form by defining properties. The model level is composed of JavaBean and EJB components. View layer is responsible for the user interaction and consists of JSP files. Struts provide a custom tag library which will interact with the model level and achieve the mapping of ActionForm. The controller controls the action execution that receives Volume 5, Issue 3, May June 2016 Page 204

request and redirects this request to the appropriate module controller. It consists of Action servlet and Action Mapping object. The module controller processes the request and returns results to the central controller using a JavaBean object (Action). The central controller redirects the returned JavaBean object to the main view that displays its information. Struts focuses on reducing the coupling between performance and logic, while it takes less attention to the relevance between business layer and persistent layer. Contrast to the strong interface function, Struts is inferior in business logic function which can be made up by Spring. 2.2 Spring Framework Spring [3] is a lightweight J2EE application development framework which can organize middle level layer objects efficiently and integrates other View frames seamlessly. It allows choosing its certain module in need and provides unifies interface for different data access technology. Spring is based on model of Inversion of Control (IoC) to separate the actual application from the Configuration and dependent regulations on the application. Adopting IoC also makes it easy for assembling Beans. It also provides compact Aspect Oriented Programming (AOP) and realizes business management based on it to test easily. Spring is not attempting to replace the entire existing framework. Developers are free to choose Spring framework for some or all, since Spring modules are not totally dependant. However Spring also has many disadvantages such as many codes in JSP, excessive flexibility of controller and lack of common controller which can be made up by Struts. As a major business level detail, Spring employs the idea of delay injection to assemble code for the sake of improving the scalability and flexibility of built systems. Thus, the systems achieve a centralized business processing and reduction of code reuse thought the Spring AOP module. Spring integration framework with Struts and Hibernate is as shown in Fig 2. Fig 2 Spring Integration Framework 2.3 Hibernate Framework In the Web system development, the traditional approach directly interacts with the database by JDBC. This method however is not only heavy workload but also complex SQL codes of JDBC resulted in inconvenient development and maintenance. Considering the large difference between the object-oriented relation of Java and the structure of relational database, it is necessary to introduce a direct mapping mechanism between the object and databases and mapping files will need modifying rather than Java source codes when the business logic changes in the future. Hibernate [4] is a data persistent framework, and the core technology is the Object/Relational database Mapping (ORM). It is generally considered as a bridge between Java applications and the relational database which provides durable data services for applications and allows developers to use an object-oriented query language to the management and manipulation of relational database. It also furnishes object-oriented Hibernate Query Language (HQL), so that the operations are conveniently performed in the manner of a class of objects, examples and attributes. Hibernate is essentially a middleware providing database services being responsible for the mapping between major categories of Java and relational database. It supplies durable data services and several profiles, such as hibernate properties and XML mapping etc. Its structure is shown in Fig 3. Volume 5, Issue 3, May June 2016 Page 205

Hibernate frame controls the persistent layer. The database objects are mapped into corresponding persistent classes though the ORM and these are useful for middle layer[4, 5]. Data access layer mainly adopts DAO module which isolates the fundamental database operations and upper layer business logic. Hibernate provides ORM which realizes the mapping from object-oriented domain module to traditional relationship database. It takes charge of mapping and provides data query and retrieval functions. This method greatly reduces the development of persistent data programming tasks by translating the Java type HQL statement into SQL statement, and then completing the data operation with JDBC driver. Fig 3 Hibernate Framework 2.4 Structure of Integrated SSH framework The SSH integration architecture adopts multi-tiered model and provides a relevant strategy for each tier support to isolate the dependence of the inter-tier in order to simplify the system expansion. The developed integrated framework in this paper provides the appropriate integration strategy for web application at all levels by combining the characteristics of these three frameworks and layered idea of web applications, which reduces the coupling degree in each layer of the system and has the system easier for maintenance and extension. For presentation layer (UI Layer), Struts is the main frame. Struts intercepts the user requests though ActionServlet, and then calls the model to process the requests appropriately, finally the results to the users are shown through JSP files. The system is conveniently maintained under such mechanism by separating the data processing and display. Struts also serves as the frame for control layer to call business logic and other upper treatments. Spring framework is employed to realize the detail of each level in Business Layer. By using interface-oriented programming, Spring factory model provides Bean generation and management, which avoids the coupling problem between Beans in the form of hard-coded approach. Spring adopts the model of IoC to manage between layers and therefore the implementation of the object becomes transparent, the coupling between the components business is reduced. For the realization of the seamless connectivity at all levels of web application, Spring supports the management on plain old Java Objects (POJO), and it also controls the implementations of the procedures from the presentation layer to the persistent layer and provides interlayer interaction with interface. 3 SRUCTURE OF SSH FRAMEWORK FOR E- IM E-Institute management offers various services for special customers like colleges, institutes etc, through network. As a large scale web application project, the E-IM system is made up of different modules namely faculty, student, parents, and staff. Due to the complex module relations, this paper concerns only specific module like Faculty and Student management to describe the web application of SSH on E-IM system. Figure 4 shows the structure of proposed E-IM system. Here, JSP is acting as the presentation layer to collect user requests data and business data, web layer utilizes MVC framework to have control over business layer and presentation layer interactions. Business layer is mainly mastered by business logic components with Spring IoC container. Data Access layer is composed of various DAO components, which controls the interaction between database access object and persistent data object. Hibernate persistent layer consists of many PO files, and it achieves the database access under hibernate session management. Spring framework is the core of the system, and MVC control, Service-Level components and DAO components are generated by Spring IoC container, which manage the instances of components. The modules in the presented E-IM system include faculty basic information, student basic information, marks details, subject details and others. From the perspective of web-level, presentation layer just provides the function to display the data, the middle layer is responsible for dealing with user s request and updating data in presentation layer, and the database layer stores the information. The middle layer is described as follows. Volume 5, Issue 3, May June 2016 Page 206

Fig 4 Structure of E-IM System 3.1 Hibernate Layer The database is designed to contain basic tables to store the information such as Student, Faculty, and so on. Information is stored by PO objects in the Hibernate layer, while the correlative relationships between these objects are embodied in *.hbm.xml Fig 5 lists the main code in User.hbm.xml as Faculty and Strudent classes are inherited from User class and they are indicated as joined sub class. The primary job of hibernate layer is to set up PO objects and corresponding mapping files, but the database options are managed by DAO layer. Fig 5 Main Code in User.hbm.xml 3.2 DAO Layer Each DAO component is utilized to realize the encapsulation of database access in DAO layer.the implementation of the DAO class relies on the DAO support from Spring, which uses interface defined above. The StudentDao interface and FacultyDao interface is shown in Fig 6. In order to run the program, the Volume 5, Issue 3, May June 2016 Page 207

corresponding configuration is required after depicting DAO classes. Figure 7 shows the part of configuration code. Spring container takes charge of generating and managing components of DAO, and the injection of necessary SessionFactory to DAO components. pattern, while action instantiation is done in configuration files. Figure 8 displays some of the codes in ManagerImpl Fig 6 StudentDao and FacultyDao interface definition Fig 7 Part of the DAO code C. Service Layer To achieve the separation between business layer and persistent layer, DAO components are encapsulated by business logic layer components in business layer, and then it is capable of DAO interface-oriented origramming. Business logic layer is realized by IoC framework. In the programming, only the dependent business logic components are needed to be declared, and getters and setters are written in terms of dependency injection Fig 8 Some of the source code in Student and Faculty ManagerImpl. Volume 5, Issue 3, May June 2016 Page 208

[4] Hibernate: Hibernate Reference Manual, version 2.1.6, 2004. [5] Bing Xue, Zuo-liang cao. Design pattern and in data lasing level frame in web system application. Tianjin Technical institute journal, vol.20, no.1. 2004. Fig 9 struts-config.xml file content 3.3 Web Layer Struts+Spring integration method are used in presentation layer. Action in Struts is required to configure in Struts- Confug.xml, and tha actual configuration is set in Spreing container. Whnen client requests are help up by ActionServlet, they are allocated to the corresponding Action in Struts-Config.xml, and then to the bean in Spring container. The code added in configuration file Struts-Config.xml to obtain the Student attendance information by implementing functions is shown in Fig 9. 4 CONCLUSION Struts, Spring, and Hibernate, each frame has its own advantages and disadvantages. Integrating the distinct characteristics of each frame resulted in effective development and maintenance of web application by using perfectibility of Struts in presentation layer, the flexibility of spring in business management which provides seamless connectivity between frames, the maturity of sophisticated Hibernate in persistent layer. By analysing the merits of integrated SSH frames, certain modules of E- Institute Management system is discussed in this paper. REFERENCES [1] C. Cavaness, Programming Jakarta Struts, USA:O Reilly Publishing, 2002. [2] J. C. Maxwell, A treatise on electricity and magnetism, 3rd ed., vol.2, Oxford: Clarendon, 1892. [3] M. Raible, Spring Live, Colorado: SourceBeat Pbulishing, online book, 2004. Volume 5, Issue 3, May June 2016 Page 209