Research Article. ISSN 2347-9523 (Print) *Corresponding author Lili Wang Email: lily@nepu.edu.cn



Similar documents
Enterprise Application Development In Java with AJAX and ORM

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

Journal of Chemical and Pharmaceutical Research, 2015, 7(3): Research Article

Customer Bank Account Management System Technical Specification Document

Programma corso di formazione J2EE

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

Wireless Web Content Management Using J2ME

The Design of B2B E-commerce System Based on MVC Model and J2EE

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

JAVA/J2EE DEVELOPER RESUME

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

Java EE Web Development Course Program

Design and Implementation of Laiwu Black Information Management System Based on ExtJS

Core Java+ J2EE+Struts+Hibernate+Spring

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

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

Complete Java Web Development

Course Number: IAC-SOFT-WDAD Web Design and Application Development

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

Web and Enterprise Applications Developer Track

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

Project Manager 1 Post == Experience years in Project Management in reputed company, Salary Rs.1,20,000/-

UNIVERSITY OF ILLINOIS AT CHICAGO University of Illinois Ready

Japan Communication India Skill Development Center

Long haul product development

Oracle Identity Analytics Architecture. An Oracle White Paper July 2010

Performance Comparison of Persistence Frameworks

SPRING INTERVIEW QUESTIONS

Japan Communication India Skill Development Center

Specialized Programme on Web Application Development using Open Source Tools

Course Name: Course in JSP Course Code: P5

Portals, Portlets & Liferay Platform

JEE Web Applications Jeff Zhuk

Japan Communication India Skill Development Center

COMPARISON BETWEEN SPRING AND ASP.NET FRAMEWORKS

CHAPTER 1 - JAVA EE OVERVIEW FOR ADMINISTRATORS

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

Web-based Automobile Sales Management System. Huabo Xiao

Web Development in Java

ORM IN WEB PROGRAMMING. Course project report for 6WW Erik Wang

Client-server 3-tier N-tier

Software Architecture Document

Study on Architecture and Implementation of Port Logistics Information Service Platform Based on Cloud Computing 1

MVC pattern in java web programming

Oracle WebLogic Server 11g Administration

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

Java Platform, Enterprise Edition (Java EE) From Yes-M Systems LLC Length: Approx 3 weeks/30 hours Audience: Students with experience in Java SE

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

Application of MVC Platform in Bank E-CRM

Design and Implementation of Web front-end based on Mainframe education cloud

Design of Electronic Medical Record System Based on Cloud Computing Technology

CrownPeak Java Web Hosting. Version 0.20

Japan Communication India Skill Development Center

An Architecture for Web-based DSS

Performance Optimization of Teaching Web Application based SSH Framework

B. WEB APPLICATION ARCHITECTURE MODELS

RRF Reply Reporting Framework

DTWMS Required Software Engineers. 1. Senior Java Programmer (3 Positions) Responsibilities:

JBS-102: Jboss Application Server Administration. Course Length: 4 days

Framework Adoption for Java Enterprise Application Development

How To Write An Online Shopping Application In Java Ee

Open Access Design and Implementation of Online Shopping System Based on the Struts Framework. Zhang Li 1,* and Zhao Luhua 2

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

CloudCERT (Testbed framework to exercise critical infrastructure protection)

What means extensibility?

Monitoring Resources on Pramati Server

The Regional Medical Business Process Optimization Based on Cloud Computing Medical Resources Sharing Environment

The Research and Implementation of the Key Techniques on Post-graduate Degree-granting Online Information Collection System

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

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

PG DAC. Syllabus. Content. Eligibility Criteria

Mastering Tomcat Development

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

Das Spring Framework - Einführung in leichtgewichtige J2EE Architektur. Jürgen Höller. Organized by:

GlassFish Security. open source community experience distilled. security measures. Secure your GlassFish installation, Web applications,

A Comparison of Open Source Application Development Frameworks for the Enterprise

Client Overview. Engagement Situation. Key Requirements for Platform Development :

Liferay Enterprise ecommerce. Adding ecommerce functionality to Liferay Reading Time: 10 minutes

Research and Implementation of Customizable Dynamic Website Management System

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

Design and Implementation of J2EE-based Online Examination System Yingjie Fu

Design and Implementation of Production Management Information System for Jiujiang Railway Track Depot

Pro<DOC/> e-commerce Technology An Introduction

Getting Started with Web Applications

Design Approaches of Web Application with Efficient Performance in JAVA

Java EE 7: Back-End Server Application Development

Java (J2SE & J2EE) and Web Development Training Catalog

New Methods for Performance Monitoring of J2EE Application Servers

Aspect-oriented Refactoring of a J2EE Framework for Security and Validation Concerns

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

Design and Implementation of Supermarket Management System Yongchang Rena, Mengyao Chenb

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

An Easy, Secure and Reliable Online Shopping & Payment System

A Network Services Management Middleware Architecture Model

Delivering Heterogeneous Hydrologic Data services with an Enterprise Service Bus Application

What Is the Java TM 2 Platform, Enterprise Edition?

Java Application Developer Certificate Program Competencies

Mobile Applications Developer Track

Mobile and Web Applications Developer Track

Java in Web 2.0. Alexis Roos Principal Field Technologist, CTO Office OEM SW Sales Sun Microsystems, Inc.

Transcription:

Scholars Journal of Engineering and Technology (SJET) Sch. J. Eng. Tech., 2015; 3(4B):424-428 Scholars Academic and Scientific Publisher (An International Publisher for Academic and Scientific Resources) www.saspublisher.com ISSN 2321-435X (Online) ISSN 2347-9523 (Print) Research Article An Efficient Design Method of Enterprise Attendance System Based on SSH2 Lili Wang *, Panlin Jiang School of Computer & Information Technology, Northeast Petroleum University, Daqing 163311, China *Corresponding author Lili Wang Email: lily@nepu.edu.cn Abstract: On the basis of SSH2 open source framework, this paper designed and implemented a set of employee attendance management system. The system uses JSP, Ajax and JNDI technology to regulate the system standards. Meanwhile it implements the separation of presentation layer, business layer and database layer, which reduces the coupling of the module and improves the code reusability. The practice has proved that the system has the characteristics with strong expansibility, good maintainability and high efficiency, and has a good application effect. Keywords: B/S, SSH2 framework, attendance system, Oracle database. INTRODUCTION Enterprise employee attendance system is an intelligent management system, which can get timely the working state of employee. The current attendance system has some common problems, such as lower scalability, poor portability and subsequent maintenance difficulty [1]. So it has been unable to meet the requirement of modern enterprise development. After consulting large number of relevant documents, this paper designed and implemented a set of employee attendance management system based on SSH2 architecture. The system is based on B/S structure, development platform is MyEclipse, three layer J2EE structure is combined with SSH framework, and background database is ORACLE 11g. It supports rights management of multi-user, multi application and multi module, has high scalability and portability, reduces maintenance cost, and improves the efficiency of software development. THE INTRODUCTION OF SSH2 TECHNOLOGY SSH2 open source framework is the most mainstream J2EE lightweight framework, including three frameworks, namely Struts2 framework, Spring3.x framework and Hibernate 2.5 [2]. Struts2 Struts2 is web application framework based on MVC (model, view and controller) structure. It takes WebWork as core, and adopts interceptor mechanism to deal with user's request, so that the business logic is completely divorced from the servlet API. It not only decreases the coupling degree of program but also improves the test efficiency [3]. Because it can test the Action without web container, and divides the program structure into business logic, control logic and display. So the coupling degree between the logic layers is greatly reduced, which improves the development efficiency of application, reusability and maintainability [4]. Spring Spring is a business layer framework, it can well glue presentation layer and persistence layer. It provides a lightweight solution for enterprise program, including declarative transaction management, various configurations supportance of persistence layer, unified resource allocation management and so on [5]. Layered architecture is one of the advantages of Spring. It allows user to choose module according to their own needs, and manages the life cycle of business objects and invokeing relationships between them. The core of Spring is Aspect-Oriented Programming (AOP) and Inversion of Control (IOC), it provides a unified interface for the different data access technology. Hibernate Hibernate is a Object Relational Mapping (ORM) framework, it makes the lightweight object encapsulation for JDBC. It works in the persistence layer, its main work is automatic generating code of persistence layer. Moreove, it not only supports encapsulation and polymorphism of object-oriented, but also supports such as HQL query language, SQL query language and all mainstream relational database system, which can solve the mismatch between the oriented object technology and relational database technology [6-7]. So programmers can use object-oriented programming ideas to manipulate database and put more effort in the business layer. 424

SYSTEM STRUCTURE AND FUNCTION DESIGN System architecture pattern In this system, presentation layer uses Struts, it makes process control, business processing and presentation layer result separated; persistence layer uses Hibernate, it can directly generate the method of database persistence layer; business layer uses Spring, it integrates and assembles code by injection thought. Their integration improves the software expansibility, reduces maintenance cost, and greatly improves the efficiency of software development. System architecture is shown in Fig.1 (1) When user visit JSP page of the system and submit the request, the system will encapsulate the submitted data into the ActionForm class of Struts, and submit the request to the ActionServlet in the Struts. (2) According to configuration file in Stmtsconfig.xml, ActionServlet will find the corresponding Action. (3) ActionServlet will transfer the request to corresponding Action class for processing. (4) The action will invoke the corresponding business Service in the Spring framework, and then invoke business Bean to deal with the request through the Service. The business Bean will invoke the corresponding objects of persistence layer, and dealt with them accordingly. (5) Hibernate will manage the persistent layer object and save the changes of the persistence layer object to the database. System function structure and analysis The user of the system has three categories: ordinary users, department manager and administrator user. After the users login in the system, ordinary users can only view and maintain their own relevant; Department manager has the authorities of message management and audit management, the audit management includes travel leave audit and sign audit; Administrator user has all authorities, he can modify the authorities of user department manager, audit application which department manager has audited, and decide whether to pass. The system function structure is shown in Fig.2. Fig. 1: System architecture chart 425

Fig. 2: Function architecture chart System function module Taking into full account the needs of employee attendance management, system function mainly includes sign in/out management, attendance history management, working day/time management, travel/leave management, retroactive management and other modules. (1) User management module: user can modify own information. If user is administrator, he can also set permission for other users. (2) Sign in/out module: record sign in and sign out time, and judge whether is late or leave early. If there is no operation in the day, should check whether the employee is absent, sick leave or travel. (3) Attendance history module: query user s authority, and according to the relevant authority to query by conditions. (4) travel/leave management module: first, a employee sent a corresponding application to his department manager, then the application was sent to manager for final approval if it has get the agreement of department manager. (5) Message management module: take charge of communication between different authority users, and can modify the news with CRUD operations. (6) Retroactive management module: if employee forgot to sign in/out, they can submit retroactive applications. The applications were sent to department manager for approving. (7) working days/time management module: set working days, rest days and working time periods. The function is only set by the administrator (Manager). (8) Database management module: the administrator can backup, empty and restore the system attendance database. THE DESIGN AND IMPLEMENTATION OF KEY TECHNOLOGY The flexibility connection of database Take Oracle as an example, when a programmer accesses Oracle database application, he needs to encode for the reference of Oracle JDBC driver class, and connect to the database by appropriate JDBC URL. If the database is changed, it will results the JDBC URL or JDBC driver package needs to be modified. Furthermore, with the increase of actual use terminal, the connection pool parameters of original configuration are also should be constantly adjusted. This system uses JNDI technology. JNDI (Java Naming and Directory Interface) is one of important J2EE specification. Using JNDI, programmers do not need to care about the specific background database, JDBC driver, user name and password of database. These questions were left to the J2EE container to configure and manage. The programmer needs only to reference the configuration and management. First, we configure the corresponding Oracle.xml file in web server, then write code on the program to reference the file. The core code is as follows: Context ctx=new InitialContext(); Object datasourceref=ctx.lookup("java:oracle"); // The Reference of data source DataSource ds=(datasource)datasourceref; conn=ds.getconnection(); Now, the program does not need to care about specific JDBC parameters. If relevant parameters of database changed, we just need to modify the JDBC parameters in Oracle.xml. 426

The high efficiency scalability of system Employee attendance system is based on SSH2 framework, it ensures the consistency of hierarchical design through the framework integration of Struts, Spring and Hibernate. To ensure that each hierarchy does not rely on another hierarchy, it realize the decoupling between these hierarchies. Therefore, when any of the frameworks was replaced, other hierarchical components of the system can not be affected. Taking attendance module as an example: when employees login the system, they will enter the sign page. Their sign request will be stopped by Struts interceptor which is set in the web.xml. The system will according to the parameters passed by page to find the corresponding action in Struts.xml to deal with the request. The code in struts.xml parts is as follows: <package name="model1" extends="default"> <action name="emp_signed" class="signedaction" method="signed"> <result name="signedsuccess">/employee/signed_in_out.jsp</r esult> </action> </package> It is observed that the class we find from XML configuration file is SignedAction, then we find Signed method according to the method attribute in Action. Because this program has no contact with the Servlet API, so the later expansion can be modified without changing the other program code. Spring container is used to manage the objects of Struts2 and Hibernate framework. It can easily do unified control to object life cycle, and facilitate the future modifications and extensions. Spring is through the applicationcontext.xml configuration to initialize actions and services. The specific code is as follows: <bean id="employeeaction" class="com.hrm.action.employeeaction" scope="prototype"> <property name="employeeservice"><ref bean="employeeservice" /></property> <property name="dataservice"><ref bean="dataservice"/></property> </bean> By the Spring configuration, EmployeeAction can successfully invoke the underlying Service, Service can successfully invoke the DAO layer to complete the increase of employee information. The transaction flexibility of system In the past, we used JDBC to operate data. Due to data source connection is not thread safe, so each request is getting a new connection from the data source. This will result code amount is larger and some try/catch are neglected. In order to avoid these questions, this system adopts declarative transaction of Spring. The configuration diagram of Spring is shown in Fig.3. Fig. 3: Configuration diagram of declarative transaction in Spring Its core configuration code is as follows: <tx:advice id="transactionadvice" transaction-manager="transactionmanager"> <tx:attributes> <tx:method name="save*" propagation="required" rollback-for="java.lang.exception"/> // Other transaction methods </tx:attributes> </tx:advice> <aop:config> 427

<aop:advisor pointcut="execution(* com.hrm.service..*.*(..))" advice-ref="transactionadvice"/> </aop:config> The biggest advantage of using Spring to declare transaction is that it does not require to manage transaction by programming approach. We only make the related transaction rule statement in the configuration file, then the transaction rules are applied to the business logic. CONCLUSION This paper introduces the design and implementation of enterprise employee attendance system based on SSH2 framework. It deeply analyzed the integration of hierarchical structure and framework technology, realized the separation of presentation layer and business logic layer, and described the key technologies in detail. The practice has proved that the system has high development efficiency, strong expansibility and good maintainability, and has a good application effect. REFERENCES 1. Xing baoyan, Menfei, Zhang shaolong; Design and implementation of enterprise integrated management system based on the SSH framework technology. China Computer & Communication, 2012; 1: 69. 2. Zhao Jie, Fang Songjian, LiZeyan; Design and implementation of school flea network based on SSH2. Value Engineering, 2011; 19(30): 151-152. 3. JiaYanli, LiuYan; Study and development of examination management information system based on SSH framework. Computer and Modernization, 2011; 27(10): 126-128, 131. 4. Huang Zhangwei; Web Office System Based on An SSH2 Framework. Fujian Computer, 2011; 12: 110-111. 5. Yun Guiquan; Based on struts, spring, hibernate architecture design and implementation. Computer Knowledge and Technology, 2011; 18(7): 4369-4371,4385. 6. Liangbi; Research and application of the integrated technology of SSH framework. Journal of Xi an University of Arts & Science (Natural Science Edition), 2011(03): 16-19. 7. Spring - Java /J2EE Application Framework. Available from http: //static.springframework.org / spring /docs/ 1.1.5 /reference / index. 428