Academic Open Internet Journal

www.acadjournal.com

Volume 14, 2005

 

 

 

Establishing of a Web-based Information System

Using Java Instruments

Practical Course

 

Daniela Ananieva Orozova

 

Bourgas Free University – Bulgaria

orozova@bfu.bg

 

 

Abstract: A general approach for establishing a Web-based information systems using Java instruments is discussed. The training covers a development of a project, shown in the process of its development, following the classical technology of life cycle.

 

Proposed is a practical training course on Internet applications development, conducted in a practical training during a course on network programming at Bourgas Free University, and a general approach for establishing of a Web-based information system is described. This practical training course is integrated with a lecture course on “network programming”. The course includes and highlights basic elements of Java language. After their discussion the students are offered to work out project referring to various applied aspects. Each project represents a simplified model of a real task for establishing of a Web-based information system.

At the beginning of the practical course, for the sake of the successful realization of such a project, the students should have a basic knowledge in object oriented programming, be acquainted with the Java’s basic characteristics, have a general knowledge of Internet organization and beginners’ knowledge referring to HTML. At the end of the course the students should have a completed vision for the basic approach for establishing of network and Web-applications using Java instruments.

During the course the attention shall be drawn to basic concepts of Java such as: input-output flows, the instruments for establishing of multithreading applications, implementing client/server applications, communication of TCP sockets. It is good to demonstrate the instruments for sending of single packages between two applications using UDP protocol and demonstrate the access to the resources of URL, establishing  java.net package classes.

The lecture course discusses the basic concepts and fundamental terms connected with the Web-programming, languages for data description and the technologies for a dynamic generation of Web-contents. The project presents in detail the technology of Java servelets, the techniques for extraction of user stated parameters and instruments for user sessions management, as well using a server for Web-applications. The technology Java Server Pages (extension of the servelets, allowing a Java code to be built in a HTML document) and tags relevant to it are commented. Finally the complete concept for Web-applications of J2EE platform is be clarified.

The students have to demonstrate their acquired skills for working with threads in the practical course and use the technologies for working with applets, serveletes or Java Server Pages (JSP), implementing simple network applications, which are of real interest. They should complete the task and establish a proper visual interface implementing the Java instruments.

There are two basic technologies for establishing of information systems based on different approaches – life cycle [1] and prototype [2].

·         With prototype approach the implementation of the working concepts represents a series of prototypes approximations to the requirements of the project, so the last prototype assumes the status of a main sample.

·         Following the classical technology of the life cycle the implementation goes trough some basic phases: analysis, specification, designing, developing, testing, exploatation and maintenance.

Hereafter the separate phases of the process are commented as well as the project progress keeping to the requirements of the classical technology of the life cycle.

A Web-application represents a software system with a Web-based user interface, working on an Internet or a local network Web-server. Each Web-application includes two parts [5]:

-         Client – a combination of dynamically generated documents, visualized by the user’s Web-browser and represent the user interface of the application.

-         Server – All the servelets or JPS pages responding to the client’s request: processing user’s data and depending on it dynamically generating HTML or other format, to be visualized by the browser.

The tasks and the data information flow analysis is performed at the beginning, according to the classical technology of information systems development. The specification of the tasks using sample statistics and establishing of ER- diagram, defining the structures for data presentation, the input forms and documents follow then. During the design process the normalized relational scheme of the database with primary and foreign keys, data restrictions as well as definitions of the virtual tables. The data required for the application are stored in the database (DB) on a server. The data establishing, modification and access on the server is performed by Java-applications and Java Server Pages. Then the basic stages of this implementation follows.

 

  1. Task analysis

This stage of the project developing includes analysis of the application field, definition of the concepts in use and the relations between them, clarifying the aims of development, division into subtasks, determining the available resources and system requirements. Here are determined the methods for solving the problems and the structures for representation of all types of data and knowledge, as well as data restrictions.

1.1.      Decomposition of the task – as a result, there can arise multiple subtasks, substituting the original one and subtasks, controlled by the original task. The information flow diagram [3] is established.

1.2.      Definition of all object classes of and structures for data presentation, and as a result an ER-diagram is established.

1.3.      Imposing restrictions on data correctness and validity rules as well as default values.

 

  1. Database scheme design and realization

The creation of a detailed project of a normalized scheme of a relational database is based on the already established ER-diagram and user’s restrictions on the data. Next is the creation of Java-applications, implementing the DB scheme with Java code using built in SQL queries from the data description language.

2.1.      The connections between the relations – the connections of the type one to one ( 1:1), one to many ( 1: r) and many to many ( r: R) are analyzed. The connections of last type in the relational model of data are broken in connections of the type (1:r) as it is shown on fig.1.

 

 

 

 

 

 

 

 

 

 

Fig.1. Permitting of connections of r : r type

2.2.      Next is the definition of the relational DB scheme, referring to the project, as a set of relations and their attributes, primary and foreign keys.

2.3.      Database normalization process. The relations are analyzed and brought to third normal form. The following questions are put forward here:

·         referring to 1NF – are all attribute values atomic;

·         for 2NF – are all attributes except the primary key in full functional dependence from the key;

·         referring to 3NF – whether any of the attributes except the primary key functionally depends on each other.

2.4.      Realization of data restrictions through SQL instruments. The developed system should be restricted to small by volume, but fully functional DB. While creating and administrating the DB we use SQL- simple requests as well as package requests – stored procedures, procedures for keeping DB integrity – triggers and other instruments, provided by the RDBS. The amount of each record may be easily defined on the basis of the defined relations. It is recommended to make prognosis calculations referring to the amount of the overall DB for a period of 5 years.

2.5.      DB has to be located on a server. The data establishment, modification and access on the server has to be performed by Java-applications using the connection with DB via the instruments of Java Database Connectivity. Using JDBC API interface, access to SQL database is obtained following the steps [4]:

(1)   Loading of a driver, translating the Java statements in the specific server required format. For instance for the JDBC-ODBC Bridge driver:

Class.forName (“sunjdbc.odbc.JdbcOdbcDriver”.

(2)   Defining of URL address for connection:

String sybaseURL=“jdbc:Sybase;Tds:“+host+”:“+port+”: +dbName.

(3)   Establishing the connection with SUDB:

Connection con=DriverManager.getConnection(url,”log”, pass”)

(4)   Creating an object for sending of requests and commands to DB:

Statement statement = connection.createStatement()

(5)   Executing of SQL – by methods: executeQuery, (which return an object ResultSet), executeUpdate(on modifying of DB) or others;

 

3.      Administrator part of the system

This module of the overall project includes creation of Web-pages, providing DB access and maintenance of on the server. This module’s implementation requires working experience with HTML-documents, applets, Java Server pages, jdbc and programming of Java, using Java2 Platform software and Java Server – ApacheTomcat.

3.1.      Creating a Web-page providing appropriate forms for data introduction and modification in the DB, required for the system’s functioning and, when pushing “Send” key, data values are send as parameters for the Post request to the server.

3.2.      Creation of servelets or Java Server Pages, receiving the values of the parameters in Post request and enter them in the DB on the server. The validity of the received data is checked by the relevant scriplets (elements of JSP) and in case of not entered data parameter default values are provided.

 

  1. Clients’ part of the information system.

This module provides the user with query capabilities: the HTML – pages, JSP or servelets, which extract the required information and transfer it to the client.

4.1. Establishing the basic user HTML –page where the user gives name and password and, after checking the correctness of the entered data, access tî systems services is granted. The DB passwords should be kept in cripted form. User registration should be available while initially entering the system. It is recommended that a preserved procedure for profile checking (individual information) of this user be executed on entering the system. Once access is granted, criteria for the searched data is entered. Forms of different graph components might be used: combo box, radio-buttons, check box, labels, etc… After search criteria are entered and button “search” is pressed, the data is entered as parameters of GET or POST request to the server. The main page may contain additional information and links to various services.

4.2. In order to execute a request and obtain results, a JSP is created, which extracts the criteria referring to the desired information, passed as parameters to the request by request.getParameter (“name of a parameter”). The DB requests are executed by scriplets using the extracted data. The results are generated dynamically and made available for clients in HTML or other type document.

 

  1. Creating user packages and documentation

A user package of methods, used for the developing of various project modules might be created. Different static methods, not included in the standard library, but required for implementation of a project belonging to any field might be included in a package. This finalizing stage includes the publishing of a short manual and king documents on each module of the system.

 

  1. Additional capabilities

The development is a substantial part of the life cycle of a Web-based system. Different graphic-visualization statistic tools, operating on the available data, may be included as additional options; supplying the user with e-mail notification on new data; forum support capabilities in the scope of the subject range of the developed system, which will contribute to the increase of interest; including of chat-applications for conversations between clients and a number of other opportunities.

 

Conclusion

This practical course allows for highlighting the opportunities of Java language referring to the implementation of the Web-based system, showing the capacities for development and upgrading of the system as well as to development of an appropriate graphical user interface.

Some projects for information systems implementation which can be developed by students during the training course are for example: Web-based students’ information system for making records referring to the students state ( passed or not passed examinations, average mark, pending examinations, etc..); a real estate agency’s information system; Web-based trading system; airline companies information system or any other type of transport such as railway, bus, water transport; bibliographical information system; etc. Once established, an information system can easily be supplied with new features or upgraded for a better client servicing.

The resulting student’s implementations should visually be similar to the existing real applications.

 

References

         [1]      Guida G., Tasso C., 1989. Building Expert Systems: From Life Cycle to development methodology. Amsterdam, North Hollad, pp.3-24.

         [2]      Wielinga B., Akkermans H., Schreiber G., Balder J., 1990. A Knowledge Acquisition Perspective on Knowledge-Level Models. Proceedings of the Fourth Knowledge Acquisition for Knowledge-Based Systems Workshop - Banff, 36, pp 1-22.

         [3]      Leo Mark, 2002, Classical Database Development Methodology, Database Group Georgia Tech.

         [4]      Marty Hall, Servlets and JavaServer Pages, A Sun Microsystems Press/ Prentice Hall PTR Book, 2002: www.coreservlets.com/

         [5]      Documentation and training materials presented by the authors of Java programming language: http://java.sun.com/docs/index.html/

 

 

 

Technical College - Bourgas,

All rights reserved, © March, 2000