<<

TOWARDS N-TIER ARCHITECTURE FOR FIJI NATIONAL UNIVERSITY CAMPUS INFORMATION SYSTEMS

by

Bimal Aklesh Kumar

A thesis submitted in partial fulfillment of the requirements for the degree of Master of Science

Copyright © by Bimal Aklesh Kumar

School of Computing, Information and Mathematical Sciences Faculty of Science, Technology and Environment The University of the South Pacific

June, 2013 Acknowledgment

My sincere gratitude to Associate Professor Dr. Khalil Shihab for the supervision of this thesis. I am grateful to The University of the South Pacific for supporting the research undertaken in this thesis.

i

This thesis is dedicated to my family.

ii List of Acronyms

API - Application Interface CIS - Campus Information Systems CORBA - Common Object Request Broker Architecture FNU - Fiji National University FNU-CIS - Fiji National University Campus Information Systems HOD - Head of Department HTML - Hypertext Markup Language HTTP - Hyper Text Transfer Protocol ID - Identification Number IT - Information Technology JDBC - Database Connectivity JEE - Java Enterprise Edition J2EE - Java 2 Enterprise Edition JMS - Java Messaging Service JSP - Java Server Pages MIS - Management Information Systems OOA - Object Oriented Analysis OOD - Object Oriented Design OMG - Object Management Group ORB - Object Request Broker P2P - Peer to Peer PDA - Personal Digital Assistant POA - Portable Object Adapter RDBMS - Relational Database Management System RMI - Remote Method Invocation WML - Wireless Markup Language XML - Extensible Markup Language

iii List of Tables

Table 3-1 Login Use Case Description……………………………………………...…...…..26 Table 3-2 Enrollment Use Case Description……………………………………….....….….27 Table 3-3 Evaluation of Campus Information Systems……………………….……...…..….36 Table 5-1 Average Response Time ………………………………………….….…...…..…..62 Table 5-2 Average Throughput ……………………………………………………..….…....63 Table 5-3 Average Latency ………………………………………………………..…….…..65 Table 5-4 Comparative Testing…………………………………………………….……...... 67 Table 5-5 Web Server Farm Average Response Time………………….……………….…..69 Table 5-6 Web Server Farm Average Throughput….…………………..…………….……..70 Table 5-7 Application Server Response Time………………….…………………..………..72 Table 5-8 Application Server Throughput…………………………………………..………73

iv List of Figures

Figure 1-1 FNU-CIS N-Tier Architecture……………………………………………………..4 Figure 2-1 Accessing CORBA Object via SOAP ……………………………………………18 Figure 3-1 FNU-CIS Use Case Diagram……………………………………………..………25 Figure 3-2 Example Login Use Case………………………………………………...……….26 Figure 3-3 Example Enrollment Use Case……………………………………………………27 Figure 3-4 FNU-CIS OOA Class Diagram…………………………………………………...31 Figure 3-5 Login Sequence Diagram…………………………………………………………33 Figure 3-6 Enrollment Sequence Diagram……………………………………………………34 Figure 4-1 FNU-CIS Deployment Diagram…………………………………………………..39 Figure 4-2 FNU-CIS Software architecture…………………………………………………..40 Figure 4-3 FNU-CIS Wide Area Implementation…………………………………………… 41 Figure 4-4 FNU-CIS N-Tier Class Diagram……………………………………………….…42 Figure 4-5 Login Class Interaction Diagram…………………………………………………43 Figure 4-6 Enrollment Class Interaction Diagram……………………………………………45 Figure 4-7 Dynamic Login Sequence Diagram………………………………………………47 Figure 4-8 Dynamic Enrollment Sequence Diagram…………………………………………48 Figure 4-9 Login Web Page…………………………………………………………………..49 Figure 4-10 Login Web Page Code Extract……………………………………………………50 Figure 4-11 Java Web Server…………………………………………………………….…….51 Figure 4-12 FNU-CIS Web Server Farm………………………………………………………52 Figure 4-13 User Interface Class Code Extract………………………………………………..52 Figure 4-14 Login Function Code Extract………………………………………………..…. .53 Figure 4-15 Student Application Server Code Extract………………………………………...54 Figure 4-16 CORBA Application Server…………………………………………….……….. 55 Figure 4-17 FNU-CIS Application Server Cluster………………………………….……….....56 Figure 4-18 Remote Student Manager Code Extract………………………………….…….…57 Figure 5-1 Prototype 1………………………………………………………………….….....60 Figure 5-2 Prototype 2……………………………………………………………….……….60 Figure 5-3 Prototype 3…………………………………………………………….………….61

v Figure 5-4 Average Response Time Graph……………………………………….………….62 Figure 5-5 Average Throughput Graph…………………………………………….………...65 Figure 5-6 Average Latency Graph…………………………………………….……………..65 Figure 5-7 Web Server Farm ……………………..………………………………….……….68 Figure 5-8 Application Server Cluster …….……….………………………………………...71

vi Abstract

Software architecture is very important in the development of large scale software solution and plays a very active role in achieving business goals. The research described in this thesis is an attempt to utilize the N-Tier software architecture for developing a prototype campus information system for Fiji National University (FNU-CIS) to address the issue of performance and scalability. To assist in the design and implementation of FNU-CIS, an extensive evaluation of campus information systems was carried out to provide the bench mark on the current technology. N-Tier software architecture was designed with the implementation of FNU-CIS using JEE and CORBA. Experiments were carried out to assess the performance and scalability of the newly developed system. Several tests were carried out to measure the response time, throughput and latency of our system in distributed settings, and the results mainly favored FNU-CIS. This research makes a significant contribution to the field of software engineering in today’s world where high performance and scalability of IT applications are often equated with better business, the process and techniques used in building such systems is paramount. The ideas presented in this thesis can be easily utilized for the development of other large scale systems with similar issues to address.

vii Table of Contents

List of Acronyms………………………………………………………………………………….iii List of Tables……………………………………………………………………………………....iv List of Figures……………………………………………………………………………………...v Abstract……………………………………………………………………………………………vi Publications………………………………………………………………………………………...x Chapter 1………………………………………………………………….……………………….1 Introduction……………………………………………………………………………………….1 1.0 Motivation……………………………………………………………………………………...1 1.1 Context of the Study…………………………………………………………………………....2 1.2 Statement of the Problem……………………………………………………………………....2 1.3 Research Aim…………………………………………………………………………………..3 1.3.1 Using N-Tier Architecture…………………………………………………………….……..3 1.3.2 Using Java Enterprise Edition and CORBA……………………………….……………..…..4 1.4 Methodology………………………………………………………………………………..….5 1.5 Limitations and Scope of the Study………………………………………………………..…..5 1.6 Thesis Outline……………………………………………………………………………….…6 Chapter 2…………………………………………………………...…..……………………….…7 Research Background…………………………….………………………...………………….....7 2.1 CIS Overview………………………………………………………………………………..…8 2.2 Features and Functions of Campus Information Systems…………………………………….10 2.3 CIS Quality Attributes…………………………………………………………….……….….11 2.3.1 Accessibility…………………………………………………………………………….…..11 2.3.2 Security…………………………………………………………….………………….…….11 2.3.3 Performance…………………………………………………………………………………11 2.3.4 Scalability……………...……………………………………………………………………12 2.3.5 Flexibility…………………………………………………………………………….……..12 2.3.6 Maintenance…………………………………………………………………………….…..12 2.4 Extended CIS Quality Attributes………………………………………………………..….....13

viii 2.5 Existing Campus Information Systems………………………………………………….……13 2.5.1 Student Soft………………………………………………………………………….……...13 2.5.2 PPMS………………………………………………………………………………..………14 2.5.3 Premium System………………………………………………………………………….....14 2.6 Review of Tools and Technology……………………………………………………….……15 2.6.4 Java Platform, Enterprise Edition………………………………………………….……….19 2.7 Summary…………………………………………………………………………….………..21 Chapter 3………………………………………………………………………….…….………..22 FNU-CIS Overview……………………………………………………………………….……..22 3.1 FNU-CIS Description………………………………………………………………….……..22 3.1.1 Student Registration and Enrollment…………………………………………….…………22 3.1.2 Student and Employee Data……………………………………………………….………..23 3.1.3 Course Work and Exam Information……………………………………………….………23 3.1.4 Program Information……………………………………………………………….……….23 3.1.5 Financial Information……………………………………………………………….………24 3.1.6 Human Resource Information…………………………………………………….………...24 3.2 Functional Requirements………………………………………………………….……….….24 3.2.1 Use Case………………………………………………………………………….…….…...25 3.2.2 Use Case Descriptions………………………………………………………….…….……..26 3.3 Non Functional Requirements…………………………………………………….…….…….28 3.4 Object Oriented Analysis………………………………………………………….…….……30 3.4.1 Class Diagrams…………………………………………………………………….….…….30 3.5 System Functional Specification……………………………………………………….….….33 3.5.1 Sequence Diagrams…………………………………………………………………..……..33 3.5.2 Student Login………………………………………………………….……………………33 3.5.3 Student Enrollment…………………………………………………………..……………..34 3.6 Evaluation of FNU-CIS……………………………………………………………………….35 Chapter 4…………………………………………………………………………..……………..36 Prototype FNU-CIS Software Architecture………………………………….…….…………..38 4.1 FNU-CIS Software Architecture…………………………………………………..………….38 4.2 FNU-CIS Deployment Diagram……………………………………………….…..………….39

ix 4.3 Object Oriented Design……………………………………………………………...………..42 4.4 Login Class Interaction Diagram…………………………………………………..…………43 4.5 Enrollment Class Interaction Diagram………………………………………………..………45 4.6 Dynamic Object Oriented Design ……………………………………...……………………..47 4.6.1 Student Login……………………………………………………….………………………47 4.6.2 Enrollment…………………………………………………………….…………………….48 4.7 Implementation Details…………………………………………………….…………………49 4.8 Summary…………………………………………………………………..………………….58 Chapter 5……………………………………………...………………………..……….……….59 Software Testing…………………………..………….………………………..……….……….59 5.1 Performance Tests…………………………………………………………………………….59 5.1.1 Response Time……………………………………………………………………………...62 5.1.2 Throughput………………………………………………………………………………….63 5.1.3 Latency……………………………………………………………………………………...64 5.1.4 Result Analysis………………………………..……………………………………..……...63 5.2 Comparative Testing………………………………………………………………………….65 5.3 Scalability Tests…………………………………………………………………..….……….68 5.3.1 Web Server Farm……………………………………………………………………………68 5.3.2 Web Server Response Time………………………………………………………………...69 5.3.3 Web Server Response Throughput………………………………………………….……...70 5.3.4 Application Server Cluster………………………………………………………………….71 5.3.5 Application Server Response Time..………………………………………………….…….72 5.3.5 Application Server Throughput…...………………………………………………….….….73 5.1.4 Result Analysis………………………………..……………………………………..……...74 5.3 Summary…………………………………………………………………………..….………74 Chapter 6………………………………..…………………………….………………...….…….75 Conclusions and Future Work……………………………………………………………...…..75 6.1 Contributions……………………………………………………………………………..…...75 6.2 Conclusions……………………………………………………………………………..…….76 6.3 Further Study………………………………………………………………………….…..…..78 References…………………………………………………………………………………...……79

x Appendix A……………………………………………………………………………….…..…..85 FNU-CIS Source Code………………………………….…………………………………...……85 Appendix B…………………………………………………………………………………...….117 FNU-CIS Screen Dumps……………………………………………………………………...... 117

xi Publications

Part of the work from this thesis has been published in peer reviewed journals and conference proceedings.

1. Kumar, B, Shihab, K.: Improving Performance and Scalability of Fiji National University Campus Information System using N-Tier Architecture, International Journal of Distributed Systems Technologies, vol.4, no. 2, pp. 52-67, April-June 2013, Published by IGI global.

2. Kumar, B: Thin Client Web-Based Campus Information Systems for Fiji National University, International Journal of Software Engineering & Applications (IJSEA), Published by Academic Industry Research Collaboration Centre, vol.2, no.1, pp. 13-26, January 2011.

3. Dai, X., Kumar, B.: Comparing and Contrasting Campus Information Systems in South Pacific Regional Universities, IEEE – 2010 International Conference on Computational and Information Science (ICCIS 2010), 17 – 19 December 2010, Published by IEEE Computer Society, pp. 721-724.

xii Chapter 1

Introduction

In this thesis is described the use of N-Tier architecture to develop a prototype campus information system for Fiji National University (FNU). This research is motivated by real world industry problems hence the objectives of this research can be viewed from two perspectives. From the user point of view, the focus of this research is to investigate the applicability of using N-Tier architecture to improve performance and scalability of campus information systems at FNU. From the developer point of view, the author focuses on using Java Enterprise Edition (JEE) and CORBA to implement N-Tier architecture. In order to accomplish these objectives, a prototype N-Tier architecture implementation of FNU-CIS has been done using JEE and CORBA. The research problem, aim and methodology are discussed in more detail later in this chapter.

1.0 Motivation

Performance and scalability are two words very often synonymously however they mean different things. Performance refers to the capability of a system to provide a certain response time, throughput and latency. Scalability refers to the characteristic of a system to increase performance by adding resources (Haines, 2006).

Poor performance and scalability are the main quality related short comings that cause software projects to fail. In the last decade there has been a growing interest in the research and software industry communities toward techniques and methods that allow one to develop software by addressing these two major issues (Cortellessa et al., 2011).Growth of distributed systems has attained unstoppable momentum. Distributed systems can provide the necessary power to meet the growing demands of the user community. We are demanding capability faster than the advances in devices alone can supply, and to meet these demands we will have to rely on innovative software architectures such as N-Tier. This architecture provides a model for

1 developers by breaking up an application into tiers where developers can easily create flexible and scalable applications (Christian et al., 2010).

1.1 Context of the Study

The study was conducted at Fiji National University. It was established in 2010 with the merger of six government owned tertiary institutions namely, Fiji Institute of Technology, Fiji School of Medicine, Fiji School of Nursing, Fiji School of Agriculture, Fiji College of Advanced Education and Lautoka Teachers College. The merger established five colleges; College of Business Hospitality and Tourism, College of Humanities and Education, College of Engineering Science and Technology, College of Medicine Nursing and Health Sciences, and College of Agriculture Fisheries and Forestry.

It is a national institution, supporting the national effort for a stable economy and a literate population that is able to establish itself in the global community, while understanding and responding to the aspirations of individuals. FNU has a network of thirteen campuses throughout the country. The objective of the FNU is to promote research and academic excellence for the welfare and needs of the communities in Fiji as well as communities in the region and abroad who wish to receive tertiary education of high quality at affordable cost.

1.2 Statement of the Problem

Prior to the merger and formation of the Fiji National University and due to the autonomous operations of these colleges, three different campus information systems exist: Premium, Student Soft and PPMS, these systems are described in chapter 2. After the formation of the FNU, the usage of these systems has increased dramatically, with the increase in number of users there is need for a system with high performance and scalability. In addition to this, the system should be flexible, highly secured and fault tolerant. It is a challenging task to develop a system to meet these demands, current CIS’s cannot fully address these issues because of its monolithic architectural design.

2 1.3 Research Aim

In this thesis we investigate on how to develop a campus information system for Fiji National University maintaining high performance and scalability. A new system FNU-CIS is proposed to be developed using N-Tier architecture.

The main focus of FNU-CIS is to address the issue of performance and scalability. The system should be able to process user requests with acceptable response time, provide high throughput, low latency and easily enlarged to handle growing workload in a graceful manner. FNU-CIS should have relatively clean separation between presentation, business logic, and data access layers, with solid data architectures and a well defined set of business processes thus making it easier, faster and less expensive to change existing processes and activities as well as introduce new ones in future.

There are two major research issues that we address in this thesis. The first one is the investigation of using N-Tier architecture to address the issue of performance and scalability for FNU-CIS and secondly the investigation of using Java Enterprise Edition and CORBA to implement and test the ideas presented in this thesis.

1.3.1 Using N-Tier Architecture

N-Tier architecture provides a model for developers to create a scalable, flexible and reusable application (Tafti et al., 2008). The presentation, application processing, and the data management are logically separated into tiers. By mapping layers to tiers, we can easily create a cluster or a farm on the same tier to increase performance and scalability. We can deploy the user interface layer to one tier such as a farm of web servers, the business logic to another tier, then the data layer to yet another tier. Also breaking up an application into tiers, developers only have to modify or add a specific layer, rather than having to rewrite the entire application over.

The N-Tier represents a general distribution pattern where components of the application are separated across one or more servers. The key non functional requirements determine the deployment strategy for any application (Guthrie, 2009).

3 Applications can be deployed as 2-Tier, 3-Tier or N-Tier. 2-Tier is suitable where client directly needs to interact with database server. 3-Tier is suitable for deploying internet based applications where business logic placed is together on the web server.4-Tier pattern is suitable when you have application code that makes heavy use of resources of the server and you need to offload business logic to application server. FNU-CIS deployments pattern provides design solutions to issues of performance and scalability. In general we have the following tiers, client tier, web tier, application tier and data tier. To improve performance the general strategy is to utilize load balancing clusters, therefore we added two load balancing clusters, one for web tier and another for application tier. Further we carry out tests in Chapter 5 against the prototyped 2-Tier and 3- Tier applications, the results favored our proposed N-Tier architecture. Figure 1-1 shows proposed FNU-CIS architecture.

Tier 1 Tier 2 Tier 3 Tier 4

SQL HTML JSP CORBA Query Java Beans Java Beans

Client Web Server Application Server Database Server Database

Figure 1-1 FNU-CIS N-Tier Architecture

1.3.2 Using Java Enterprise Edition and CORBA

The Java Enterprise Edition provides functionality to deploy fault-tolerant, distributed, multi-tier Java software, based largely on modular components running on an application server. Common Object Request Broker Architecture (CORBA) is useful because it enables separate pieces of software written in different languages and running on different computers to work together as a single application or set of services (Baker, 2010). More specifically, the CORBA is a standard

4 defined by the Object Management Group (OMG) that enables software components written in multiple computer languages and running on multiple computers to work together.

1.4 Methodology

This section presents the following three methods through which the research proceeded.

1. Extensive evaluation of the campus information systems was carried out, to give the bench mark as to where the current technology lies, and setting the criteria for development of FNU-CIS

2. Designing and implementing N-Tier architecture for FNU-CIS using JEE and CORBA. This architecture includes client tier, web tier, application tier and database tier.

3. Extensive performance and scalability testing was carried out. Performance testing was used to see if FNU-CIS meets performance criteria. Scalability testing was used to measure the effect of varying workload and resources to our system.

1.5 Limitations and Scope of the Study

Campus information systems has a broad concept, the major focus of this study is on performance and scalability. In short, the research aims to offer solutions to the problems existing in the use of existing campus information systems at Fiji National University.

The interface of the system is designed to provide services that are considered mandatory to the users. Other functional features which are classified as optional will not yet be part of the system developed for the purpose of this research.

5 1.6 Thesis Outline

This thesis focuses on the details of FNU-CIS and its implementation using N-Tier architecture. It has been structured into six chapters and has been organized as follows:

Chapter 1 - addresses the setting of the study, highlights the problem and aim of this research. The proposed methodology is described and the limitations of the project are also listed.

Chapter 2 - is concerned with reviewing the literature and developing the research framework. It describes existing systems available and sets the criteria for the development of FNU-CIS.

Chapter 3 - describes the system specification and requirements. The essential user requirements are captured in this chapter it concludes with comparison of our proposed system with existing systems.

Chapter 4 - provides an overview of the prototyped FNU-CIS architecture and the implementation details using JEE and CORBA.

Chapter 5 –this chapter evaluates the performance and scalability of FNU-CIS in the distributed setting and presents the analyzed results.

Chapter 6 - presents the general conclusions of this thesis, describes the contributions of this research and outlines future directions for research in the development of FNU-CIS.

6 Chapter 2

Research Background

Information system is an integrated set of components for collecting, storing, processing, and communicating information (Oja et al., 2006). In a very broad sense, the term information system is frequently used to refer to the interaction between people, algorithmic processes, data and technology. In this sense, the term is used to refer not only to the information and communication technology (IT) an organization uses, but also to the way in which people interact with this technology in support of business processes.

Information systems differ in their business needs. Three major types of information systems are: transaction processing system, management information system, and decision support system. Transaction Processing System is a type of information system that collect, store, modify, and retrieve the transactions of an organization (Mahar, 2003). A transaction is an event that generates or modifies data that is eventually stored in an information system. Management Information Systems assist lower management in problem solving and making decisions. They use the results of transaction processing and some other information to handle queries as quickly as they arrive. Decision Support Systems assist higher management to make long term decisions. These type of systems handle unstructured or semi structured decisions. A decision is considered unstructured if there are no clear procedures for making the decision and if not all the factors to be considered in the decision can be readily identified in advance (Oja et al., 2011).

The rapid growth of internet, intranets, extranets and other interconnected global networks in the 1990’s dramatically changed the capabilities of information systems in organizations. Internet based and web-enabled systems are becoming common place in the operations of today’s organizations (Chow, 2009). Today’s information systems are still doing the same thing they began doing 50 years ago, however what has changed is that we enjoy much higher level of integration of systems functions across applications and greater connectivity across both similar and dissimilar systems components. The internet and other related technologies have changed the way businesses operate and people work, and how information systems support businesses

7 processes, decision making and competitive advantage (Mahar, 2003). Today many organizations are using internet technologies to web enable business processes and to create innovative business applications. This chapter reviews the field and characteristics of campus information system and discusses in detail the existing systems and its shortcomings.

2.1 CIS Overview

Campus Information System is a transaction processing system that serves at the operational level of the colleges and universities. It performs and records the routine transactions necessary to conduct its business. CIS also matches the structure, management tasks, instructional processes and special needs of the institution, like the traditional MIS, CIS integrates data from multiple sources to provide information people need to make important management decisions (Peng, 2003).

Traditionally CIS were mainly mainframe applications, since the late 1990’s it has been changing and fast adopted through the presence of a web medium as channel for accessing CIS without any hassle upon viewing relevant information (Ethridge, 2000). Higher education institutions have made and continue to make substantial investments in these systems which have helped them run increasingly complex business processes handle growth in key areas and offer services to end users (Dodds, 2007). These systems are required to support the broadest possible range of users and activities across a wide range of institutions and make it as simple as possible to support new activities and initiatives.

Institutions are under constant pressure to demonstrate both willingness and capacity to incorporate the latest developments in CIS (Frasier, 2000). With younger generation having grown up with technology, students now expect to get information and do business with colleges and universities on the web (Miller, 2002). Ease and convenience for the customer is essential for any university, and we believe the student services on the web play a major part in this.

The institutions often have choice to carry in-house development or buy an off the shelf packaged software. Many colleges and universities have their own IT department that develops and manages the system. There are also many packaged software available such as People soft

8 campus management systems provided by Oracle Corporation and campus management system provided by SAP.

Buying off the shelf package challenges the notion that we are unique and have requirements that other similar organizations do not have. There are also several benefits of using this approach. Software vendors attempt to incorporate the best practices from all of their customers into their products. New customers are able to take advantage of the experiences of others and the period of time between decisions to purchase through to the implementation would be shorter if the organization chose to develop the system in house (Dodds, 2007). The major limitation is software upgrade costs would be substantial, in addition to providing bug fixes new functionality upgrades are often required.

Custom developed software with proper analysis, design and implementation, the final product should meet the requirements defined by the user. User acceptance should be higher because of the input end users have in the design (Gemmell, 2003).Custom development often allows the organization to avoid ‘big bang’ implementation of a system through phased implementation. The limitation of this approach could be that the design and the development phases result in longer and larger projects.

The key architecture choice is between client server system and web-based system. The client- server products require a server for each site and use special software that must be installed and maintained on each computer running the CIS. In contrast web-based systems usually have centralized server that allows users to access data via a secured internet connection without special software installations. The World Wide Web has emerged as powerful and appealing technology to utilize in the migration of main frame systems. Ease of development, cost, platform independence, and accessibility are some of the reasons that make using the web appealing (Miller, 2002). Continuing exponential growth in the availability of computing processor cycles, memory, storage and network bandwidth together with the rapid growth of World Wide Web have made it possible to develop modular and flexible systems (Dodds, 2007).

9 2.2 Features and Functions of Campus Information Systems

In general, and in practice, the requirements of any campus information systems can be classified as below:

Student Registration and Enrollment – this allows students to register, withdraw and change course of study within the university. Sometimes this has added functionality to receive applications from the prospective students and route it to the responsible authorities.

Student and Employee Data – this handles staff/student centric data and processes. The student data can include student personal information, program information and any other relevant details of students. The staff data can include staff personal details, qualifications, research and publications, and the courses they teach.

Course Work and Exam Information – this enables academic staff to enter assessment and final exam marks. Students can also obtain their course work and final grades. This feature can also evaluate the student’s progress against the requirement given for a degree.

Program Information – this contains information about the individual courses, and programs offered by the university. This feature enables to assess the credit points required to complete a degree and the number of units required in the degree.

Financial Information – this feature includes student’s financial data which includes fees payments. This includes the detailed description of fees such as enrollment fees, tuition fees etc. The students can check their account status any time and make payment.

Human resource information – this function consists of tracking existing employee data which traditionally includes personal histories, skills, capabilities, accomplishments and salary. To reduce the manual workload of these administrative activities universities began to electronically automate many of these processes by introducing specialized Human Resource Management Systems.

10 Accommodation – this feature includes processes such as room allocation, room change and room evacuation facilities. Reports in regard to the room availability, room allocation, student transfer and evacuation are very important for the management of hostel facilities.

2.3 CIS Quality Attributes

This describes the internal structure of campus information system. The technological factor consists of the key non-functional requirements whose fulfillment is the main issue for this research.

2.3.1 Accessibility

Accessibility refers to how easily one can access the system. Accessibility of computer software applications has seen drastic improvements over the past two decades. Now software applications deployed over web can easily be accessed anytime from anywhere using the internet.

2.3.2 Security

Security is protection of data from unauthorized use. Security procedures consist of: Authentication - verifying and identifying of users via user identity and passwords. Input validation - consists of performing syntactic and sometimes semantic checks on data derived from external sources, depending on the criticality of the application and other factors, many other forms of security can be implemented such as firewalls and spy ware.

2.3.3 Performance

Performance determines how fast some aspect of a system performs under a particular workload (Mulugeta, 2008). It can also serve to validate and verify other quality attributes of the system, such as scalability and reliability. It may be relevant to set server response time goals between all nodes of the application landscape.

11 2.3.4 Scalability

Scalability is a desirable property of a system, a network, or a process, which indicates its ability to either handle growing amounts of work in a graceful manner or to be readily enlarged (Andre, 2000). Load scalability refers to the ability for a distributed system to easily expand and contract its resource pool to accommodate heavier or lighter loads. Alternatively, the ease with which a system or component can be modified, added, and removed to accommodate changing load. Geographic scalability refers to the ability to maintain performance, usefulness, or usability regardless of expansion from concentration in a local area to a more distributed geographic pattern.

2.3.5 Flexibility

Flexibility is the ease with which a system or component can be modified for use in applications or environments other than those for which it was specifically designed (Barbacci, 1995). The system that can be adapted quickly to the enterprises changing needs, without spending vast amounts of resources. Modular design can help to solve this dilemma by enabling software developers to create information systems that are built as components that can easily be modified. This reduces time and costs needed for adaptations and increases their quality by avoiding potential misunderstandings between business users and IT experts.

2.3.6 Maintenance

Maintenance is the modification of a software product after delivery to correct faults, to improve performance or other attributes of the application (Grubb, 2003). There are three categories of maintenance; corrective, adaptive, and perfective. Corrective maintenance is modification of a software product performed after delivery to correct discovered problems. Adaptive maintenance is modification of a software product performed after delivery to keep a software product usable in a changed or changing environment. Perfective maintenance is modification of a software product after delivery to improve performance or maintainability.

12 2.4 CIS Extended Quality Attributes

There are few other important properties associated with development of campus information systems.

2.4.1 Reliability

Reliability is the ability of a system or component to perform its required functions under stated conditions for a specified period of time (Pan, 1999). It is often reported as a probability. Software Reliability is the probability of failure operation for a specified period of time in a specified environment. Software reliability is also an important factor affecting system reliability. The high complexity of software is the major contributing factor of software reliability problems.

2.4.2 Interoperability

This property referring to the ability of diverse systems and organizations to work together (inter-operate). The term is often used in a technical systems engineering sense, or alternatively in a broad sense, taking into account social, political, and organizational factors that impact system to system performance.

2.5 Existing Campus Information Systems

In this section existing systems used at Fiji National University is described with its weaknesses and strengths.

2.5.1 Student Soft

Student Soft is a client server based system which requires special installation for use by end users, thick clients communicate directly with database server. The system is only accessible for the administration staff of the institute. The system provides limited services such as enrollment, finance and student academic data management. The system requires lot of paper based processing to support the key business activities. The system is very slow when large numbers of users are connected to it. The system requires expensive and complex upgrades as condition of

13 continued support. The increasing complexity of this system has made it difficult to enhance the system to support new processes or activities and to upgrade them by using current new technologies.

2.5.2 PPMS

PPMS is a vender supplied system. It is a client server based system which requires special installation for use by end users, clients communicate directly with database server. The system is only accessible for the administration and academic staff of the institute. The system provides services such as enrollment, finance, student academic data management and various reports can also be generated from the system. This system has monolithic design it is quite slow when required to handle large number of users. It is very difficult to modify or upgrade the system because its design, thus making any changes to the systems very expensive.

2.5.3 Premium System

Premium system is a 3-Tier system which includes client tier, web tier and data tier. Client tier handles user interaction while web tier handles business logic and data tier handles back end data. The system provides service such as enrollment, finance, maintains student academic data and provides statistical reports. Premium system reflects the paper-based, departments-centric processes with the redundant collection of information which is resulted duplication of records for many years. Processes which are required by departments, faculties, or system domains are often not well supported. It involves large paper work to support key business activity such as enrollment, course adjustments, handling records of examinations, assessments mark, grades, and academic progression. The performance of the system declines when numbers of users connect to the system. The system requires heavy maintenance and upgrade as part of continuous support. The system has poor architectural design thus upgrading the system is very tedious task.

14 2.6 Review of Tools and Technology

Software architecture of a computing system is the structure or structures of the system, which comprises software elements, the externally visible properties of those elements and the relationships among them (Bass et al., 2003). Like any other complex structure, software must be built on solid foundation. Failing to consider key scenarios, failing to design for common problems, or failing to appreciate the long-term consequences of key decisions can put your application at risk. Modern tools and platform helps you to simplify the task of building applications but they do not replace the need to design your application carefully, based on your specific scenario and requirements. The risks exposed by poor architecture include software that is unstable, is unable to support existing and future business requirements or is difficult to deploy and manage in the production environment (Chaudhary, 2009).

Tier can be defined as one of the two or more rows, levels or ranks arranged one above another, hence the definition for N-Tier being any number of levels arranged above another, each serving distinct and separate tasks (Ruzinoor, 2011). From the beginning of computer science, the industry has been practicing a simple form of client/server computing, since the inception of the mainframe with a configuration that had directly connected to the host an unintelligent terminal constituting the one-tier or monolithic system (Christian, 2010). The simplest client/server model involves only two layers interacting with each other called the 2-Tier architecture, varying from low scalability architectures with fat clients, handling transformations on data retrieved from a simple file or database server, to solutions with fat servers offering lightweight client modules in exchange for increased complexity on server-side

The successors of 2-Tier architectures, the 3-Tier architectures imply the insertion of an additional layer called the middle tier, morphing the other two entities from the 2-Tier architecture into the front end and backend. Front end mostly contains logic responsible for presentation, delivered as client side code, whereas the backend deals with access to dedicated services such as a database server to the middle tier. The philosophy is that direct access for the front end to the back-end without the middle tier acting as an intermediate is not permitted. Following the pattern, 3-Tier architectures can be extended with additional layers ending up obtaining the generalized structure of the N-Tier architecture.

15 Architectural style sometimes called an architectural pattern provides an abstract framework for a family of systems. It improves partitioning and promotes design reuse by providing solutions to frequently recurring problem (Guthrie, 2009). It is also set of patterns and principles that shape an application. The architecture of a software system is almost never limited to a single architectural style but is often combination of architectural styles that make up the complete system (Ahemad et al., 2010).

Client/Server is a conventional representation for systems constituted of physically separated parts where entities called clients initiate contact with one or more servers in order to acquire access to a specific functionality (Anouncia, 2009). As can easily be noticed, the increase of simultaneous client requests to a given server can determine server overloads. N being a finite number, every server has a certain limit of possible to be served client requests at any given moment in time, besides network latency and other factors involved by communication between tiers. Inherently care must be taken when adding new tiers to the system since they affect the overall performance. Even there are situations when drawbacks are acceptable thanks to the gains in flexibility and scalability of the resulting software application. The most common type of multi tier application is the 3-Tier application. As its name suggests, the structure contains three layers: presentation, logic and data. In this case the client/server model is extended with an additional layer (Ahemad et al., 2010).

Physically separated layers of the N-Tier architecture, for example the Presentation and Logic tiers, need a way to jump over the gap separating them. Technologies applied in order to achieve this vary from architectures employing web servers using the HTTP protocol to render HTML to the presentation layer, clients directly connected to middle tier or distributed logic marshaling data and method invocations between layers of the N-Tier design (Cristian, 2010). While web based applications render the HTML generated by the web server on each HTTP request, containing the latest up to date version of presentation code, client desktop applications are far less flexible needing a version update on every major development change.

FNU-CIS is a performance critical application thus it is important that we consider performance and scalability as the key requirements while selecting appropriate software architecture for FNU-CIS. In order to implement FNU-CIS, CORBA and web service based architecture were

16 considered. CORBA is essentially an object bus, enabling a client to invoke methods on remote objects contained in a server, independently of the programming language the objects have been written in and of their location. Web Services are a distributed middleware technology that uses simple XML based protocol to allow applications to exchange data across the Web. Services are described in terms of the messages accepted and generated. In comparison to CORBA based architecture web services have many shortfalls in regards to performance. Since web services use HTTP communication lot of time is wasted in creating and maintaining connections for the clients (Elfwig et al, 2002). The use of XML places a heavy burden on the system. Despite the relative simplicity of XML, there are huge memory and CPU requirements compared to other architectures. Generating and parsing XML documents is a time consuming task that also needs a lot of memory compared to the actual data that is in those documents. CORBA uses optimized connection oriented communication protocols that are language specific (Davis et al, 2002). With mechanism and cost of development being similar web service is desirable for interoperatibilty while CORBA has advantage with performance. Furthermore, the familiarity of the clients, the technical staff, and us with distributed system architecture based on CORBA standard technology enable us to produce a cost-effective, scalable, reliable, interoperable, and reusable system without compromising on its performance. The current used system at FNU is based on component-oriented architecture. Therefore, this allowed us to reuse some of the existing components in the implementation of our system. As our system requires a powerful GUI, Service-Oriented Architecture (SOA) would not be suitable for applications with GUI functionalities. Those applications would become more complex if they use SOA architecture which requires heavy data exchange. Also application requiring asynchronous communication can’t make use of SOA. Also in case of standalone and short lived applications’ implementations, SOA will become an added burden. However, if we water down these requirements at a future stage, then it is possible to enable web access to services built using CORBA (or vice versa). In fact the migration from our Distributed System to Cloud System or SOA based on web services can be easily done because there are a lot of similarities between both architectures The ideal scenario would be to install gateways that perform automatic conversion between SOAP and CORBA IIOP messages.

17 To illustrate the interoperability solutions between SOAP and CORBA, we present some details of SOAP-CORBA gateways based on the description of XORBA, SCOAP, and SOAP-CORBA bridge. In the following, we will assume that the role of the gateway is to (a) accept SOAP requests; (b) forward them to established or new CORBA based servers, and (c) return the result as a SOAP response. The processing of an incoming SOAP request involves the following steps:

1. The SOAP request is parsed,

2. The gateway looks up the IDL description of the CORBA service,

3. The gateway looks up the WSDL description of the SOAP request,

4. Dynamic CORBA request is built and sent to the server (using DII),

5. SOAP response is built out of the CORBA response (using some type information from the repository).

Figure 2-1: shows the architecture involved in creating such a gateway, where CORBA services needed to be exposed to web clients.

Figure 2-1: Accessing CORBA objects via SOAP

An intrinsic part of the protocol conversion is mapping the structure and content of the data between the two message protocols. Since SOAP messages are (at some level) simply XML

18 documents, this implies a need to map from XML Schemas and/or DTDs to corresponding IDL constructs.

The industry technology that is used to implement our distributed application is JEE. Java Enterprise Edition is a widely used platform for server programming using Java programming language.

2.6.4 Java Platform Enterprise Edition

The Java platform (Enterprise Edition) provides functionality to deploy fault-tolerant, distributed, multi-tier Java software, based largely on modular components running on an application server. The platform was known as Java 2 Platform, Enterprise Edition or J2EE until the name was changed to Java EE in version 5. Java EE is defined by its specification. As with other Java community process specifications, providers must meet certain conformance requirements in order to declare their products as Java EE compliant. Java EE includes several API specifications, such as JDBC, RMI, e-mail, JMS, web services, XML, etc., and defines how to coordinate them. Java EE also features some specifications unique to Java EE for components. These include Enterprise JavaBeans, Connectors, servlets, portlets (following the Java Portlet specification), Java Server Pages and several web service technologies. This allows developers to create enterprise applications that are portable and scalable, and that integrate with legacy technologies. A Java EE application server can handle transactions, security, scalability, concurrency and management of the components that are deployed to it, in order to enable developers to concentrate more on the business logic of the components rather than on infrastructure and integration tasks (Oracle, 2010).

Java Enterprise Edition was used for the development of FNU-CIS because it is available as free ware, simplifies application development in a thin client tiered environment and decreases the need for programming and training by creating standardized, reusable modular components and by enabling the tier to handle many aspects of programming automatically (Ranjan, 2010). Similarly availability of open source application servers like CORBA along with database servers like MySQL allows both development and deployment to be extremely cost effective as compared to other proprietary application development platforms. CORBA is extremely feature rich supporting numerous programming languages, operating systems and a

19 diverse range of capabilities, such as transactions, messaging and security. Many proprietary middleware technologies are designed with assumptions that developers will build applications using particular middle ware technology so they provide only limited support for integration with other technologies, in contrast CORBA was designed with the goal of making it easy to integrate with other technologies. The flexible server side infrastructure of CORBA makes it feasible to develop servers that can scale from handling up to a number of objects to handling unlimited number of objects (Baker, 2010).

The following technology is used for the development of our system.

Hypertext Markup Language (HTML) - is the predominant markup language for web pages. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes, and other items. It allows images and objects to be embedded and can be used to create interactive forms. It is written in the form of HTML elements consisting of "tags" surrounded by angle brackets within the web page content.

Java Server Pages (JSP) - JSP technology enables web developers and designers to rapidly develop and easily maintain, information-rich, dynamic web pages that leverage existing business systems. As part of the Java technology family, JSP technology enables rapid development of web-based applications that are platform independent. JSP technology separates the user interface from content generation, enabling designers to change the overall page layout without altering the underlying dynamic content.

CORBA - is useful because it enables separate pieces of software written in different languages and running on different computers to work together as a single application or set of services. More specifically, CORBA is a mechanism in software for normalizing the method call semantics between application objects that reside either in the same address space (application) or remote address space (same host, or remote host on a network) (Baker, 2010).

MySQL - is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. Open source projects that require a full-featured database management system often use MySQL. MySQL is also used in many high profile, large scale World Wide Web products, including Wikipedia, Google and Facebook.

20 2.7 Summary

In this chapter, background information on campus information systems has been provided. This chapter sets the criteria for the development of FNU-CIS. The existing systems were described in detail with its strengths and weaknesses. We also reviewed the tools and technology used for the development of FNU-CIS. In the next chapter we will capture the requirements of new campus information systems using object oriented methodology.

21 Chapter 3

FNU-CIS Overview

This chapter describes new campus information system for Fiji National University. The main aim of FNU-CIS is to address the issue of performance and scalability. This chapter describes the specification of FNU-CIS by capturing the essential user requirements with Object Oriented Analysis (OOA) and finally concludes with evaluating our approach based on the criteria set in previous chapter.

Requirements fall into two categories functional and non functional. A functional requirement is one that specifies an action that the information systems must be able to perform. Non functional requirement specifies the properties of the information systems itself such as platform constraints, response time, reliability etc (Grundy, 2000).

3.1 FNU-CIS Description

The main functions of FNU-CIS are grouped as student registration and enrollment, student and employee data, course work and exam information, financial information and human resource information. In the sub sections given below we describe each of the functionality in detail.

3.1.1 Student Registration and Enrollment

The current student and prospective students can apply to study at FNU using an online application form. Students are required to provide their personal details, proposed program of study, citizenship, funding details, qualifications and work experience, and attach the electronic copies of their results. The completed forms are then forwarded to respective department HOD’s for their decision to approve or reject the application. If the application is approved students are notified with an offer letter which contains user name and password to use FUN-CIS, else the students are sent a letter stating their application has been declined stating the reasons. The enrollment option allows the student to register for courses. This option also allows students to enroll for current and preceding terms of study. The students are required to select the term of

22 study and the campus in which they want to study. All the units that are available in the particular campus for the selected term of study will be displayed. The system will list only those units that are required for students program and those units that the student has not yet completed. Once the student confirms the enrollment, the system checks if the students have passed the prerequisite the enrollments are approved, if not they are sent to the HOD’s for special approval. The students are given specified period of time in which they can change or withdraw from the units they are enrolled. Student can also apply online to change their majors or programs of study.

3.1.2 Student and Employee Data

This function manages all student and employee data. It also provides them with choice to view and update their profile. The transcripts option lists all the units the student has completed so far. It displays the unit code, unit name, grade, campus, term of study and year. Students are allowed to update their postal address, residential address, home phone number and mobile number. Staff profile option allows the staff members to view and update their profile. The student details option allows the staff to enter student ID and access the student profile and academic history of the student.

3.1.3 Course Work and Exam Information

This function manages all course work and exam data. The feature provides option for academic staff to submit the coursework for the units they are teaching. To minimize large data entry, staff can submit coursework using standard excel file. The course work option displays the student’s course work for the current semester. This feature enables students to access their course work and exam marks.

3.1.4 Program Information

The program details option lists the units that students are required to complete for their program of study. The units are classified into three categories core units, major units and service units, the list also units to be completed. The graduation menu allows the students to fill the form for

23 graduation. They will only be allowed to do this if they have completed all units required for their current program.

3.1.5 Financial Information

The finance option allows the students to view their invoices and make fees payments online or by paying in the bank using the invoice. FNU-CIS will interface with existing financial system used by FNU.

3.1.6 Human Resource Information

This option maintains staff information such as leaves, pay details etc. FNU-CIS will interface with existing human resource management system used by FNU.

3.2 Functional Requirements

These are activities that the system must perform, that are the business use the system will be put to. These are the functions of the new system. The process of identifying and describing all of the business uses require substantial time and effort.

Five separate but interrelated diagrams are used to define the application requirements from the object oriented purpose. The five diagrams are: (1) use case diagram; (2) collaboration diagram; (3) sequence diagram; (4) class diagram; (5) state chart diagram. In most cases analysts use all five diagrams to get a complete definition however in some situations three or four diagram may be required to specify the requirements accurately. For the purpose of this research we will use: use case diagram, class diagram and sequence diagrams.

24 3.2.1 Use Case

The Object Oriented Approach uses the term use case to describe an activity the system carries out in response to an event (Grundy, 2000). The use case depicts the information system and the environment in which the information system operates. The use case diagram is a graphical model that summarizes the information about the actors and the use cases.

Figure 3-1 illustrates the system’s main use case view. The system has two actors student and staff who interact with number of use cases as shown below.

Figure 3-1 FNU-CIS Use Case Diagram

25 3.2.2 Use Case Descriptions

We provide brief descriptions of two use cases login and enrollment in the subsection. The tables describe the event flow of use cases and show the corresponding interfaces.

Table 3- 1 Login Use Case Description

Use Case Name: Login Description: Used by the all the users to log into the systems

1. Users on the login page provide the user name and

Password and click OK button.

2. The system verifies the user name and password.

3. If the password is correct users are directed to their Event Flows: appropriate menu pages, else go to 1. Related Actors/Use Cases: Used by Students, Academic Staff and HOD actors Special Conditions: None

Figure 3- 2 Example Login Use Case

26 Table 3- 2 Enrollment Use Case Description

Use Case Name: Enrollment Description: Used by students to register for courses

1. Student click at Enrollment menu and the enrollment

form is displayed.

2. Students select the campus and the term of study and click Process button.

Event Flows: 3. List of units available in that campus for the particular term of the study is displayed. 4. Students select the units and click enroll button. 5. Students click confirm button and the enrollment request is sent to the HOD’s for approval. Related Actors/Use Cases: Used by Student actors Special Conditions: Logged into the system

Figure 3- 3 Example Enrollment Use Case

27 3.3 Non Functional Requirements

Non functional requirement is a requirement that specifies criteria that can be used to judge the operation of a system, rather than specific behaviors (Rosa et al., 2009). This should be contrasted with functional requirements that define specific behavior or functions. The main aim of this research is to address performance and scalability which forms the two major non functional requirements, other requirements for the development of FNU-CIS includes: support for heterogeneous clients, security, easier development and maintenance, and fault tolerance. This section describes each of the non functional requirements and the plan for implementing this.

3.3.1 Heterogeneous clients

N-Tier applications are deployed as thin client application thus can easily support diverse set of end points. It increases openness for use on multiple user devices with little memory and processing power. FNU-CIS can easily support devices such as PDA’s and Mobiles.

3.3.2 Performance

FNU-CIS has high performance since little data processing is done on the client, the client’s primary responsibility is merely to collect input from the user and post it back to the server because data processing tasks are delegated to the supporting server. The increasing demand for resources is met by coordinating the use of available memory and CPU resources through load balancing and application server clustering.

3.3.3 Scalability

As pointed out earlier FNU-CIS is designed to be scalable from the start. Its separation of functionalities is the key to achieve scalability. By separating the functionalities and developing independent components, it enables independent growth of each component without affecting others in the system. We can easily increase number of servers in the architecture to share workload and maintain performance.

28 3.3.4 Security

FNU-CIS has an extensive security infrastructure, it provides all the standard security requirements. Each user is assigned cryptographically strong passwords and is authenticated before using the system. Moreover backend software security is partly accomplished through the use of firewalls at each layer, keeping databases and critical information on servers not easily reachable from the Internet.

3.3.5 Easier Development and Maintenance

FNU-CIS is highly flexible, we can easily change the contents of any one of the tiers without having to make corresponding changes in any of the others consequently enabling parallel development of the different tiers of the application. FNU-CIS has lower maintenance as software application updates and can be executed on the server. Deployment costs are also reduced as thin clients can be remotely configured and do not need to be set up on individual machines. Break-fix simply requires replacing the thin client (Kumar, 2011). Its clear separation of functionality makes it very simple to debug the system.

3.3.6 Fault Tolerance

FNU-CIS has fault tolerant design that enables the system to continue operation possibly at reduce level rather than failing completely when some parts of the system may fail. There may be reduction in throughput or increase in response time. FNU-CIS has modular architecture that is, if some components fail others may still provide services. FNU-CIS has web server farm and application server cluster, if one of the servers fail others may continue providing required service.

29 3.4 Object Oriented Analysis

While building distributed object based systems we need to find some objects/classes with which we build the system. The key object oriented analysis is to determine the basic set of objects a system needs, the main data and functions the system supports at a conceptual level, by this we mean to ignore the details to do with user interface, middleware, data management etc (Grundy,2000)

3.4.1 Class Diagrams

A class model is comprised of one or more class diagrams and the supporting specifications that describe model elements including classes, relationships between classes, and interfaces (Pressman, 2001). A class diagram depicts the classes of the system, their inter-relationships, and the operations and attributes of the classes.

Based on the use cases and scenarios discussed in Section 3.2, we identify the basic sets of objects and their relationships that are needed to build FNU-CIS.

30

Figure 3-4 OOA FNU-CIS Class Diagram

Person- this object encapsulates people such as first name, last name. Staff and Students are sub class of this object.

Student - this object encapsulates the information about students and inherits from Person class. This object includes information such as student id, gender, address, program etc. It also includes business methods to select, update and delete the information.

31 Staff - this object encapsulates the information about staffs and inherits from Person class. This object includes information such as empcode, title, and qualification etc. It also includes business methods to select, update and delete the information.

Coursework – this object encapsulates information about student assessment. It includes information such as unit code, term, and year etc. Also business methods to retrieve, update and delete course work is included.

Grade – this object encapsulates information about student grades. It includes information such as unit code, unit name, year and grade. The business methods to retrieve, enter and update the grades are also provided.

Program – this object encapsulates all the program information for the university, it includes information such as program code, program name and duration. It includes business methods to enter and retrieve program

Unit – this object encapsulates information about all the units taught at the university, it includes information such as unit code, unit name and credit points. The business methods to retrieve, update and delete the program is also provided.

Department - this object encapsulates information about all the departments at the university, it includes information such as department code and department name.

Timetable - this object encapsulates the information about all classes held at the university. This object includes information such as unit code, class start time, class finish time etc. It also includes business methods to select, update and delete the information from the timetable.

32 3.5 System Functional Specification

The object oriented analysis deals with conceptual level objects and their data and operations we still often want to reason about the way these operations interact without worrying about communications data management and interface issues. To achieve this we use sequence diagrams.

3.5.1 Sequence Diagrams

The sequence diagrams convey the same sort of information as collaboration diagrams but in a different way. The objects are arranged in a line at the top of the diagram with function calls shown in sequence in vertical lines (Pressman, 2001).

3.5.2 Student Login

Student enters id and password and clicks ok button. The client application sends the id and password to create student object. The student object loads id and password from database and verifies this information. If verification is successful the message is sent to the client application and the client application displays the student menu.

Figure 3-5 Login Sequence Diagram

33 3.5.3 Student Enrollment

Student selects enrollment web page. Client application loads student details, program details and unit details. The units that are activated and are part of students program are displayed. Students enroll for the required units and the information is sent to the database for update.

Figure 3-6 Enrollment Sequence Diagram

34 3.6 Evaluation of FNU-CIS

In this section we evaluate FNU-CIS with other available campus information systems based on the criteria set for the development of campus information systems.

Heterogeneous Clients – the ability of the system to support end user devices with little processing power such as Mobile Phones, PDA etc.

Performance – determines how fast some aspect of a system performs under a particular workload.

Scalability – the system should be easily enlarged to accommodated growth without compromising performance.

Security – the system should be secured from unauthorized used.

Easier development maintenance and use – the system can be easily modified in future, the changes in code should be only secluded to changing single component.

Fault Tolerance - enables a system to continue operation, possibly at a reduced level (also known as graceful degradation), rather than failing completely, when some part of the system fails.

35 Table 3-3 Evaluation of Campus Information Systems

CAMPUS INFORMATION SYSTEMS System/ property Student Soft Premium PPMS FNU-CIS

Hetrogeneous Only high end users Limited support Limited support for Thin client Clients are supported. for hetrogeneous hetrogeneous architecture can easliy clients. clients. support devicse with little processing power with Mobile, PDA

Performance Slow while Slow while Slow while Fast while processing processing processing processing transactions. transactions transactions transactions

Scalability Inabilty to handle Inabilty to handle Inabilty to handle Development of large number of large number of large number of independent users. users users component allows them to accommodate growth

Secuirty Very limited secuirty Limited Security Limited Security Extensive security vulnerable to secuirty infrastructure with threats firewalls at each tier.

Easier Easy to develop but Easy to develop Diffiicult to Easy to develop and development, hard to maintain and mainatin code maintain. changes can also be maintenance easily made and use.

Fault Tolerance Failure of single Failure of single Some parts of the The system will piece of code may piece of code may system may continue to function if cause system havoc cause system continure working part of the hardware havoc or software fails.

36 3.7 Summary

To observe the overall functionality of FNU-CIS, user requirement was essential. In this chapter we described both functional and non functional requirements of our system. Use cases which include use case diagram and description were used to gather functional requirements of FNU- CIS. Non-functional requirements were also verified during the course of object oriented analysis. The information gathered in analysis phase will be utilized to prototype FNU-CIS architecture which will be discussed in the next chapter.

37 Chapter 4

Prototype FNU-CIS Software Architecture

This chapter describes how the system requirements and the functional specification from the previous chapter are implemented. The prototyped FNU-CIS architecture includes client tier, web tier, application tier and database tier. The main aim of FNU-CIS architecture is to address the issue of performance and scalability. This chapter describes software architecture that we have developed for FNU-CIS and the implementation details using JEE and CORBA.

4.1 FNU-CIS Software Architecture

FNU-CIS application is divided into four tiers: client tier, web tier, application tier and database tier. We optimized the performance for each of the tier by implementing number of servers to share the workload we created web server farm for web tier and application server cluster for application tier. Increasing workload can easily be managed by adding resource to our web server farm and application server cluster. We enhanced the security of FNU-CIS by creating security zone around each layer through installing firewalls. The business logic is defined within the business layer and is used by a number of components within the presentation layer thus any changes to business rules can therefore be made in one place and is instantly available throughout the whole application. We can easily change the contents of any one of the tiers without having to make corresponding changes in any of the others enabling parallel development of the different tiers of the application. If some components fail others will continue to provide service thus this is a fault tolerant architecture.

The deployment diagram is given below Figure 4-1.

38 4.2 FNU-CIS Deployment Diagram

FNU-CIS deployment diagram models the run-time architecture of FNU-CIS. It shows the configuration of hardware elements (nodes) and shows how the software elements and artifacts are mapped onto those nodes.

Figure 4-1 FNU-CIS Deployment Diagram

Figure 4-1 demonstrates FNU-CIS deployment diagram. Staff/Student PC’s using a web browser connect to Java Web Server which runs JSP’s to provide HTML output processing. The JSP’s communicate with CORBA objects running on separate application server host, which connects to the database to store or retrieve data. This allows for more scalable and robust implementation.

The graphical overview of FNU-CIS architecture is illustrated in Figure 4-2.

39

Figure 4-2 FNU-CIS Software Architecture

The description of the designed FNU-CIS software architecture is given below in detail:

Client tier (web browser) is implemented using HTML, it displays data, collects input from the user and posts it back to the web server for processing which runs the JSP’s to serve the request from the users.

Firewall will permit or deny a network transmission based upon a set of rules and is frequently used to protect networks from unauthorized access while permitting legitimate communications to pass.

Load Balancing cluster - will the scale the performance of our system by distributing workload to among multiple servers in our web server farm. It will also detect failed servers and remove them from routing list to minimize the impact of failure. The routing would be on round robin basis and servers would be allocated workload in rotation.

Web tier (web server), includes JSP’s and Java Beans which serve the request from browser client and generate dynamic content from them. Upon receiving the client request JSP’s make request from a Java Bean which in turn requests the information from CORBA implemented

40 application servers. Once the Java Beans generate content, JSP’s can query and display the content from Java Beans. We created web server farm to optimize performance of our web tier.

Application tier is container for all the components. CORBA is used as the middleware which is implemented using Java language which has CORBA IDL mapping. We implemented application server cluster to provide greater scalability. Our cluster will span multiple hosts, distributing application execution over a greater number of CPUs.

Database tier is the backend of the system, My SQL is used to implement the database accessed via java database connectivity (JDBC).JDBC is an interface that allows java applications to connect to relational databases, when java applications interact with databases JDBC opens database connections and sends SQL commands to query the databases.

Western Campus IT Server Room

Northern Campuses

Central Campuses

Western Campus Figure 4-3 FNU-CIS Wide Area Implementation

Figure 4-3 provides wide area implementation view of FNU-CIS. The servers will be centrally located and users will be able to connect using various end user devices.

41 4.3 Object Oriented Design

After designing the FNU-CIS architecture for the system we have to design in detail each use case that makes up our system so that we can reason out how this program would be implemented. We refined object oriented class objects and determined appropriate object oriented design classes that make up our program that compromise the architecture that we have designed.

Figure 4-4 FNU-CIS N-Tier Class Diagram

42 The classes are split into data, data manager and user interface classes. Data classes will hold data values. Data manager classes implement functions to manipulate data class. User Interface classes have functions for user interaction. The separation of class roles will minimize dependency (Lopes et al., 2004). User interface classes are separate from data manager and data classes. This will allow us to modify user interface classes without worrying how it will be displayed.

4.4 Login Class Interaction Diagram

Given below is a FNU-CIS class interaction diagram for login use case. This use case accepts user name and password through JSP implemented login page and sends it to application server for processing which compares the username and password stored in the database. Only relevant functions used for login are shown for the classes in Figure 4-5.

Staff PC’s

Web Server

Application Server

Database Server

Figure 4-5 Login Class Interaction Diagram

43 CISLogin.jsp – is HTML and JSP implemented web page where users provide their username and password. The user name and password are assigned to a java bean (student data) and forwarded to student interface class.

Student_Interface - java implemented class that implements login functionality, it queries the data stored in student data object and invokes the remote login method implemented in RemoteStudentManager class.

Student_Data – java implemented data class that stores student attributes and provides method to read and store student data.

Remote_Student_Server –java implemented CORBA application server where business logic classes such as RemoteStudentManagerImp is deployed.

Remote_Student_Manager_Imp –java implemented business class deployed in CORBA based RemoteStudentServer. It implements the login method which verifies user name and password from the database.

Remote_Student_Data – java implemented data class that stores student attributes this object is used by RemoteStudentManagerImp class to hold student data.

MySQL_Conn – java implemented class that provides functions to query data, update data, insert data and delete data from the database.

44 4.5 Enrollment Class Interaction Diagram

Given below is a class interaction diagram for enrollment use case. Enrollment.jsp lists the units in which the student can enroll. Students select the units into which they want to enroll and upon clicking the submit button this information is updated in the database. Figure 4-6 shows different classes that are used by enrollment use case.

Staff PC’s

Web Server

Application Server

Database Server

Figure 4-6 Enrollment Class Interaction Diagram

Enrollment.jsp – is HTML and JSP implemented web page it shows the list of units into which users can enroll. The selected units are assigned to a java bean (unitt data) and forwarded to student interface class.

Student_Interface - java implemented class that implements enrollment functionality, it displays the units in which the students can enroll, upon selecting the unit it invokes enrollment function in RemoteStudentManager class to update it in the database.

45 Student_Data – java implemented data class that stores student attributes and provides method to read and store student data.

Unit_Data – java implemented data class that stores unit attributes and provides method to read and store unit data.

Remote_Student_Server –java implemented CORBA application server where business logic classes such as RemoteStudentManagerImp is deployed.

Remote_Student_Manager_Imp –java implemented business class deployed in CORBA based RemoteStudentServer. It implements enrollment function.

Remote_Student_Data – java implemented data class that stores student attributes this class is used by RemoteStudentManagerImp to hold student data.

Remote_Unit_Data – java implemented data class that stores unit attributes this class is used by RemoteStudentManagerImp to hold student data.

MySQL_Conn – java implemented class that provides functions to query data, update data, insert data and delete data from the database.

46 4.6 Dynamic Object Oriented Design

We usually think about the dynamic behavior of our system using sequence and collaboration diagrams this is useful in determining whether our distributed systems is actually going to work. These diagrams are often regarded as more complex then OOA ones we have to split objects and introduce service objects and multiple programs (Grundy, 2000).

4.6.1 Student Login

Student enters ID and password and clicks OK button. The client application sends the ID and password for verification to CORBA implemented student application server. The application server loads ID and password from database and verifies the password. If verification is successful sends the message to client application and the client application displays the student menu.

Figure 4-7 Dynamic Login Sequence Diagram

47 4.6.2 Enrollment

Student selects enrollment web page. Client application sends the request to CORBA application server to load student details, program details and unit details. The units that are activated and are part of students program are displayed on the enrollment web page. Students enroll for the required units and the information is sent back to the application server which updates the database.

Figure 4-8 Dynamic Enrollment Sequence Diagram

Figure 4-8 Dynamic Enrollment Sequence Diagram

48 4.7 Implementation Details

We have used HTML to implement client user interface, JSP to implement server side scripts, Java Beans to implement data classes, CORBA to implement our remote application server objects and MySQL for database. JDBC is used for communication between data manager classes and MySQL server. In this section we provide the code extracts of login function to demonstrate how different classes interact to serve the request in FNU-CIS N-Tier architectural design. Source codes for other functions are attached in the Appendix A.

Client tier has been implemented as thin clients. It is useful to split the task of generating dynamic contents into two parts; the presentation logic which determines how information is presented to the user and business logic which controls the relationship between input, process and output (Somerville, 2006). Figure 4-9 shows the login web page where users enter their username and password.

Figure 4-9 Login Web Page

Figure 4-9 Login Web Page

49 The HTML code for login web page is given below in Figure 4-10.

<%@ page import="Student.*" %> <%@ page import="java.util.*" %>

Enter the UserName and the Password
UserName  
Password  

Figure 4-10 Login Web Page Code Extract

50 Figure 4-10 shows the code extract for login web page implemented using HTML, it collects input (username and password) from the user and posts it to the web server for processing using form post method, which runs the JSP’s to serve the request. Upon receiving the client request JSP’s forward the request to user interface class.

Figure 4-11 Java Web Server

Figure 4-11 presents the run time interface of our java web server. It serves client request using hypertext transfer protocol. Our java web server processes JSP files and Java class flies to dynamically create HTML. FNU-CIS has group of web servers working together known as web server farm to maintain performance and scalability. The FNU-CIS web server farm is described in Figure 4-12.

51

Figure 4-12 FNU-CIS Web Server Farm Figure 4-12 shows FNU-CIS Web Server farm. FNU-CIS application will have huge amount of incoming traffic, one standalone server would not be sufficient. We used multiple servers to host the application. The workload is equally divided among them on round robin basis using load balancer. Figure 4-13 shows the code fragment from user interface class that facilities users login request.

if (student_manager == null) { try { // Create and initialize the ORB String args[] = {"-ORBInitialPort","1050"}; ORB orb = ORB.init(args,null);

org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef); String name = "StudentManager"; student_manager = RemoteStudentManagerHelper.narrow(ncRef.resolve_str(name));

} catch (Exception e) { System.out.println(e); e.printStackTrace (System.err); }

Figure 4-13 User Interface Class Code Extract

52 Figure 4-13 shows the code extract from user interface class that establishes connection with CORBA application server. It creates and initializes the ORB (Object Request Broker) and resolves the object reference from the names server. The login function is shown in figure 4-14.

public void login(StudentData std_data) { System.out.println("Login " + std_data.getStudentID()); String Password;

try { Password = student_manager.login(std_data.getStudentID());

if (Password.equals(std_data.getPassword())) { std_data.setMessage("Success"); }

else std_data.setMessage("Login Failed"); } catch (Exception ex) { std_data.setMessage(ex.toString()); }

}

Figure 4-14 Login Function Code Extract

Figure 4-14 shows the login function from user interface class, it executes remote login method from student manager class implemented using CORBA application server. If the username and password matches with the record stored in the data base it sets success message in StudentData class or else login failed message.

53 public class RemoteStudentServer {

public static void main(String[] args) {

try { // Create and initialize the ORB args = new String [] {"-ORBInitialPort","1050"}; ORB orb = ORB.init(args, null);

// Get the root naming context org.omg.CORBA.Object ns_ref = orb.resolve_initial_references ("NameService");

// Use NamingContextExt which is part of the Interoperable // Naming Service specification. NamingContextExt ncRef = NamingContextExtHelper.narrow (ns_ref);

// Get reference to rootpoa & activate the POAManager POA rootpoa = POAHelper.narrow (orb.resolve_initial_references ("RootPOA")); rootpoa.the_POAManager().activate();

// Create Servant RemoteStudentManagerImp servant = new RemoteStudentManagerImp (orb, rootpoa);

// Get the corresponding obj ref. org.omg.CORBA.Object obj_ref = rootpoa.servant_to_reference (servant);

// Narrow to the RemoteCustomerManager interface. RemoteStudentManager std = RemoteStudentManagerHelper.narrow (obj_ref);

// Put into the name server. String name = "StudentManager"; NameComponent[] path = ncRef.to_name (name); ncRef.rebind (path, std);

// Connect to database MySQLConn.getInstance().connect();

// Wait for invocations from clients System.out.println ("Student server launched, ready, and waiting on clients..."); orb.run();

} catch (Exception e){ System.err.println("ERROR: " + e); e.printStackTrace(System.out); } }

Figure 4-15 Student Application Server Code Extract

54 Figure 4-15 shows the code extract of student application server. It creates and initializes ORB, creates a servant and gets the reference from root portable object adapter. Registers the object of RemoteStudentManager class, assigns a name student manager and puts it into the names server. It establishes the connection with FNU-CIS database and waits for invocation from the clients.

Figure 4-16 CORBA Application Server

Figure 4-16 provides run time interface for corba application server. All the business logic is implemented using application server. In FNU-CIS architecture we have application server cluster to serve the request for business objects. Figure 4-17 demonstrates application server cluster.

55

Figure 4-17 FNU-CIS Application Server Cluster

Figure 4-17 shows FNU-CIS application server instances configured to act in concert to deliver greater scalability and availability than a single instance can provide. While a single application server instance can only leverage the operating resources of a single host, a cluster can span multiple hosts, distributing application execution over a greater number of CPUs. While a single application server instance is vulnerable to the failure of its host and operating system, a cluster continues to function despite the loss of an operating system or host, hiding any such failure from clients.

56 public class RemoteStudentManagerImp extends RemoteStudentManagerPOA {

private ORB orb; private POA poa;

public RemoteStudentManagerImp(ORB orb, POA poa) { this.orb = orb; this.poa = poa;

}

//Student Login public synchronized String login(String ID) throws ServerError { String Password = "N/A";

try {

ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT * FROM StudentPassword WHERE StudentID = '"+ID+"'");

if (rs.next()) { Password = rs.getString("Password"); } } catch(Exception e) { throw new ServerError(e.toString());

} }

return Password; }

Figure 4-18 Remote Student Manager Code Extract

Figure 4-13 illustrates the login function which is executed on CORBA application server. This function tries to extract the password from the FNU-CIS database. If the password is extracted it returns the password to the login method in user interface class.

57 4.8 Summary

Software architecture is an important aspect in any software design. It shows the software components and their interactions as illustrated in FNU-CIS architecture. This chapter also described object oriented design of FNU-CIS. Class diagrams and sequence diagram were used to describe the static and dynamic behavior of the systems at design level. The purpose of class with its data attributes is conferred in detail. The implementation details with code extracts are presented to support the design of FNU-CIS. Once the system was implemented testing was carried out which is discussed in next chapter.

58 Chapter 5

Software Testing

Software testing is an integral part of the software development lifecycle. During development these components were tested independently and after integration of the modules, integration testing followed by performance testing was performed using test cases prepared to test the conformance of the system to the requirements. The test results obtained show that the developed system is functional and successfully meets the stated requirements. This chapter reports on rigorous performance and scalability testing of FNU-CIS in the distributed settings.

Performance test measures the speed with which a single request can be executed, while scalability test measures the ability of a request to maintain its performance under increasing load (Haines, 2006). The performance of a request may be reported as generating a valid response time, but the scalability of the request measures the request’s ability to the same response time as the user load increases.

5.1 Performance Tests

Performance tests can demonstrate that the system meets performance criteria or can be used to compare two systems to find out which one performs better or measure what part of the system performs badly (Astra, 2009). In this section we tested the system for response time, throughput and latency. Response time will measure amount of time system takes to process a request after it has received one. Throughput will measure the number of transactions per second the application can handle. Latency in simplest terms is remote response time apart from the processing time that is needed on the server to process your request, there is always a delay involved for your request to reach to server.

We prototyped two viable alternatives which includes 2-Tier and a 3-Tier architecture, they were tested against our designed N-Tier architecture. The tests were carried out to verify that N-Tier architecture is the most suitable for the development of FNU-CIS. The work load includes

59 concurrent number of users performing a specific transaction within the set duration the prototypes were tested for throughput, response time and latency.

Prototype 1

The prototype 1 is 2-Tier architecture (client/server) which involves JSP forms directly communicating with the database server. In this architectural type we have implemented business logic together with user interface. Figure 5-1 illustrates prototype 1.

Tier 1 Tier 2

HTML SQL JSP Query Java Beans

Client Database Server Database

Figure 5-1 Prototype 1

Prototype 2

The prototype 2 resembles 3-Tier architecture, client tier is implemented using JSP forms, business logic is implemented using java beans deployed on web server, which communicates with the database server. Figure 5-2 illustrates prototype 2.

Tier 1 Tier 2 Tier 3

SQL JSP Query HTML Java Beans

Database

Client Web Server Database Server

Figure 5-2 Prototype 2

60 Prototype 3

The prototype 3 is N-Tier architecture designed for FNU-CIS .We have implemented client tier using HTML, web tier using JSP forms which requests for data using java beans which in turn makes request to the business logic implemented using CORBA application server that communicates with the database server.

Tier 1 Tier 2 Tier 3 Tier 4

SQL HTML JSP CORBA Query Java Beans Java Beans

Client Web Server Application Server Database Server Database

Figure 5-3 Prototype 3

In the sections given below we tested these three prototypes for response time, throughput and latency and analyze the results obtained. For the purpose of these testing we deployed the tiers on separate physical machines. The three prototypes were tested for logging into the system and displaying the user details. Automatic test scripts were created and executed using load testing program. The load testing program used virtual users to interact with the system and generated results. Virtual users are generated by automated testing tool that allows a computer to emulate a human user, performing similar actions. The tests were carried on FNU local area network with high powered machines running windows operating systems.

61 5.1.1 Response Time

Software response time measures a client’s perspective of the total time that a system takes to process a request including latency. The response time of a single request is not always representative of systems typical response time. In order to get a good measure of response time we calculated the average response time of request ranging from 100 – 500 concurrent virtual users. The results of average software response time are given below.

Table 5-1 Average Response Time

Response Time

2-Tier 3-Tier N-Tier Avg. Response Avg. Response Avg. Response Number of Users Time(m/s) Time(m/s) Time(m/s)

100 3058.28 11774.37 3781.68

200 5791.85 26654.26 4531.14

300 9299.08 40653.16 4803.25

400 12296.6 62203.36 5449.84

500 15198.18 75312.75 7913.9

The line graph indicating the response time for three prototypes is given below in Figure 5-4.

Performance Analysis

80000

60000 2-Tier

40000 3-Tier seconds) N-Tier 20000 (milli Response Time 0 0 100 200 300 400 500 Virtual Users

Figure 5-4: Average Response Time Graph

62 The result shows that prototype 3 has lower average response time as compared to other prototypes that we have tested against, with the increase in users from 100 to 500 there is slight increase in response time as compared to other prototypes. When the user load increased from 100 to 500, for 2-Tier the response time increased by 12 seconds, for 3-Tier the response time increased by 64 seconds, for N-Tier the difference was only 6 seconds. The results show that designed N-Tier architecture has ability to handle increasing workload without compromising much of response time, in the next section we will carry out scalability testing to maintain our response time despite increase in number of users

5.1.2 Throughput

Throughput is the measure of the number of transactions that a system can process in the given period of time. In software throughput is usually measured in requests/second or transactions/second. To get a good measure of throughput we calculate the average throughput time for request ranging from 100 – 500 users. The results of average throughput are given below.

Table 5-2 Average Throughput

Throughput

2-Tier 3-Tier N-Tier Number of Users No. Trans/Sec No. Trans/Sec No. Trans/Sec

100 32.69 8.49 63.44

200 34.53 7.50 65.33

300 32.36 7.37 62.45

400 32.52 6.40 63.17

500 32.89 6.63 61.37

The line graph indicating the throughput for three prototypes is given below in Figure 5-5.

63

Performance Analysis

70 60 50 2-Tier 40 3-Tier

seconds) 30 N-Tier 20 (Milli Reponse Time Reponse 10 0 100 200 300 400 500 Virtual Users

Figure 5-5 Average Throughput Graph

The result shows that prototype 3 has higher throughput as compared to other prototypes that we have tested against, thus we can conclude that N-Tier architecture has the ability to processes more transactions per second compared to other prototypes.

5.1.3 Latency

Latency is a measure of time delay experienced in a system, the precise definition of which depends on the system and the time being measured. Latencies may have different meaning in different contexts (Hensey et al., 2002). In these tests we will measure the delay involved for the request to reach the server. We tested for virtual users ranging from 100 – 500.

64 Table 5-3 Average Latency

Latency

2 Tier 3 Tier N-Tier Number of Users Avg. Latency (ms) Avg. Latency (ms) Avg. Latency (ms)

100 25.80 153.09 2.45

200 35.72 156.72 2.30

300 29.47 182.44 3.54

400 30.13 192.56 4.33

500 45.33 222.74 5.46

The line graph indicating the average latency for three prototypes is given below in figure 5-6.

Performance Analysis

250

200

150 2-Tier 3-Tier seconds) 100 N-Tier

(Milli Reponse Time Reponse 50

0 100 200 300 400 500 Virtual Users

Figure 5-6 Average Latency Graph

The result of the above test shows that prototype 3 has lower average latency as compared to other prototypes that we have tested against, thus N-Tier has lower time delay between processes being executed. For N-Tier architecture the processing tasks are delegated middleware, while in

65 2-Tier and 3-Tier architecture there in only one server allocated for handling user request and processing the request to produce output.

5.1.4 Result Analysis

All three tests response time, throughput and latency favored N-Tier architecture. N-Tier is fast as little data processing is done on the client they collect input from the user and post it to the server for processing, use of middleware for business processing provides high performance, since the business logic is implemented using CORBA application servers it has ability to be enlarged to accommodate increasing workload, by separating functionalities and developing independent components enables growth of each component without affecting others in the system. We can state that our proposed architecture is the most suitable for implementation of FNU-CIS among its other viable alternatives.

5.2 Comparative Testing

In this section we compared the response time of FNU-CIS against the existing campus information systems PPMS, StudentSoft and premium. The features that are available in all the systems were tested for response time. The tests were carried out on FNU wide area network with 50 concurrent virtual users. The result given below is comparative testing of different critical business tasks login, retrieving student details, retrieving student grades and retrieving class list.

66 Table 5-4 Comparative Testing Table

Comparative Testing

Scenario FNU-CIS PPMS Student Soft Premium

Response Response Response Response Time(ms) Time(ms) Time(ms) Time(ms)

Login 3058 5673 7654 8018

Retrieve Student 3789 7345 7865 12281 Details

Retrieve Student 2996 7878 9876 7950 Grades

Generate Class List 3456 9087 11675 12281

5.2.1 Result Analysis

The results of all these tests favored FNU-CIS, thus we can state that FNU-CIS gives better performance in comparison to existing systems available at FNU. FNU-CIS has capability to maintain acceptable response time. FNU-CIS has N-tier architectural design and data processing tasks are delegated to appropriate server (web server and application server).In the next section we will test our system by adding resource (Web server and Application Server) to the FNU-CIS and measure the behavior of our system.

67 5.3 Scalability Tests

In this section we evaluated the scalability of FNU-CIS in distributed settings. We added resources such as web server and application server to FNU-CIS architecture and measured the changes in response time and throughput. This test provides us with necessary information on how to utilize the capabilities of web server farm and application server cluster in FNU-CIS architecture. We did the tests on machines on local, high speed LAN. However the results would be different if across WAN or heavily loaded network.

5.3.1 Web Server Farm

In this test will see the effect of adding server to web server farm and measure the changes in response time and throughput. Three tests were carried out, in each of the tests we increased the number of server in the web server farm. For these tests each transaction was allocated to a particular web server using load balancer. We tested for users ranging from 100 – 500 concurrent virtual users.

Test 1 Test 2

Test 3

Figure 5-7 Web Server Farm

68 5.3.2 Web Server Response Time

We measured the effect on response time by adding server to our web server farm. The results of average response time are given below in table 5-3.

Table 5-5 Web Sever Farm Average Response Time

Web Server Response Time

Test 1 Test 2 Test 3

Avg. Response Avg. Response Avg. Response Number of Users Time(ms) Time(ms) Time(ms)

100 2002.34 1557.63 1474.94

200 2606.9 1934.63 1669.62

300 2797.55 2100.04 2050.2

400 3034.23 2218.36 2211.9

500 3201.21 2307.07 2253.82

The result shows that when we added web server to the server farm there was a reduction in response time. For e.g. we had 500 users with one server the average response time was 3210.21 ms, when we added another server the average response time decreed to 2307.07 ms, after adding the third server the average response time decreased to 2253.82 ms. Thus we can state that workload can easily be distributed amongst web servers to reduce the response time as shown in table 5-3.

69 5.3.3 Web Server Throughput

We measured the effect on throughput by adding server to our web server farm. The results of average throughput are given below.

Table 5-6 Web Server Farm Average Throughput

Software Throughput

Test 1 Test 2 Test 3 No. Trans/Sec No. Trans/Sec No. Trans/Sec Number of Users

100 49.94 64.20 67.80

200 76.72 103.38 119.79

300 107.24 142.85 146.33

400 131.83 180.31 180.84

500 156.19 216.73 221.85

The result shows that when we added server to the web server farm there was increase in throughput indicating larger number of transactions being processed. In simple more transactions would be processed if we increase number of servers to our server farm.

70 5.3.4 Application Server Cluster

In this test we will add server to application server cluster and measure the changes in response time and throughput. The application server clusters work together to process a transaction. Three tests were carried out, in each of the tests we added an application server to the cluster. We tested for users ranging from 100 – 500 concurrent users.

Test 1 Test 2

Test 3

Figure 5-8 Application Server Cluster

71 5.3.5 Application Server Response Time

We measured the effect on response time by adding server to application server cluster, this will provide us with information on the effect on response time when we add application server. The results of average software response time are given below.

Table 5-7 Application Server Response Time

Application Server Response Time

Test 1 Test 2 Test 3

Avg. Response Avg. Response Avg. Response Number of Users Time Time Time

100 1474.94 1360.66 1299.87

200 1669.62 1520.09 1345.32

300 2050.2 1984.46 1786.37

400 2211.9 2018.36 2001.67

500 2253.82 2153.55 2053.82

The result of the above test shows that when we added application server to the cluster there was reduction in response time hence we can state that increasing request for business components can easily be managed by adding additional server to the cluster.

72 5.3.6 Application Server Throughput

We measured the effect on throughput by adding server to application server cluster, this will provide us with information on the effect on response time when we add application server. The results of average software response time are given below.

Table 5-8 Application Server Throughput

Application Server Throughput

Test 1 Test 2 Test 3 No. Trans/Sec No. Trans/Sec No. Trans/Sec Number of Users

100 67.80 73.49 81.30

200 119.79 131.57 148.69

300 146.33 151.17 167.97

400 180.84 198.18 199.83

500 221.85 232.17 243.44

The result of the above test proves that when we add server to the application server cluster there was increase in throughput indicating larger number of transactions being processed. In simple more transactions would be processed if we increase number of servers in our application server cluster.

73 5.3.7 Result Analysis

The results of the scalability test shows that when we added server to the web server farm or application server cluster there was reduction in response time indicating increase in throughput. The initial response time to serve 500 users was 3201.21 ms by adding servers to the web server farm we managed to reduce it to 2253.82 ms, this time was further reduced to 2053.82 ms after we added servers to application server cluster. The results indicate that performance can easily be maintained with growing amount of workload by adding resources in our FNU-CIS architecture.

5.4 Summary

This chapter described the performance and scalability evaluation of FNU-CIS. Performance testing was used to measure the speed at which FNU-CIS can process the transaction in comparison with existing campus information system at FNU and other viable architectural design. Scalability test proved the system’s ability to maintain the performance with increasing workload. Results of both the tests favored FNU-CIS. Next chapter concludes this thesis by providing some future research work.

74 Chapter 6

Conclusions and Future Work

This chapter summarizes the work done in this thesis and presents some possible future work for research in this area.

6.1 Contributions

The aim of this research was to develop prototype campus information system for Fiji National University using N-Tier architecture that would address the issue of performance and scalability. The main contributions made by this thesis include:

 Reviewing the Literature, studying the development trends of campus information systems and comparing and contrasting the available systems by investigating their weaknesses and their strengths.

 Developing software architecture for the implementation of FNU Campus Information Systems. The FNU-CIS architecture includes client tier, web tier, application tier and database tier.

 Implementation of FNU-CIS using JEE and CORBA. The user interface was developed using HTML and JSP. Java enabled web server to server the user request for JSP’s. The workload is distributed among web servers using load balancer. The application server was implemented using CORBA to handle the business logic and MySQL server was used to handle backend database.

 Evaluations were carried out to assess the performance and scalability of our system in distributed settings. The system was tested for throughput, response time and latency.

75 6.2 Conclusions

In this thesis we prototyped FNU-CIS using N-Tier architecture. The implementation was carried using JEE and CORBA.

The investigation of using N-Tier architecture to address the issue of performance and scalability for FNU-CIS.

FNU-CIS is fast as little data processing is done on the client, the client’s primary responsibility is merely to collect input from the user and post it back to the server because data processing tasks are delegated to the supporting server. The increasing demand for resources is met by coordinating the use of available memory and CPU resources through load balancing. FNU-CIS can easily expand and contract its resource pool to accommodate heavier or lighter loads. Its separation of functionalities is the key to achieve scalability. By separating the functionalities and developing independent components, it enables independent growth of each component without affecting others in the system.

The use of N-Tier architecture to develop FNU-CIS also has many other benefits:

FNU-CIS has thin client web based interface, thus easily accessible through standard web browser, also increasing openness for use on user devices with little memory and processing power hence can be easily assessed on devices such as (PDA, Mobile) due to its minimum requirements as many devices now have browsers. FNU-CIS uses cryptographically strong passwords associated with user names. Backend software security is partly accomplished by creating security zones where each layer is placed behind firewall keeping web server, application server, and database server not easily reachable from the Internet. The central servers will be placed in a cage at an ISP site, and access and modifications to it will be made under tight policy controls. FNU-CIS is highly flexible we can easily change the contents of any one of the tiers without having to make corresponding changes in any of the others enabling parallel development of the different tiers of the application. FNU-CIS has lower maintenance as software application updates can be executed on the server. Deployment costs are also reduced as thin clients can be remotely configured and do not need to be set up on individual machines.

76 Its clear separation of functionality makes it very simple to debug the system. FNU-CIS has fault tolerant design the system will continue to operate possibly at reduce level rather than failing completely when some parts of the system may fail. There may be reduction in throughput or increase in response time. FNU-CIS has modular architecture if some components fail others may still provide services. FNU-CIS architecture includes web server farm and application server cluster if one of the servers fail others may continue providing required service.

The investigation of using Java Enterprise Edition and CORBA to implement and test the ideas presented in this thesis.

We have used HTML to implement client user interface, JSP to implement server side scripts, Java Beans to implement data classes, CORBA to implement our remote application server objects and MySQL for database. JDBC is used for communication between manager classes and MySQL server.

Client tier has been implemented using HTML and JSP. HTML allows images and objects to be embedded and can be used to create interactive forms. JSP’s are used to handle the user interface logic. JSP technology is simple but powerful to dynamically generate HTML on the server side, with JSP’s web pages can be created quickly and easily with dynamically generated content. Load balancer will scale the performance of our system by distributing client requests across different web and application servers. FNU-CIS uses round robin load balancing technique, it is one of the simplest scheduling algorithms. It distributes workload equally among all the servers. CORBA is a popular middleware technology. The CORBA standard has been widely used in the area of object oriented and distributed systems. It supports independence of the computer architecture and programming languages to be used. It allows users and vendors independent choice of ORB products and can also be used on different kinds of operating systems such as UNIX, Windows.

77 6.3 Further Study

This thesis has described the architecture, design, implementation and evaluation of FNU-CIS, this system has addressed the issue of performance and scalability of its predecessors. However, there are still some research areas that need to be completed in the future.

Growth of mobile computing technologies, the popularity of mobile devices such as mobile phones has increased over past few years, different software applications can be deployed on these mobile terminals and can communicate with other applications or information systems (e.g. Internet) through a wireless network (Chaudhary, 2009). In future we should add features to the system to provide both HTML (web browser) and WML (mobile) user interfaces that would easily support devices such as mobile phones and PDA’s.

Further generalization of our architecture would be carried and more performance and scalability test should be conducted with higher number of users to observe the system in large scale. However it is very difficult to arrange and perform the test in large scale.

78 References

Adkins, L & Heinen, D 1997, ‘Improving Student Life at Duke University through a Campus Card System’, The Higher Education Administrative Technology Conference, pp. 1-9.

Alderson, D & Granger, M 1996, ‘University of Maryland College Parks Experience in Putting Student Services on the Web’, Broadening our Horizons: Information, Services and Technology, pp.1-11.

Aldrich et al 2002, ‘Connecting Software Architecture to Implementation’, Proceeding of the 24th International Conference on Software Engineering (ICSE’02), Orlando, USA, 2002.

Ahemad, A et al 2010, ‘Software Architecture of a Learning Apprentice System in Medical Billing’, Proceedings of the World Congress on Engineering, vol. 1, June 30–July 2, London, UK.

Allen, R 1997, ‘A Formal Approach to Software Architecture’, PhD Thesis, Carnegie Mellon University, CMU Technical Report, Pennsylvania, Pittsburgh, CMU-CS- 97-144.

André, B 2000, ‘Characteristics of scalability and their impact on performance’, Proceedings of the 2nd international workshop on Software and performance, Ottawa, Ontario, Canada, pp. 195– 203.

Anouncia, M 2009, ‘A Framework for Software Architecture Visualisation and Evaluation’, International Journal of Computer Applications, vol. 1, no. 8, pp. 60 -65.

Astra Infotech 2009, viewed at http://astrainfotech.com/software-engineering- resources/glossary/software-testing-glossary.html

Baker, S 2010, ‘Web Services and CORBA’, Lecture Notes in Computing Science, vol. 2519, 2, pp. 618-632. Publisher: Springer Berlin / Heidelberg.

79 Barbacci et al (1995), ‘Quality Attributes: Technical Report CMU/SEI-95-TR-021 ESC-TR-95- 021. 1995’. Software Engineering Institute, Carnegie Mellon University, Pittsburgh, PA.

Bass, Len, Paul Clements, and Rick Kazman. Software Architecture in Practice, 2nd ed. Addison-Wesley Professional, 2003.

Bennett, C & Kannenberg, M 1997, ‘Students Transaction via Web’, The College and University Information Services Conference, pp. 3-8.

Chan, C & Chen, O 2000, ‘A User Centered Approach to Student Information Systems Design’, The Higher Education Administrative Technology Conference, pp. 2-7.

Chaudhary, K 2009, ‘Development of an Offline Micropayment System for Peer to Peer Networks’, MSc Thesis, University of the South Pacific, Suva, Fiji. Aug 2009.

Chow, D 2009, ‘Evolution of Information Systems’, Principles of Auditing and Management Information Systems.

Cristian, C et al, ‘Design and Implementation of Distributed N-Tier Applications’, Journal of Computer Science and Control Systems, vol.3, no.1 , 2010.

Common Object Request Broker Architecture 2004, Core Specification, http://www.omg.org/docs/ formal/04-03-01.pdf.

Cortellessa et al, 2011, ‘A Model Based Software Performance Analysis’, Published by Springer 1st Edition. 2011.

Dai, X & Kumar, B 2010, ‘Comparing and Contrasting Campus Information Systems in South Pacific Regional Universities’, IEEE – 2010 International Conference on Computational and Information Science (ICCIS 2010), Published by IEEE Computer Society, pp. 721-724.

80 Davis, D & Prashar, M 2002 Latency Performance of Soap Implementation, 2nd IEEE/ACM International Symposium on Cluster Computing and the Grid, Published by IEEE Computer Society.

Dodds, T & Spencer, R 2007, ‘Next Generation Administrative System: Philosophy, Principles and Technology’, EDUCAUSE Center for Applied Research, vol. 2007, issue 19, pp 2-12, September 2007.

Elfwing et al (2002) Performance of Soap in Web Services Environment compared to CORBA, Ninth Asia Pacific Software Engineering Conference, Published by IEEE Computer Society.

Ethridge, R & Smith, M 2000, ‘Building a Personalised Education Portal – Get behind the scenes look at LSU’s award winning system’ , Educause Quarterly November 2- 2000, pp 12- 19.

Fayad, M & Hamza, H 2007, Towards Scalable and Adaptable Software Architectures, unpublished.

Fiji National University 2010, viewed 17 September 2011, http://www.fnu.ac.fj.

Gemmell, M & Pagano, R 2003, ‘ A Post Implementation Evaluation of a Student Information System in the UK Higher Education Sector”, The Electronic Journal of Information Systems Evaluation, vol. 6 issue 2 pp. 95-106.

Gralan, D 2000, ‘Software Architecture and Object Oriented Systems’, Proceedings of IPSJ Object-Oriented Symposium 2000, Tokyo, Japan.

Grubb, G et al 2009, ‘Software Maintenance: Concepts and Practice’ World Scientific Publishing Company.

Grundy, J 2000, Requirements Engineering and OOA Tutorial.

81

Guthrie et al, 2009, Microsoft Application Architecture Guide, Patterns and Practices – 2nd Edition, 2009, Published by Microsoft Corporation.

Haines, S 2006, Pro JavaEE5 Performance Management and Optimization, Published by Apress.

Henssey et al, 2002, Computer Architecture: A Quantitative Approach. Hartley, M & Uyeda, G 2000, ‘ Shaping Student Information Systems to Deliver Services in the 21st Century’, The Higher Education Administrative Technology Conference, pp. 1-16.

Hedeggard, T & Straut, T 1997, ‘Administrative Systems in the Virtual University: Best Practices’, The Information Profession and the Information Professional, pp.1-13.

Javid, J 2005, http://javidjamae.com/2005/04/07/response-time-vs-latency/

Kavvik, R & Handberg, J 2000, ‘Transforming Student Services- the University of Minnesota takes a fresh look at client/server interaction’, Educause Quarterly November 2- 2000, pp 30-37.

Kleinrock, L 1995, ‘Distributed Systems’, Special Issue - Communications of the ACM, vol. 28, no. 11, November 1995.

Kumar, B 2011, ‘Thin Client Web-Based Campus Information Systems for Fiji National University’, International Journal of Software Engineering & Applications (IJSEA), vol.2, no.1, pp. 13-26, January 2011.

Lopes C & Liebehher, K 2004, ‘Abstracting Process to function Relation in concurrent Object Oriented applications’, Published in proceedings of the European Conference on Object- Oriented Programming (ECOOP),Bologna, Italy. Springer-Verlag LNCS 821.

Magee et al 1995, ‘Specifying Distributed Software Architectures’, Proceedings of the Fifth European Software Engineering Conference, Barcelona, Spain, September 1995.

82

Mahar, F 2003, ‘Role of Information Technology in Transaction Processing Systems’, Pakistan Journal of Information, vol.2, no. 2, pp. 128-134, Published by Asian Network for Scientific Information.

Miller, R et al 2002, ‘UniverSIS: Flexible Systems Easy to Change, Designing flexible systems save time and money now and in future’, Educause Quarterly November 3- 2002, pp 12-19.

Mulugeta, M 2008, ‘Performance Testing and Optimizations in Web Based Applications’, The Developers Conference - 2008. OMG UML Specification Version 1.3 1999, ftp://ftp.omg.org/pub/docs/ad/99- 06-08.pdf.

Oracle 2011, viewed 19 July 2012, http://www.oracle.com/technetwork/java/javaee/overview/index.html.

Pan, J 1999, Software Reliability, Dependable Embedded Systems.

Parsons, J & Oja, D 2006, Computer Concepts – New Perspectives, 8th Edition, Published by Thomas Learning.

Parsons, J & Oja, D 2011, Computer Concepts – 2011, Published by Cengage Learning.

Peng, L 2003, ‘KWEAT HIGH SCHOOL Student Information System: Implementation and Evaluation’. MSc Thesis University of Utara Malaysia, Kedah Darul Aman, Malaysia. June 2003.

Plasil at al. 1999, ‘Bounding Component Behavior via Protocols, Proceedings of Technology of Object-Oriented Languages and Systems’, Santa Barbara, USA.

Pressman, Roger 2010, Software Engineering: A Practitioner’s Approach, 5th Edition, Published by McGraw-Hill.

83

Qian, Zhongsheng 2011, ‘Towards Testing Web Applications Using Functional Components’, Journal of Software, vol. 6, no. 4,april 2011

Rosa, N & Justo, G 2009, Incorporating Non functional Requirements into Software Architectures.

Ranjan, R 2010, viewed 20 August 2011, http://www.helium.com/items.

Ruzinoor, M 2011, ‘A New Four Tier Framework for online Application of 3D Visualisation’, International Conference on Future Information Technology, Singapore, pp. 228 -232.

Sommerville, I 2006, Software Engineering, 9th Edition, Addision-Wesley.

Tafti, A & Jonesepah, S 2008, ‘Development of a framework for applying ASYUCDA system with N-Tier application architecture’, unpublished.

Zheng, D & Jhao, J 2002, ‘Achieving Software Flexibility via Intelligent Workflow Techniques’, Proceedings of the 35th Hawaii International Conference on System Sciences, pp. 34-48.

84 Appendix A

FNU-CIS Source Code

In this section we provide source codes for important interfaces and classes of FNU-CIS.

A.1 The following code describes the login web page.

Campus Information Systems

Secured Login

<%@ page import="Student.*" %> <%@ page import="java.util.*" %>

85

Enter the UserName and the Password
UserName  
Password  

<%Student_interface.processRequest(request.getParameter("action"),Student_data);%>

<% if(Student_data.getMessage().equals("Success")) response.sendRedirect("http://localhost:1234/SIS/StudentMain.jsp");

else { out.println("

" + Student_data.getMessage() + "
" + "
"); } %>

86 A.2 The following code describes the student’s profile web page.

.
Personal Details

<%@ page import="Student.*" %> <%@ page import="java.util.*" %>

<%Student_interface.processRequest("SelectStudent",Student_data);%>

87

Student ID <%out.println(Student_data.getStudentID());%>
Name <%out.println(Student_data.getFirstName() + " " +Student_data.getSurName());%>
Program <%out.println(Student_data.getProgramName());%>
Major 1 <%out.println(Student_data.getMajor1());%>
Major 2 <%out.println(Student_data.getMajor2());%>
Citizenship <%out.println(Student_data.getCitizenship());%>
Funding <%out.println(Student_data.getFunding());%>
Postal Address <%out.println(Student_data.getPostalAddressLine1());%>
<%out.println(Student_data.getPostalAddressLine2());%>
Residential Address <%out.println(Student_data.getResidentialAddressLine1());%>
<%out.println(Student_data.getResidentialAddressLine2());%>
HomePhoneNo <%out.println(Student_data.getHomePhoneNO());%>
MobilePhoneNo <%out.println(Student_data.getMobilePhoneNO());%>

1

88 A.3 The following code describes the StudentInterface.java class. package Student; import org.omg.CORBA.*; import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.PortableServer.*; import java.util.*; import RemoteStudent.*;

public class StudentInterface {

private String message = ""; private RemoteStudentManager student_manager = null; private ORB orb = null;

public StudentInterface() {

}

//Process Request Method public void processRequest(String action, StudentData student_data) { System.out.println(action);

if (action == null) { return; }

if (student_manager == null) { try { // Create and initialize the ORB String args[] = {"-ORBInitialPort","1050"}; ORB orb = ORB.init(args,null); org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef); String name = "StudentManager"; student_manager = RemoteStudentManagerHelper.narrow(ncRef.resolve_str(name));

} catch (Exception e) { System.out.println(e); e.printStackTrace (System.err);

89 } }

if(action.equals("Login")) login(student_data);

if(action.equals("SelectStudent")) selectRegisteredStudent(student_data);

if(action.equals("Save")) UpdateStudentDetails(student_data);

}//end

//Process Request Method public void processRequest(String action, StudentData student_data, EnrollmentData enroll_data) { System.out.println(action);

if (action == null) { return; }

if (student_manager == null) { try { // Create and initialize the ORB String args[] = {"-ORBInitialPort","1050"}; ORB orb = ORB.init(args,null); org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService"); NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef); String name = "StudentManager"; student_manager = RemoteStudentManagerHelper.narrow(ncRef.resolve_str(name));

} catch (Exception e) { System.out.println(e); e.printStackTrace (System.err); } }

if(action.equals("Enroll")) { System.out.println("Enrollment button clicked");

90 EnrollStudent(student_data, enroll_data); }

if(action.equals("Cancel")) { System.out.println("Cancel Button clicked"); cancelEnrollment(); }

if(action.equals("Confirm")) { System.out.println("Confirm button clicked"); insertEnrollment(); }

}//end

//Student Login public void login(StudentData std_data) { System.out.println("Login " + std_data.getStudentID()); String Password;

try { Password = student_manager.login(std_data.getStudentID());

System.out.println(Password); if (Password.equals(std_data.getPassword())) { std_data.setMessage("Success"); }

else std_data.setMessage("Login Failed"); } catch (Exception ex) { System.out.println("Login Module Error"); System.out.println(ex.toString()); std_data.setMessage(ex.toString()); }

}

//Select Regsitered Student public StudentData selectRegisteredStudent(StudentData std_data)

91 { System.out.println("Select Student " + std_data.getStudentID());

try { RemoteStudentData sdata = student_manager.selectRegisteredStudent(std_data.getStudentID()); std_data.setFirstName(sdata.FirstName);

std_data.setTitle(sdata.Title); std_data.setStudentID(sdata.StudentID); std_data.setSurName(sdata.SurName); std_data.setFirstName(sdata.FirstName); std_data.setProgramCode(sdata.ProgramCode); std_data.setProgramName(sdata.ProgramName); std_data.setMajor1(sdata.Major1); std_data.setMajor2(sdata.Major2); std_data.setCampus(sdata.Campus); std_data.setPostalAddressLine1(sdata.PostalAddressLine1); std_data.setPostalAddressLine2(sdata.PostalAddressLine2); std_data.setResidentialAddressLine1(sdata.ResidentialAddressLine1); std_data.setResidentialAddressLine2(sdata.ResidentialAddressLine2); std_data.setHomePhoneNO(sdata.HomePhoneNO); std_data.setMobilePhoneNO(sdata.MobilePhoneNO); std_data.setFunding(sdata.Funding); std_data.setSponsorsName(sdata.SponsorsName); std_data.setCitizenship(sdata.Citizenship); std_data.setPlaceOfBirth(sdata.PlaceOfBirth); std_data.setQualification(sdata.Qualification);

} catch (Exception ex) { System.out.println("selectRegisteredStudent Module Error"); System.out.println(ex.toString()); }

return std_data; }

//Update Student Details public void UpdateStudentDetails(StudentData std_data) { System.out.println("Update Student " + std_data.getStudentID());

RemoteStudentData data = new RemoteStudentData("","","","","","","","","","","","","","","","","","","","","","","","","");

92 data.Title=std_data.getTitle(); data.StudentID=std_data.getStudentID(); data.SurName=std_data.getSurName(); data.FirstName=std_data.getFirstName(); data.ProgramCode=std_data.getProgramCode(); data.ProgramName=std_data.getProgramName(); data.Major1=std_data.getMajor1(); data.Major2=std_data.getMajor2(); data.Campus=std_data.getCampus(); data.PostalAddressLine1=std_data.getPostalAddressLine1(); data.PostalAddressLine2=std_data.getPostalAddressLine2(); data.ResidentialAddressLine1=std_data.getResidentialAddressLine1(); data.ResidentialAddressLine2=std_data.getResidentialAddressLine2(); data.HomePhoneNO=std_data.getHomePhoneNO(); data.MobilePhoneNO=std_data.getMobilePhoneNO(); data.Funding=std_data.getFunding(); data.SponsorsName=std_data.getSponsorsName(); data.Citizenship=std_data.getCitizenship(); data.PlaceOfBirth=std_data.getPlaceOfBirth(); data.Qualification=std_data.getQualification();

try { student_manager.updateStudentDetails(data); std_data.setMessage("Updated"); } catch(Exception ex) { System.out.println(ex.toString()); std_data.setMessage("Updated Failed" + ex.toString()); } }

//Select Student Grades public Vector selectStudentGrade(StudentData std_data) { System.out.println("Select Student Grades" + std_data.getStudentID());

Vector result = new Vector();

try { RemoteGradeData gdata[] = student_manager.selectStudentGrades(std_data.getStudentID());

for (int i=0;i < gdata.length ;i++ ) {

93 GradeData gradedata = new GradeData(std_data.getStudentID(),gdata[i].UnitCode,gdata[i].UnitName,gdata[i].Grade,gdata[i].Cam pus,gdata[i].Term,gdata[i].Year); result.addElement(gradedata); }

return result; } catch (Exception ex) { System.out.println(ex.toString()); std_data.setMessage("Select Student Grades" + ex.toString()); }

return result; }

//Select Program Units public Vector selectProgramUnits(String pcode) { System.out.println("Select Program Units" + pcode);

Vector result = new Vector();

try { RemoteProgramUnitData tdata[] = student_manager.selectProgramUnits(pcode);

for (int i=0;i < tdata.length ;i++ ) { ProgramUnitData pudata = new ProgramUnitData(pcode,tdata[i].UnitCode,tdata[i].UnitName,tdata[i].UnitType); result.addElement(pudata); }

return result; } catch (Exception ex) { System.out.println(ex.toString()); }

return result; }

//Select Time table public Vector selectStudentTimeTable(EnrollmentData edata) {

94 System.out.println("Select Student Time Table" + edata.getStudentID());

System.out.println(edata.getStudentID()); System.out.println(edata.getUnitCode()); System.out.println(edata.getUnitName()); System.out.println(edata.getCampus()); System.out.println(edata.getTerm()); System.out.println(edata.getYear());

RemoteEnrollmentData rdata = new RemoteEnrollmentData(edata.getStudentID(),edata.getUnitCode(),edata.getUnitName(),edata.getCampus (),edata.getTerm(),edata.getYear()); Vector result = new Vector();

try { RemoteTimetableData data[] = student_manager.selectStudentTimeTable(rdata);

for (int i=0;i < data.length ;i++ ) { TimetableData tdata = new TimetableData(data[i].UnitCode,data[i].Campus,data[i].Term,data[i].Day,data[i].Year,data[i].Start Time,data[i].FinishTime,data[i].Delivery,data[i].Venue); result.addElement(tdata); }

}

catch(Exception ex) { System.out.println(ex.toString()); }

return result; }

//Select Student Course Work public Vector selectStudentCourseWork(EnrollmentData endata) { System.out.println("Select Student Time Table" + endata.getStudentID());

RemoteEnrollmentData rdata = new RemoteEnrollmentData(endata.getStudentID(),endata.getUnitCode(),endata.getUnitName(),endata.getCa mpus(),endata.getTerm(),endata.getYear()); Vector result = new Vector();

try {

95 RemoteCourseWorkData data[] = student_manager.selectStudentCourseWork(rdata);

for (int i=0;i < data.length ;i++ ) { CourseWorkData cdata = new CourseWorkData(data[i].StudentID,data[i].UnitCode,data[i].Term,data[i].Campus,data[i].AsessmentTy pe,data[i].FinalMark,data[i].Percent,data[i].StaffID); result.addElement(cdata); }

}

catch(Exception ex) { System.out.println(ex.toString()); }

return result;

}

//Select Students Enrollment units public Vector selectStudentEnrollment(EnrollmentData endata, StudentData sdata) { System.out.println("selectStudentEnrollment" + sdata.StudentID); Vector result = new Vector();

RemoteEnrollmentData redata = new RemoteEnrollmentData("a","a","a","","",""); redata.StudentID = endata.getStudentID(); redata.UnitCode = endata.getUnitCode(); redata.UnitName = endata.getUnitName(); redata.Campus = endata.getCampus(); redata.Term = endata.getTerm(); redata.Year = endata.getYear();

RemoteStudentData rsdata = new RemoteStudentData(); rsdata.ProgramCode = sdata.getProgramCode();

System.out.println(redata.StudentID + " "+ redata.UnitCode + " " + redata.UnitName + " " + redata.Campus + " " + redata.Term+ " "+ sdata.getProgramCode() + " " + redata.Term);

try { RemoteEnrollmentData data[] = student_manager.selectUnitActivated(endata.Campus,endata.Term,"2010",sdata.ProgramCode);

96 for (int i=0;i < data.length ;i++ ) { EnrollmentData edata = new EnrollmentData(sdata.getStudentID(),data[i].UnitCode,data[i].UnitName,data[i].Campus,data[i].Term ,data[i].Year); result.addElement(edata); }

} catch (Exception ex) { System.out.println(ex.toString()); }

return result; }

Vector Enrollment = new Vector();

//Stores Enrollment Data Temporarily public Vector myEnrollment() { return Enrollment; }

//Cancels the Temporary Enrollment public void cancelEnrollment() { Enrollment = new Vector(); }

//Temporarily Stores the Enrollment public void EnrollStudent(StudentData stdata, EnrollmentData endata) { EnrollmentData edata = new EnrollmentData();

edata.setStudentID(stdata.getStudentID()); edata.setUnitCode(endata.getUnitCode()); edata.setTerm(endata.getTerm()); edata.setCampus(endata.getCampus());

try { edata.setUnitName(student_manager.selectUnitName(endata.getUnitCode())); }

catch(Exception ex) {

97 System.out.println(ex.toString()); }

Enrollment.add(edata);

}

//Permanently Enrolls the Students public void insertEnrollment() { Enumeration e = Enrollment.elements();

try { while(e.hasMoreElements()) { EnrollmentData edata = (EnrollmentData) e.nextElement(); RemoteEnrollmentData data = new RemoteEnrollmentData(edata.getStudentID(),edata.getUnitCode(),edata.getUnitName(),edata.getCampus (),edata.getTerm(),"2010"); student_manager.insertEnrollments(data); } } catch (Exception ex) { System.out.println(ex); }

}

public Vector selectStudentEnrollments(StudentData sdata) { System.out.println("selectStudentEnrollment" + sdata.getStudentID()); Vector result = new Vector();

try { RemoteEnrollmentData data[] = student_manager.selectStudentEnrollments(sdata.getStudentID());

for (int i=0;i < data.length ;i++ ) { EnrollmentData edata = new EnrollmentData(sdata.getStudentID(),data[i].UnitCode,data[i].UnitName,data[i].Campus,data[i].Term ,data[i].Year); result.addElement(edata); }

98

} catch (Exception ex) { System.out.println(ex.toString()); }

return result; }

}

A.4 The following code describes the StudentData.java class.

package Student;

public class StudentData extends PersonData { String StudentID; String FathersName; String IndexFSLC; String IndexF7; String ProgramCode; String ProgramName; String Major1; String Major2; String ResidentialAddressLine1; String ResidentialAddressLine2; String HomePhoneNO; String Funding; String SponsorsName; String Citizenship; String PlaceOfBirth; String Qualification; String Password; String Message="";

public StudentData() { }

public StudentData(String ID, String Title, String SurName,

99 String FirstName, String FathersName, String IndexFSLC, String IndexF7, String ProgramCode, String ProgramName, String Major1, String Major2, String Campus, String PostalAddressLine1, String PostalAddressLine2, String ResidentialAddressLine1, String ResidentialAddressLine2, String HomePhoneNO, String MobilePhoneNO, String Funding, String SponsorsName, String Citizenship, String PlaceOfBirth, String Qualification) { this.StudentID = StudentID; this.Title = Title; this.SurName = SurName; this.FirstName = FirstName; this.FathersName = FathersName; this.IndexFSLC = IndexFSLC; this.IndexF7 = IndexF7; this.ProgramCode = ProgramCode; this.ProgramName = ProgramName; this.Major1 = Major1; this.Major2 = Major2; this.Campus = Campus; this.PostalAddressLine1 = PostalAddressLine1; this.PostalAddressLine2 = PostalAddressLine2; this.ResidentialAddressLine1 = ResidentialAddressLine1; this.ResidentialAddressLine2 = ResidentialAddressLine2; this.HomePhoneNO= HomePhoneNO ; this.MobilePhoneNO= MobilePhoneNO ; this.Funding= Funding ; this.SponsorsName= SponsorsName ; this.Citizenship= Citizenship ; this.PlaceOfBirth= PlaceOfBirth ; this.Qualification= Qualification ;

}

public String getStudentID() { return StudentID; }

100 public void setStudentID(String StudentID) { this.StudentID = StudentID; }

public String getFathersName() { return FathersName; } public void setFathersName(String FathersName) { this.FathersName = FathersName; }

public String getIndexFSLC() { return IndexFSLC; } public void setIndexFSLC(String IndexFSLC) { this.IndexFSLC = IndexFSLC; }

public String getIndexF7() { return IndexF7; } public void setIndexF7(String IndexF7) { this.IndexF7 = IndexF7; }

public String getProgramCode() { return ProgramCode; } public void setProgramCode(String ProgramCode) { this.ProgramCode = ProgramCode; }

public String getProgramName() { return ProgramName; } public void setProgramName(String ProgramName) { this.ProgramName = ProgramName; }

public String getMajor1() { return Major1; } public void setMajor1(String Major1) { this.Major1 = Major1; }

public String getMajor2() { return Major2; } public void setMajor2(String Major2) { this.Major2 = Major2; }

public String getResidentialAddressLine1() { return ResidentialAddressLine1; } public void setResidentialAddressLine1(String ResidentialAddressLine1) { this.ResidentialAddressLine1 = ResidentialAddressLine1; }

public String getResidentialAddressLine2() { return ResidentialAddressLine2; } public void setResidentialAddressLine2(String ResidentialAddressLine2) { this.ResidentialAddressLine2 = ResidentialAddressLine2; }

public String getHomePhoneNO() { return HomePhoneNO; } public void setHomePhoneNO(String HomePhoneNO) { this.HomePhoneNO = HomePhoneNO; }

public String getFunding() { return Funding; } public void setFunding(String Funding) { this.Funding = Funding; }

public String getSponsorsName() { return SponsorsName; } public void setSponsorsName(String SponsorsName) { this.SponsorsName = SponsorsName; }

public String getCitizenship() { return Citizenship; } public void setCitizenship(String Citizenship) { this.Citizenship = Citizenship; }

public String getPlaceOfBirth() { return PlaceOfBirth; } public void setPlaceOfBirth(String PlaceOfBirth) { this.PlaceOfBirth = PlaceOfBirth; }

public String getQualification() { return Qualification; }

101 public void setQualification(String Qualification) { this.Qualification = Qualification; }

public String getPassword() { return Password; } public void setPassword(String Password) { this.Password = Password; }

public String getMessage() { return Message; } public void setMessage(String Message) { this.Message = Message; } }

A.5 The following code describes the EnrollmentData.java class. package Student; public class EnrollmentData { String StudentID; String UnitCode; String UnitName; String Campus; String Term; String Year; public EnrollmentData() { } public EnrollmentData(String StudentID, String UnitCode, String UnitName, String Campus, String Term, String Year) { this.StudentID= StudentID ; this.UnitCode= UnitCode ; this.UnitName= UnitName ; this.Campus= Campus ; this.Term= Term ; this.Year= Year ; } public String getStudentID() { return StudentID; } public void setStudentID(String StudentID) { this.StudentID = StudentID; }

102 public String getUnitCode() { return UnitCode; } public void setUnitCode(String UnitCode) { this.UnitCode = UnitCode; } public String getUnitName() { return UnitName; } public void setUnitName(String UnitName) { this.UnitName = UnitName; } public String getCampus() { return Campus; } public void setCampus(String Campus) { this.Campus = Campus; } public String getTerm() { return Term; } public void setTerm(String Term) { this.Term = Term; } public String getYear() { return Year; } public void setYear(String Year) { this.Year = Year; }

}

A.6 The following code describes the GradeData.java class. package Student; public class GradeData { String StudentID; String UnitCode; String UnitName; String Grade; String Campus; String Term; String Year; public GradeData() { } public GradeData(String StudentID, String UnitCode, String UnitName, String Grade, String Campus, String Term, String Year) { this.StudentID= StudentID; this.UnitCode=UnitCode; this.UnitName=UnitName;

103 this.Grade=Grade; this.Campus=Campus; this.Term=Term; this.Year=Year; } public String getStudentID() { return StudentID; } public void setStudentID(String StudentID) { this.StudentID = StudentID; } public String getUnitCode() { return UnitCode; } public void setUnitCode(String UnitCode) { this.UnitCode = UnitCode; } public String getUnitName() { return UnitName; } public void setUnitName(String UnitName) { this.UnitName = UnitName; } public String getGrade() { return Grade; } public void setGrade(String Grade) { this.Grade = Grade; } public String getCampus() { return Campus; } public void setCampus(String Campus) { this.Campus = Campus; } public String getTerm() { return Term; } public void setTerm(String Term) { this.Term = Term; } public String getYear() { return Year; } public void setYear(String Year) { this.Year = Year; }

}

A.7 The following code describes the RemoteStudentManagerImp.java class.

//Bimal Aklesh Kumar //Remote Student Manager - FNU-CIS (Masters thesis) import RemoteStudent.*; import org.omg.CORBA.*; import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.PortableServer.*; import java.sql.ResultSet; import java.util.*; public class RemoteStudentManagerImp extends RemoteStudentManagerPOA {

104 private ORB orb; private POA poa;

public RemoteStudentManagerImp(ORB orb, POA poa) { this.orb = orb; this.poa = poa;

}

//Student Login public synchronized String login(String ID) throws ServerError { System.out.println("Login" + ID); String Password = "N/A";

try {

ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT * FROM StudentPassword WHERE StudentID = '"+ID+"'");

if (rs.next()) { Password = rs.getString("Password"); } } catch(Exception e) { System.out.println("Login Module Error" + e); throw new ServerError(e.toString());

}

return Password; }

//Select Details of Registered Student public synchronized RemoteStudentData selectRegisteredStudent(String ID) throws ServerError { RemoteStudentData Std_data = new RemoteStudentData("N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A"," N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A");

System.out.println("selectRegisteredStudent " + ID);

try {

105

ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT * FROM StudentRegistered WHERE StudentID = '"+ID+"'");

if (rs.next()) { Std_data.Title = rs.getString("Title"); Std_data.StudentID= rs.getString("StudentID"); Std_data.SurName= rs.getString("LastName"); Std_data.FirstName= rs.getString("FirstName"); Std_data.ProgramCode= rs.getString("ProgramCode"); Std_data.ProgramName= rs.getString("ProgramName"); Std_data.Major1= rs.getString("Major1"); Std_data.Major2=rs.getString("Major2"); Std_data.Campus=rs.getString("Campus"); Std_data.PostalAddressLine1=rs.getString("PostalAddressLine1"); Std_data.PostalAddressLine2=rs.getString("PostalAddressLine2");

Std_data.ResidentialAddressLine1=rs.getString("ResidentialAddressLine1");

Std_data.ResidentialAddressLine2=rs.getString("ResidentialAddressLine2"); Std_data.HomePhoneNO=rs.getString("HomePhoneNo"); Std_data.MobilePhoneNO=rs.getString("MobilePhoneNo"); Std_data.Funding=rs.getString("Funding"); Std_data.SponsorsName=rs.getString("SponsorsName"); Std_data.Citizenship=rs.getString("Citizenship"); Std_data.PlaceOfBirth=rs.getString("PlaceOfBirth"); Std_data.Qualification=rs.getString("Qualification");

}

} catch(Exception e) { System.out.println("Select Student Module Error" + e); throw new ServerError(e.toString()); }

return Std_data; }

//Update Student Details public synchronized void updateStudentDetails(RemoteStudentData data) throws ServerError {

System.out.println("updateStudentDetails " + data.StudentID);

106 try { MySQLConn.getInstance().execute("update studentRegistered set " + "PostalAddressLine1 =" + "'" + data.PostalAddressLine1 +"'," + "PostalAddressLine2 =" + "'" + data.PostalAddressLine2 +"'," + "ResidentialAddressLine1 =" + "'" + data.ResidentialAddressLine1 +"'," + "ResidentialAddressLine2 =" + "'" + data.ResidentialAddressLine2 +"'," + "HomePhoneNo =" + "'" + data.HomePhoneNO +"'," + "MobilePhoneNo =" + "'" + data.MobilePhoneNO +"'" +

"where StudentId= " +"'" + data.StudentID + "'" ); }

catch (Exception ex) { System.out.println("Update Student Module Error" + ex); throw new ServerError(ex.toString()); }

} //Select UnitName public synchronized String selectUnitName(String UnitCode) throws ServerError { String description = "";

try { ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT UnitName from UnitDescription where UnitCode = '"+ UnitCode +"'");

if(rs.next()) description = rs.getString("UnitName"); } catch(Exception ex) { System.out.println("Select Unit Name Module Error" + ex); throw new ServerError(ex.toString()); }

return description; }

//Select Student Grades public synchronized RemoteGradeData[] selectStudentGrades(String ID) throws ServerError { System.out.println("selectStudentGrades " + ID); RemoteGradeData[] grades = new RemoteGradeData[50];

107 try { ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT * FROM StudentGrade WHERE StudentID = '"+ID+"'");

Vector result = new Vector();

while (rs.next()) { String StudentID=rs.getString("StudentID"); String UnitCode=rs.getString("UnitCode"); String UnitName=rs.getString("UnitName"); String Grade=rs.getString("Grade"); String Campus=rs.getString("Campus"); String Term=rs.getString("Term"); String Year=rs.getString("Year");

result.addElement(new RemoteGradeData(StudentID,UnitCode,UnitName,Grade,Campus,Term,Year)); }

grades = new RemoteGradeData[result.size()]; Enumeration e = result.elements(); int i = 0;

while(e.hasMoreElements()) { grades[i++] = (RemoteGradeData)e.nextElement(); }

} catch(Exception ex) { System.out.println("Select Student Grade Module Error" + ex); throw new ServerError(ex.toString()); } return grades; }

//Select units in a program public synchronized RemoteProgramUnitData[] selectProgramUnits(String pcode)throws ServerError { System.out.println("selectProgramUnits " + pcode); RemoteProgramUnitData[] punits = new RemoteProgramUnitData[50]; Vector result = new Vector(); try {

108 ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT ProgramUnit.UnitCode, UnitDescription.UnitName, ProgramUnit.UnitType FROM ProgramUnit, UnitDescription WHERE ProgramUnit.UnitCode=UnitDescription.UnitCode And ProgramUnit.ProgramCode= '"+pcode+"'");

while (rs.next()) { String UnitCode=rs.getString("UnitCode"); String UnitName=rs.getString("UnitName"); String UnitType=rs.getString("UnitType"); result.addElement(new RemoteProgramUnitData("",UnitCode,UnitName,UnitType)); }

punits = new RemoteProgramUnitData[result.size()];

Enumeration e = result.elements(); int i = 0; while(e.hasMoreElements()) { punits[i++] = (RemoteProgramUnitData)e.nextElement(); }

} catch(Exception ex) { System.out.println("Select Program units Module Error" + ex); throw new ServerError(ex.toString()); } return punits; }

//Select Students Timetable public synchronized RemoteTimetableData[] selectStudentTimeTable(RemoteEnrollmentData data)throws ServerError { System.out.println("selectTimetable " + data.StudentID); RemoteTimetableData[] ttable = new RemoteTimetableData[50]; Vector result = new Vector();

try { ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT * from ClassTimeTable");

while (rs.next()) { String UnitCode= rs.getString("UnitCode");

109 String Campus= rs.getString("Campus"); String Term= rs.getString("Term"); String Day= rs.getString("Day"); String Year= rs.getString("Year"); String StartTime= rs.getString("StartTime"); String FinishTime= rs.getString("FinishTime"); String Delivery= rs.getString("Delivery"); String Venue= rs.getString("Venue"); result.addElement(new RemoteTimetableData(UnitCode,Campus,Term,Day,Year,StartTime,FinishTime,Delivery,Venue)); }

ttable = new RemoteTimetableData[result.size()];

Enumeration e = result.elements(); int i = 0; while(e.hasMoreElements()) { ttable[i++] = (RemoteTimetableData)e.nextElement(); } } catch(Exception ex) { System.out.println("Select Time Table Module Error" + ex); throw new ServerError(ex.toString()); } return ttable; }

//Select Student Course Work public synchronized RemoteCourseWorkData[] selectStudentCourseWork(RemoteEnrollmentData data)throws ServerError { System.out.println("selectUnitActivated "); RemoteCourseWorkData[] cwdata = new RemoteCourseWorkData[50]; Vector result = new Vector();

try { ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT * from CourseWork where StudentID='" + data.StudentID +"'" + "and Term = 'Trimester 1' and UnitCode=" + "'" + data.UnitCode + "'");

while (rs.next()) { String StudentID=rs.getString("StudentID"); String UnitCode=rs.getString("UnitCode"); String Term=rs.getString("Term");

110 String AsessmentType=rs.getString("AsessmentType"); int FinalMark=rs.getInt("FinalMark"); int Percent=rs.getInt("Percent");

result.add(new RemoteCourseWorkData(StudentID,UnitCode,Term,"",AsessmentType,FinalMark,Percent,""));

}

cwdata = new RemoteCourseWorkData[result.size()];

Enumeration e = result.elements(); int i = 0; while(e.hasMoreElements()) { cwdata[i++] = (RemoteCourseWorkData)e.nextElement(); } } catch(Exception ex) { System.out.println("Select Course Work Module Error" + ex); throw new ServerError(ex.toString());

}

return cwdata; }

//Select Students Enrollment Units public synchronized RemoteEnrollmentData[] selectUnitActivated(String Campus,String Term,String Year,String PCode)throws ServerError {

System.out.println("selectUnitActivated "); RemoteEnrollmentData[] endata = new RemoteEnrollmentData[50]; Vector result = new Vector();

try { ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT unitactivated.unitcode, unitname,Campus,Term,Year from UnitActivated,ProgramUnit" + " where unitactivated.unitcode = programunit.unitcode and Campus = '"+Campus+"'" +" and Term = '"+Term+"'" + " and programunit.programcode= '"+ PCode+"'" );

while (rs.next()) {

111 String MyUnitCode= rs.getString("UnitCode"); String MyUnitName= rs.getString("UnitName"); String MyCampus= rs.getString("Campus"); String MyTerm= rs.getString("Term"); String MyYear= rs.getString("Year");

result.addElement(new RemoteEnrollmentData("23",MyUnitCode,MyUnitName,MyCampus,MyTerm,MyYear)); }

endata = new RemoteEnrollmentData[result.size()];

Enumeration e = result.elements(); int i = 0;

while(e.hasMoreElements()) { endata[i++] = (RemoteEnrollmentData)e.nextElement(); } }

catch(Exception ex) { System.out.println("Select Unit Activated Module Error" + ex); throw new ServerError(ex.toString());

}

return endata; }

//Inserts new enrollment public void insertEnrollments(RemoteEnrollmentData data)throws ServerError { System.out.println("insertEnrollments"); try { MySQLConn.getInstance().execute("insert into StudentEnrollment(StudentId,UnitCode,UnitName,Campus,Term) values (" + "'"+data.StudentID+"',"+ "'"+data.UnitCode+"',"+ "'"+data.UnitName+"',"+ "'"+data.Campus+"',"+ "'"+data.Term+"'" +")" ); }

112 catch(Exception ex) { System.out.println("Select Unit Activated Module Error" + ex); throw new ServerError(ex.toString());

}

}

//Select student Enrollments public RemoteEnrollmentData[] selectStudentEnrollments(String StudentID)throws ServerError { System.out.println("selectStudentEnrollments"); RemoteEnrollmentData[] endata = new RemoteEnrollmentData[50]; Vector result = new Vector();

try { ResultSet rs = MySQLConn.getInstance().executeQuery("SELECT UnitCode,UnitName,Campus,Term from StudentEnrollment ");

while (rs.next()) { RemoteEnrollmentData data = new RemoteEnrollmentData(); String UnitCode= rs.getString("UnitCode"); String UnitName= rs.getString("UnitName"); String Campus= rs.getString("Campus"); String Term= rs.getString("Term"); result.addElement(new RemoteEnrollmentData(StudentID,UnitCode,UnitName,Campus,Term,"2010")); }

endata = new RemoteEnrollmentData[result.size()];

Enumeration e = result.elements(); int i = 0;

while(e.hasMoreElements()) { endata[i++] = (RemoteEnrollmentData)e.nextElement(); } }

catch(Exception ex) { System.out.println("Select Student Enrollment Error" + ex); throw new ServerError(ex.toString());

113 }

return endata; }

}

A.8 The following code describes the RemoteStudentServer.java class

import RemoteStudent.*; import org.omg.CORBA.*; import org.omg.CosNaming.*; import org.omg.CosNaming.NamingContextPackage.*; import org.omg.PortableServer.*;

import java.util.Properties;

/** * * @author Sys admin */ public class RemoteStudentServer {

public static void main(String[] args) {

try { // Create and initialize the ORB args = new String [] {"-ORBInitialPort","1050"}; ORB orb = ORB.init(args, null);

// Get the root naming context org.omg.CORBA.Object ns_ref = orb.resolve_initial_references ("NameService");

// Use NamingContextExt which is part of the Interoperable // Naming Service specification. NamingContextExt ncRef = NamingContextExtHelper.narrow (ns_ref);

// Get reference to rootpoa & activate the POAManager POA rootpoa = POAHelper.narrow (orb.resolve_initial_references ("RootPOA")); rootpoa.the_POAManager().activate();

// Create Servant RemoteStudentManagerImp servant = new RemoteStudentManagerImp (orb, rootpoa);

// Get the corresponding obj ref. org.omg.CORBA.Object obj_ref = rootpoa.servant_to_reference (servant);

// Narrow to the RemoteCustomerManager interface. RemoteStudentManager std = RemoteStudentManagerHelper.narrow (obj_ref);

// Put into the name server. String name = "StudentManager"; NameComponent[] path = ncRef.to_name (name); ncRef.rebind (path, std);

// Connect to database MySQLConn.getInstance().connect();

// Wait for invocations from clients System.out.println ("Student server launched, ready, and waiting on clients..."); orb.run();

114

} catch (Exception e){ System.err.println("ERROR: " + e); e.printStackTrace(System.out); } }

}

A.9 The following code describes the MySQLConn.java class

import java.sql.*; public class MySQLConn {

protected boolean connected = false; private Connection con;

private String driverName = "sun.jdbc.odbc.JdbcOdbcDriver"; private String dbName = "jdbc:odbc:FNU";

private static MySQLConn instance = new MySQLConn(); // shared DB instance // Ok if don't need transactions & auto-commit enabled

public MySQLConn() {

}

public static MySQLConn getInstance() { return instance; }

public void connect() throws Exception // connect to MySQL database server { if(connected) return; else { Class.forName(driverName); con = DriverManager.getConnection(dbName); con.setAutoCommit(true); connected = true; } }

public void disconnect() throws Exception // disconnect from MySQL database server { con.close(); connected = false; }

public boolean isConnected() { return connected; }

public synchronized void execute(String sql) throws Exception {

115 Statement stmt = con.createStatement(); System.out.println(sql); stmt.execute(sql); }

public synchronized ResultSet executeQuery(String sql) throws Exception { Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(sql); return rs; } public synchronized void setAutoCommit(boolean status) throws Exception { con.setAutoCommit(status); }

public synchronized void commit() throws Exception // commit updates to database { con.commit(); }

public synchronized void rollback() throws Exception // undo all updates since last commit { con.rollback(); }

}

116 Appendix B

FNU-CIS Screen Dumps

In this section we provide the selected screen dumps of FNU-CIS and explain how users interact with our system.

B. 1 FNU-CIS Login Web Page

The user provides user name and password, it is send for verification if verification is successful the user is directed to the main page. Students are directed to student home page and staffs are directed to staff homepage. The student homepage has options such as student profile, program details, graduation, enrollment, timetable, transcripts, coursework, class shares and finance. Staff homepage includes option such as staff profile, enrollment, student details, course work and class list.

117 B. 2 Student Details Web Page

The web page displays student personal details and allows option to update phone numbers and addresses.

B.3 FNU-CIS Program Details Web Page

The program details page displays the units the student is expected to complete in required programs of study.

118 B.4 FNU-CIS Program Details Web Page

The graduation details web page allows the student to apply for the graduation

B.5 FNU-CIS Enrollment Web Page

The enrollment web page allows students to select units and register. The students select the campus and term of study the system displays the list of units where students can select and register in these units.

119 B.6 FNU-CIS Transcripts Web Page

The transcripts web page displays the units students have completed and corresponding grades.

B.7 FNU-CIS Staff Profile Web Page

The staff profile web page displays staff details.

120 B.8 FNU-CIS Student Details Web Page

Staff can enter student id number and view complete student details.

B.9 FNU-CIS Student Details Web Page

Staff can view the new applications and approve applications online based on the merit.

121