Научная статья на тему 'J2EE in Applications Supporting Business Management'

J2EE in Applications Supporting Business Management Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
118
54
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
JEE / Spring / Richfaces / Hibernate / Evaluation Manager

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Marcin Trojanowski, Wojciech Zabierowski, Andrzej Napieralski

The article presents an example of application, which could be used to support the work of a company that must deal with improvement and evalution of knowledge of their workers. Application provide rich client graphical interface that facilitate navigation. The core of the system is based on Spring services, which support application in business logic. On the bottom of the application is middle tier Hibernate. Thanks to this design the system is very scalable and flexible.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «J2EE in Applications Supporting Business Management»

J2EE in Applications Supporting Business

Management

Marcin Trojanowski, Wojciech Zabierowski, Andrzej Napieralski

Abstract—The article presents an example of application, which could be used to support the work of a company that must deal with improvement and evalution of knowledge of their workers. Application provide rich client graphical interface that facilitate navigation. The core of the system is based on Spring services, which support application in business logic. On the bottom of the application is middle tier Hibernate. Thanks to this design the system is very scalable and flexible

Index Terms — JEE, Spring, Richfaces, Hibernate, Evaluation Manager

I. Introduction

The scale of the flow of data in enterprises and institutions, with which we are now dealing with, strongly enforces the implementation and continuous modernization of the tools. Only in this way can avoid corrupting the information chaos. An efficient system allows you to control virtually every element of the company, especially helping the administration and management. Effective and well thought out tools facilitate the rapid development of the company, and used more elements so bravely. Artificial intelligence makes preengineered systems are becoming more flexible.

Information systems are a very wide area; an attempt to create a single coherent system that supports the entire process of the company is currently unrealistic. Today has not been created yet such a system, there are standards such as Product Lifecycle Management, which cover the entire production cycle; however, the implementation of a system does not exist.

At a time when companies need to quickly adapt to a changing environment should be ensured about the quality of the knowledge of their employees. Particularly important is the ability to quickly gather information in the computer industry. Excellent tool to achieve the trained staff can assist the process of testing the system. In this paper, an information system is limited to applications for conducting testing of employees in the company. The system is called Ewaluation Manager.

Manuscript received November 8, 2011.

Marcin Trojanowski M.Sc., Wojciech Zabierowski, Ph.D. Eng. , Prof. Andrzej Napieralski, TUL, Department of Microelectronics and Computer

Science, ul. Wolczanska 221/223 90-924 Lodz, POLAND, e-mail: wojtekz@dmcs.pl.

ii. Evaluation Manager Application

Imagine company that deals with IT technology that is very specific and it is not possible to acquire it on study or any commonly available market sources. This company employing new laborer will have to deal with teaching and evaluation of this unique technology. Evaluation Manager is the application that supports company with this process. Senior engineer can easily create evaluation test and assign it to appropriate employee. Then management can go through of done tests and result to choose best employee for given project.

iii. Structure of the Application

Thanks to the construction of skeletons of the system is compatible with the Mvc pattern. Each part of the application is strictly separated and forms a separate unit that can be replaced at any time without affecting other. A separation of the system architecture shows Fig.1.

Fig. 1. Structure of the application based on multi-tier patter [1]

Application implements the three-tiered architecture, very characteristic to all JEE systems. The most top one is “Presentation Tier”. The presentation tier displays information related to such services as i.e. browsing tests, creation tests, assigning test and pass tests. It communicates with other tiers by outputting results to the browser/client tier and all other tiers in the network.

R&I, 2012, №1

35

In the common 3-tier architecture, the business logic in theory occupies the middle tier, the business-services tier or business layer. In practice, the business logic is often interwoven in the other two tiers (the user services tier and the database services tier), such as by encoding business logic in stored procedures and in decisions about input validation and display formatting. In Evaluation Manager Service layer is responsible for communication with Hibernate and making all calculation i.e. if employee pass or failed test.

The bottom layer is “Persistence Layer”. The persistence layer is an architectural layer whose job is to provide an abstract interface to information storage mechanism(s). An API to such an interface should be abstract, and independent of storage technologies and vendors. It would typically have features such as the following:

- Store / retrieve of whole object networks by key;

- Logical database cursor abstraction for accessing some / all instances of a given type;

- Transaction support - open, commit, abort Session management [2].

iv. Data Model

The data of the whole enterprise system is stored in a relational database on H2 database. H2 Database offers outside the SQL language, whose syntax and features are very similar to the database, oracle, the ability to create stored procedures and triggers in Java. The asset base is built-in Web server that provides an administration console, which makes it easier to work with the database.

v. Service Tier

Creating complex programs is not easy now. The overwhelming presently prevailing triad faster, better, cheaper, much more complicated task. on the other hand, conventional systems will always be part of such an application, which is essential for the proper functioning of the application, but is not closely related to its business logic, in addition, it is repetitive and sometimes just boring to write. The skeleton of software development Spring is one of the main open source structures to improve and accelerate application development JEE. Spring was founded in 2003 on the basis of a license, "Apache 2.0 license." This template was created as an alternative to programming applications using EJB. Programming with Enterprise JavaBeans imposes many restrictions, while Spring provides the ability to create small and large applications with the proportionate amount of work. cooperation with the Spring allows to focus around business application logic and not delving into the side steps. The modular architecture allows applying the framework in any configuration. An application can use not only the simplification of database transactions, but also support the creation of presentation.

Additional part of Service Tier used in Evaluation Manager is Spring Security. Spring Security is one of the Spring Modules project providing comprehensive security services for J2EE applications. Spring Security was created with an emphasis on projects built on the skeleton of Spring. There are two main application areas in which Spring Security is dominated by "authentication" and "authentication" (or "access control"). Authentication is a process in which users are defined that can perform actions on the application. Authorization is the process of determining whether a user can perform actions within the application. To get to the point where the authorization decision is needed, the identity of user has already been fixed in the authentication process. These concepts are characterized most web applications and are not unique to Spring Security.

The process of authentication for Spring Security is as follows:

1. The user visits a page and clicks on the link, whose entry requires authentication.

2. Request is sent to the server and the server determines that the user requests access to the source, which requires authentication.

3. In the event when the user is offline, the server sends a reply that the user must log on.

4. Depending on the implementation, the browser or redirect to a page with authentication, or authentication of such charge cookie (web cookies.)

5. The browser sends a reply to a server in a HTTP POST containing the authentication data.

6. The server will decide whether the data are correct.

7. Request authentications will be invalidated and removed from memory.

In the Evaluation Manager Spring Security is mainly used to separate actions based on Roles. Role Admin has rights to create user with appropriate roles (role USER and SUPERVISOR. User of role SUPERVISOR has rights to create and assign tests. User of role USER supposed only to go through the assigned test.

VI. Client Tier

Evaluation Manager can be accessed only through web browser. This is most suitable and easy way. Currently market trends tend to avoid standalone clients. Evaluation Manger client tier is based on Richfaces framework. RichFaces is also open source project that adds functionality to existing Ajax applications using JSF without JavaScript leveraging the functionality of RichFaces JSF lifecycle management of objects, data validation and management of static and dynamic resource applications. Due to the fact that the components are integrated with the RichFaces Ajax is clear that the use of JSF acquires new dynamic properties (Fig. 2) [3].

36

R&I, 2012, №1

Fig. 2. Richfaces Architecture

Due to the fact that Evaluation Manager was implemented to satisfied to functional aspects Test Creation (Fig. 3, 4) and Passing Tests it is possible to divide Evaluation Manager into two functional modules. First one is responsible for creation of the test and assignment to particular user. Only user with role SUPERVISOR can create and assign test.

Create Test n

Insert Question Name* Java Threads

Insert Question • ^va Щ^с[£

1 ud

Create Test I

ГграЬр An=:wppr

Create Anwear

бЕевКес! 0

Add Answears Accept Answears I Remove Answears

Fig. 3. Creation of the test

Fig. 4. Test assignment

The second module is responsible for passing through created test. Only user with Role USER can get assignments to pass (Fig. 5).

Question about Java Threads Poteirtail Answear True.'Falee

Answer 1 0

Answer 2 □

Answer 3 □

will sxscuts ths msthcd doStuttf) in э 4-ste Pot entail Answear TruelFalse

A new ThreadO { pub ic void run() {doStuffO; }} □

B. new ThreadO {pub c void startO 1 doStuffO; 1} □

C. new ThreadO {pub c void startO 1 doStuffO; }}• runQ □

D. new ThreadO {pub c void runQ 1 doStuffO; 1} startO, □

E. new Thread(new RunnableQ 1 public void runQ { doStuffQ, ) }).run(), 0

Fig. 5. Pass test

At the end SUPERVISOR can see what the status of all assignments is.

VII. Summary

The creation of this application has two goals. First is the fact that idea of Evaluation Manager can be used in real life company to support evaluation of new higher. The second goal was to present the abilities of current IT technologies which are non commercial but has enterprise abilities.

References

[1] http://thelabdude.blogspot.com/2009/04/user-authentication-registration-with.html, November, 2010

[2] http://www.openehr.org/208-OE.html?branch=1&language=1, November, 2010

[3] Max Katz.: Practical RichFaces, Apress 2008, p. 31

[4] Bartosz Sakowicz, Piotr Mlocek, Przemyslaw Nowak, Andrzej Napieralski: "Package Delivery Company Web-Based Supporting System with Usage of Java EE Technology", 9th International Conference Modern Problems of Radio Engineering, Telecommunications and Computer Science, TCSET’2008, 19-23 February 2008, Lviv-Slavsko, Ukraine

Wojciech Zabierowski (Assistant Professor at Department of Microelectronic and Computer Science Technical University of Lodz) was bom in Lodz, Poland, on April 9, 1975. He received the M.Sc. and Ph.D. degrees from the Technical University of Lodz in 1999 and 2008, respectively. He is an author or co-author of more than 70 publications: journals and most of them - papers in lintemational conference proceedings. He was reviewer in six international conferences. He |supervised more than 90 Msc theses. He is focused on internet technologies and automatic generation of music. He is working in linguistic analysis of musical structure.

R&I, 2012, №1

37

i Надоели баннеры? Вы всегда можете отключить рекламу.