STUDENT MANAGEMENT SYSTEM (SMS) FOR KOLEJ KOMUNITI IN MESINIAGA ANDARIAN KITIKAN UNIVERSITI TEKNOLOGI MALAYSIA STUDENT MANAGEMENT SYSTEM (SMS) FOR KOLEJ KOMUNITI IN MESINIAGA ANDARIAN KITIKAN A project report is submitted in partial fulfillment of the requirement for the award of the degree of MSc. (Computer Science - Real Time Software Engineering) Centre for Advanced Software Engineering Faculty of Computer Science and Information System Universiti Teknologi Malaysia APRIL 2009 iii DEDICATION To my beloved mother and father iv ACKNOWLEDGEMENT All good inspirations, devotions, expressions and prayers are to God whose blessing and guidance have helped me through this entire project. First and foremost, I would like to convey my deepest appreciation to all my lecturers for their guidance, commitment and dedication. Without them, I would not be able to succeed in this course. My heartiest thank and appreciation goes to my final year Academic Mentor, Dr. Suhaimi Ibrahim, for his support, suggestions and advises upon completing this paper. I would like to express my gratitude to my Industrial Mentor, Mr Asri Ahmad, for his ideas, advices, guidance and encouragement in completing this project. My sincere appreciation also extends to my Manager, Mr. Sharidzaly Busu and all my colleagues who have provided assistance at various occasions. Last but not least, special thanks to my beloved parent for their moral and spiritual support. May they, be always well and happy. v ABSTRACT The aim of this project is to develop a web based Student Management System (SMS) for Kolej Komuniti attachment program in Mesiniaga Bhd. This system will help Mesiniaga to administer student’s related information in efficient manner. Among the main functionality of the system are managing records such as student details, subject list and semester schedule. It also enables the student to view necessary information such as subject list and online result. Software engineering methodology has been applied for entire development of the system. This includes adopting Waterfall Model as a software process and using Object Oriented Analysis and Design (OOAD) as a software technique. Both system requirements specification and system design have been carefully studied and documented using guidelines from Department of Defense (DoD), specifically, MIL-498. Ultimately, the system has been implemented using sophisticated Java web framework namely Apache Struts 2 with other emerging technology such as Apache Tiles 2, Java Persistence API (JPA) and Hibernate. vi ABSTRAK Tujuan project in dijalankan adalah untuk membangunkan Sistem Pengurusan Pelajar (SMS) berteraskan internet untuk program Kolej Komuniti yang dikelola oleh Mesiniaga Bhd. Sistem ini akan membantu Mesiniaga untuk menguruskan rekod yang berkenaan dengan pelajar secara teratur dan cekap. Antara fungsi sistem ini adalah menguruskan rekod seperti perincian pelajar, matapelajaran dan jadual semester. Sistem ini juga akan membolehkan pelajar menyemak data penting seperti senarai matapelajaran dan keputusan peperikaan. Tatacara dalam Kejuruteraan Perisian telah diaplikasikan dalam keseluruhan pembangunan sistem ini. Ini termasuklah mengambil Waterfall Model sebagai proses pembangunan perisian dan analisa berasaskan objek dan rekabentuk (OOAD) sebagai teknik pembangunan perisian. Perincian tentang kehendak dan rekabentuk sistem telah dipelajari secara berhati-hati dan telah di ditulis mengunakan tatacara yang dikeluarkan oleh Department of Defense (DoD), iaitu MIL-498. Akhir sekali, sistem ini telah di reka dengan menggunakan teknologi berasaskan Java iaitu Apache Struts 2 bersama dengan teknologi lain yang semakin popular seperti Apache Tiles 2, Java Persistence API (JPA) dan Hibernate. vii TABLE OF CONTENTS CHAPTER 1 2 TITLE PAGE DECLARATION ii DEDICATION iii ACKNOWLEDGEMENT iv ABSTRACT v ABSTRAK vi TABLE OF CONTENTS vii LIST OF TABLES xi LIST OF FIGURES xii LIST OF APPENDICES xiv ABBREVIATIONS xv PROJECT OVERVIEW 1 1.1 Introduction 1 1.2 Company Profile 2 1.3 Project Background 3 1.4 Project Objectives 4 1.5 Project Scopes 4 1.6 Project Deliverables 5 1.7 Project Schedule 5 1.8 Organization of Thesis 6 LITERATURE REVIEW 7 2.1 Introduction 7 2.2 Project Review 7 2.2.1 8 About Kolej Komuniti viii 2.3 2.4 2.5 3 2.2.2 About WBL Program 2.2.3 Overview of the System to be Developed 8 10 Study of Existing Web Application Architecture 12 2.3.1 Three-Tier Architecture 13 2.3.2 Model-View-Controller Architecture 15 2.3.3 Presentation-Abstraction-Control Architecture 16 2.3.4 Summary of Web Architecture 18 Software Development Methodology Review 19 2.4.1 Software Development Process Model 19 2.4.1.1 Waterfall Model 20 2.4.1.2 Rational Unified Process 23 2.4.1.3 Agile Model 25 2.4.1.4 Summary of Software Process Model 27 2.4.2 Software Techniques 29 2.4.3 Software Model 29 2.4.4 Software Tools 30 2.4.4.1 Rational Rose Software 31 2.4.4.2 Netbean IDE 32 2.4.4.3 MySQL Server 33 2.4.4.4 Apache Tomcat Server 34 Technology Stack in Java Web Application development 35 2.4.1 Java Web Development Framework 36 2.4.1.1 Java Servlet 37 2.4.1.2 JSP 37 2.4.1.3 Apache Struts 2 Framework 38 2.4.1.4 JPA and Hibernate 43 2.4.1.5 Apache Tiles 45 2.4.1.6 Summary of Java Web Framework 46 PROJECT METHODOLOGY 47 3.1 Introduction 47 3.2 Project Development Strategy 48 3.2.1 49 Operational Framework ix 3.3 4 Problem Solving Methodology 50 3.4.1 Software Process 51 3.4.1.1 Requirement Analysis 52 3.4.1.2 Software Design 53 3.4.1.3 Coding and Debugging 54 3.4.1.4 Integration and system testing 55 3.4.1.5 Operation and Maintenance 55 3.4.2 Software Standard 55 3.4.3 Software Model 56 3.4.4 Software Technique 57 3.4.5 Software Tools 57 PROJECT DISCUSSION 59 4.1 Introduction 59 4.2 System Requirement Analysis 60 4.2.1 Requirement Gathering 60 4.2.2 Use Case Model 61 4.2.3 Object and Class Identification 61 4.2.4 Sequence Diagram 63 4.2.5 Collaboration Diagram 64 4.2.6 Activity Diagram 64 4.2.7 Class Diagram 65 4.2.8 Requirement Artifact Documentation 66 4.3 4.4 Software Design 67 4.3.1 Preliminary Design 67 4.3.2 Detail Design 70 4.3.3 Database Design 70 4.3.4 Design Artifact Documentation 72 Implementation 73 4.4.1 Project Setup 73 4.4.2 Coding and Debuging 74 4.4.2.1 View Layer Implementation 74 4.4.2.2 Controller Layer Implementation 75 x 5 4.4.2.3 Model Layer Implementation 76 4.4.2.4 JPA/Hibernate Implementation 77 4.4.2.5 Tiles Implementation 79 4.4.2.6 SMS Application Screen Capture 79 CONCLUSION 81 5.1 Introduction 81 5.2 Objective Achievement 81 5.3 Experience Gained 82 5.4 Future Recommendation 83 REFERENCES Appendix A - E 84 89 - 93 xi LIST OF TABLES TABLE TITLE PAGE 2.1 Web Architecture Summary 18 2.2 Software Process Summary 28 4.1 AdminRecord Table 71 4.2 StudentRecord Table 71 4.3 ResultRecord Table 71 4.4 ScheduleRecord Table 72 4.5 SubjectRecord Table 72 4.6 Parts of Traceability table 73 xii LIST OF FIGURES FIGURES TITLE PAGE 2.1 List of Subject 9 2.3 Three-Tier Architecture 14 2.4 MVC architecture 16 2.5 MVC used in Java 16 2.6 PAC Architect 17 2.7 Waterfall Model 22 2.8 RUP Model 24 2.9 Agile Model 27 2.10 Java Web Technology Stack 36 2.11 MVC Component of Struts 2 39 2.12 Struts 2 Architecture 40 2.13 Struts 2 Request Life Cycle 41 2.14 OGNL Mechanism in Struts 2 43 2.15 Reuse Component in Tiles 45 3.1 Project Development Strategy 48 3.2 Problem Solving Methodology 51 4.1 Use Case Diagram 62 4.2 Sequence Diagram 63 4.3 Collaboration Diagram 64 4.4 Activity Diagram 65 4.5 Class Diagram 66 4.6 SMS System Architecture 68 xiii 4.7 State Chart Diagram 69 4.8 SMS Dynamic Diagram 70 4.9 View Layer in JSP 75 4.10 Controller Layer in XML 76 4.11 Action Class 77 4.12 PersistenceService in JPA/Hibernate 78 4.13 Entity in JPA/Hibernate 78 4.14 Tiles XML file 79 4.15 Screen Capture of Login 80 4.16 Screen Capture of Subject Form 80 4.17 Screen Capture of Subject List 80 xiv LIST OF APPENDICES APPENDIX TITLE PAGE Appendix A Project Schedule 89 Appendix B Sequence Diagram for SMS 90 Appendix C Collaboration Diagram for SMS 91 Appendix D Activity Diagram for SMS 92 Appendix E Class Diagram for SMS 93 xv ABBREVIATIONS AJAX - Asynchronous Java Script and XML API - Application Programming Interface CRC - Class-Responsibility-Collaboration CRUD - Create-Read-Update-Delete CSC - Computer Software Component CSS - Cascade Style Sheets CSU - Computer Software Unit DoD - Department of Defense eLMS - E-Learning Management System HTML - Hypertext Markup Language HTTP - Hypertext Transfer Protocol IS - Information System IT - Information Technology JPA - Java Persistence API JSP - JavaServer Pages MMS - Maintenance and Manage Services MoHE - Ministry of Higher Education MVC - Model View Controller NEP - New Economic Policy OGNL - Object-Graph Navigational Language OOP - Object Oriented Programming ORM - Object to Relational Mapping PAC - Presentation Abstraction Control POJO - Plain Old Java Object xvi RUP - Rational Unified Process SDD - Software Design Document SDLC - System Development Life Cycle SDM - Software Development Methodology SRS - Software Requirement Specification UI - User Interface (UI) UML - Unified Modeling Language URL - Uniform Resource Locator UTM - Universiti Teknologi Malaysia WBL - Work Based Learning XML - Extensible Markup Language XP - Extreme Programming CHAPTER 1 PROJECT OVERVIEW 1.1 Introduction Student management system has become important factors in modern education field. This system should help the institutional to streamline the administrative task and provide real-time access to the data. Building this system in web based interface will further help the ease of accessibility through any web browser. This chapter will provide a brief understanding about the company’s profile where the project has been executed and the current problem that they face in managing student information. The study findings enable the definition of the project problem statement, its objectives, scopes and advantages of the student management system. This chapter will also cover the project plan and deliverables. The brief understanding about the organization of the thesis will be discussed towards the end of the chapter. 2 1.2 Company Profile This project was done at Mesiniaga Bhd, one of the leading Information Technology (IT) Company in Malaysia. Mesiniaga Bhd was formed on December 17, 1981 with paid-up capital of RM 500,000. It was helmed by Ismail Sulaiman, formerly General Manager of IBM Malaysia, together with a team of senior ex-IBM personnel. In the early 70's, IBM was looking for ways to respond to Malaysia's New Economic Policy (NEP), to increase Bumiputera participation towards the growth of the Malaysian economy. As a result Mesiniaga has been appointed as a Bumiputera company that would serve as IBM's sole dealer and agent in Malaysia. Today, Mesiniaga has emerged as one of the leading, local IT companies in the country with more than 700 staff. It has evolved from a hardware vendor and has become a one-stop IT solutions provider. The company’s current portfolio ranges from planning and development to full implementation, system documentation, user education and assistance, systems and network management and system maintenance. Mesiniaga represents IBM, and several blue chip industry names like Avaya, Cisco Systems, Lotus, Microsoft, Tivoli and others. Mesiniaga has various departments that tackle specific business area. Mesiniaga Academy has been form under one of it’s the department namely Maintenance and Managed Services (MMS). This is one of the contributions of the company to gives its full support to government initiatives in alleviating graduate unemployment issue. The academy’s main objective is to offer student in IT a chance to have work experience while undergoing comprehensive trainings in management and technical skills. In 2007, Mesiniaga has been selected by Department of Polytechnic and Community College, Ministry of Higher Education (MoHE) to manage, organize and implement a Work Based Learning (WBL) concept for Community College student. 3 Briefly, in WBL concept, students will have to complete 80% of total learning time in Workshop and on-job training. The other 20% of learning time will come from the theory. The learning time in theory is calculated based on lecturers, assignments, brainstorming and presentation. For workshops, the learning time is calculated based on Hands-On Lab and Project Assignment. 1.3 Project Background In conjunction with the appointment of Mesiniaga Bhd by MoHE to carry out the WBL program, the company need to provide a proper student management system. Previously there is no proper system to manage the student information. The program documentation and record has been compiled in spread sheet format and not centralized. The information is not easily accessible either by the student or staff. The records become difficult to manage after the program has been running for more than a year. Among the data that need to manage properly are student records, subject list, student grades and program schedule. The WBL program manager, Mr Asri Ahmad has requested to build a web based student management system that has a capacity to manage the necessary record. The student has undertaken this challenge to help the company to build the SMS subsystem. According to the discussion with the program manager the system should capable to manage student profiles, manages subject, provide online student grades and publish the program schedule. 4 1.4 Project Objectives The main objective of this project is to develop a Student Management System (SMS) for Kolej Komuniti in Mesiniaga Bhd under the Work Based Learning (WBL) program. Following is the details of the project objective to archive: • To study and understand the Struts 2 Framework and its Model-ViewController (MVC) architecture. • To study and analyze the requirement specifications of the Student Management System of the Kolej Komuniti. • To produce the SRS of the Student Management System • To produce the SDD of the Student Management System • To develop the prototype of Student Management System using Struts 2 architecture 1.5 Project Scopes The project scopes define the description of the work that required in delivering the student management system. Following are the scopes of work during the course of this project: • Study and understand the requirement of this project. • Construct Software Requirement and Specification (SRS) document of the SMS. • Construct Software Design Document (SDD) of the SMS. • Build prototype of the SMS using Struts 2 Framework. 5 1.6 Project Deliverables The main deliverables of this project will be the complete software system and the standard software engineering documents that include • Software Requirement and Specification (SRS) • Software Design Document (SDD) • Code The software engineering documents will be constructed in accordance with the Department of Defense (DoD), MIL- 498. 1.7 Project Schedule The project has been planned to complete in a period of 5 months in accordance with the schedule of industrial attachment requirement by UTM. Each task is predicted to be performed timely and any obstacles will delay the project. The detailed of the plan in chart format can be referred in Appendix A. The project has been divided into few phases as follows: • Initial study. The first two weeks is dedicated to study the background of the project and proposed the objective and scope to Industrial Mentor. • Literature Review. The background of the project will be studied, software engineering methodology and java web framework will be review in this phase. • Software Process. This phase consists of few activities such system requirement analysis, software design, coding and debugging. • Documentation. The documentation comprising SRS, SDD and thesis will be prepared occasionally and completed at the end of Industrial Attachment phase. 6 1.8 Organization of Thesis This section describes the contents of thesis and explains how the thesis is organized. This thesis is organized into five chapters as follows. • Chapter 1: Project Overview. This chapter explains the company background, project background, project objective and scopes, deliverables, planning, and organization structure. • Chapter 2: Literature Review. This chapter discusses literature review that can give the implementer some guidance. Review of project background, software engineering methodology and Java web framework will be discuss. • Chapter 3: Project Methodology. This chapter discusses the project strategy and problem solving methodology used during the course of project. • Chapter 4: Project Discussion. This chapter discusses the implementation phase of project. • Chapter 5: Conclusion. This chapter concludes the project findings, explain the experience gained during establishment the project and describes the future recommendation. • References. • Appendices. CHAPTER 2 LITERATURE REVIEW 2.1 Introduction This literature review indicates the research innovative and interesting exploration of the research idea that related to the project. It is important element that covers the relevant knowledge to help in project implementation. The literature review begins with the project understanding, followed by development methodology, software process and models. Software Technique, tools and related framework will also be discuss. 2.2 Project Review The project idea comes from the manager of WBL program, En Asri which also plays a role as Industrial Mentor. The needs of proper student management for WBL program arise when Mesiniaga Bhd has been appointed by MoHE to carry out the WBL program. The UTM Student has taken the challenge to build the system systematically using technique that learned during course in UTM. The system 8 should capable to manage student profiles, manages subject, provide online student grades and publish the program schedule. The system should be accessible by student and staff anytime and anywhere without additional software to install on their computer. From this requirement, the system should be built in web based environment. For the sake of better understanding on the whole system requirement the following section will discuss a brief about Kolej Komuniti and WBL program. The project is specially tailored to meet the WBL program requirement. 2.2.1 About Kolej Komuniti Kolej komuniti has been established under the ministry of higher education. Every student from this college will be required to undergo industrial attachment for the period of one year. Several industry players have been appointed by the Malaysian government to carryout the attachment program which called WBL program. The following sub section will further discuss the WBL program. 2.2.2 About WBL Program In 2007, Mesiniaga has been selected by Department of Polytechnic and Community College, Ministry of Higher Education (MoHE) to manage, organize and implement a Work Based Learning (WBL) concept for Kolej Komuniti student. In this program, student will be selected from the field of Diploma in Computer Technology. Currently, there are 2 intakes in one year and the total of student will be ranging from 15 to 35 in one intake. 9 Under this program, student will undergo 1 year of industrial training which divided into 2 semesters. The students will have to complete 80% of total learning time in Workshop and on-job training. The other 20% of learning time will come from the theory. The learning time in theory is calculated based on lecturers, assignments, brainstorming and presentation. For workshops, the learning time is calculated based on Hands-On Lab and Project Assignment. As the name suggest, this program is more to work based learning (WBL) concept. There are total of 7 subjects to be completed within two semesters in Mesiniaga Bhd. In first semester, student will have to complete 3 subjects and another 4 subjects in second semester. The selection of subjects and syllabus will change according to the trends in industrial demand. This program will help the student to prepared for real work environment. Figure 2.0 illustrate the list of subject within 2 semesters. Figure 2.1 : List of Subject 10 2.2.3 Overview of the System to be Developed Previously there is no proper system to manage the student information. The program documentation and record has been compiled in spread sheet format and not centralized. The information is not easily accessible either by the student or staff. The records become difficult to manage after the program has been running for more than a year. Among the data that need to manage properly are student records, subject list, student grades and program schedule. While the MoHE did not require the company to provide official system to manage student, Mesiniaga has taken it own initiative to ease the student management. The overall system to be build has two characteristic, to help the company in managing student record and to help student in interactive online learning. Therefore there are two main systems to be developed to fulfill the demand of the above requirement. The following subsection will discuss more about the system to be developed. There are two main subsystems to be developed to fulfill the demand in WBL program requirement. Following are the fraction of the system to be developed. • Student Management System (SMS) • E-Learning Management System (eLMS) The whole system will be developed separately into 2 subsystems. The integration of the system will be done toward the completion of the subsystem. The development of the both system will be independent with each other. Anyway both systems will be sharing student record in the database level. The figure 2.2 below depicts the project organization structure of the overall system. 11 CLIENT Mesiniaga Bhd PRIME CONTRACTOR Maintenance & Manage Services (MMS) Department E-LEARNING MANAGEMENT SYSTEM STUDENT MANAGEMENT SYSTEM Maintenance & Manage Services (MMS) Department Maintenance & Manage Services (MMS) Department SOLUTION PROVIDER Information System (IS) Department Figure 2.2 : Project Organization Structure The prime contractor of the overall system is one of the departments in Mesiniaga namely Maintenance and Manage Services (MMS). This department which is entrusted by Mesiniaga Bhd to carryout the overall WBL program will be responsible to develop eLMS subsystem. The student trainee who is currently worked under Information System (IS) department will be responsible to develop the SMS subsystem. Briefly the E-Learning Management System (eLMS) will provide the Kolej Komuniti student a platform to perform interactive online learning. The system should cover online quiz, assignment, lecture notes and e-book download. The details of this system will not be discussed further in this project. 12 This thesis will discuss about the Student Management System (SMS), as stated earlier in the objective of this project. The main purpose of the SMS subsystem is to provide online student record. The system to be developed shall be able to manage the following: • Student Record • Subject Record • Online Result • Semester Schedule • Administrator Record Additionally, the above services should be accessible by student and staff anytime and anywhere without additional software to install on their computer. From this requirement, the system should be built in web based environment. The details function of the SMS component will be further discuss in Project Discussion chapter. 2.3 Study of Existing Web Application Architecture The SMS project will be built in web environment therefore it is important to study of web application architecture. This will give a guideline and understanding on which suitable architecture to be used. In software system point of view, architecture is the set of significant decisions about the organization of a software system, including [1]: • Selection of the structural elements and their interfaces by which a system is composed • Behavior as specified in collaborations among those elements • Composition of these structural and behavioral elements into larger subsystems 13 In other words, a system's architecture represents the necessary strategic design decisions sufficient to form that system. Web application can be build without following any convention of system architecture, however it will difficult to manage and maintain when the complexity of the system grow. A stable architecture is essential to every successful system including web application mainly because it provides the following [1]: • Better understanding of the system • Basis to organize the development task • Basis to continuously evolve the system In the discussion of web architecture, the concepts of layer and tier are often used interchangeably. However, according to the reference that the student have studied [1], a layer is a logical structuring mechanism for the elements that make up the software solution, while a tier is a physical structuring mechanism for the system infrastructure. The following subsection discusses about the popular system architecture that being adopted in web application development. 2.3.1 Three-Tier Architecture Three-tier is a client-server architecture in which the user interface, functional process logic, computer data storage and data access are developed and maintained as independent modules, most often on separate platforms [2]. This architecture is well adopted in enterprise web application environment [3]. As depicted in figure 2.1, the 3-Tier architecture has the following tiers [2]: • Presentation Tier. This is the topmost level of the application. The presentation tier displays information related to services such as purchasing and shopping cart contents. It communicates with other tiers by outputting results to the browser/client tier and all other tiers in the network. • Application Tier (Business Logic/Logic Tier). The application tier performs detailed processing while controlling an application’s functionality. 14 • Data Tier. This tier consists of Database Servers. Here information is stored and retrieved. This tier keeps data neutral and independent from application servers or business logic. Giving data its own tier also improves scalability and performance. Figure 2.3 : Three-Tier Architecture Apart from the usual advantages of modular software with well defined interfaces, the three-tier architecture is intended to allow any of the three tiers to be upgraded or replaced independently as requirements or technology change. A change of operating system in the presentation tier would only affect the user interface code. This tier architecture is mainly used in J2EE web application for enterprise scale [3]. 15 2.3.2 Model-View-Controller Architecture Model–view–controller (MVC) is an architectural pattern which not only used in web application but in other application as well. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other [4]. As depicted in figure 2.4, MVC architecture consists of the following component [3]. • Model. Model represents enterprise data and business rules. Many applications use a persistent storage mechanism such as a database to store data. • View. View is the interface the user sees and interacts with. There is no real processing happening in the view; it serves only as a way to output data and allow the user to act on that data. • Controller. Processes and responds to events (typically user actions) and may indirectly invoke changes on the model. MVC is often seen in web applications, where the view is the actual Hipertext Markup Language (HTML) page. The controller is the code that gathers dynamic data and generates the content within the HTML. Finally, the model is represented by the actual content, which is often stored in a database or in Extensible Markup Language (XML) nodes, and the business rules that transform that content based on user actions. Figure 2.5 shows the example usage of the MVC in Java Web application [3]. More recently, it has become the recommended model for Sun’s J2EE platform, and it is gaining increasing popularity among ColdFusion and PHP developers. There are many variation of MVC including Model 1 and Model 2 which introduced by Sun Corporation. The example of supporting web framework is Struts and Spring [3]. 16 Figure 2.4 : MVC architecture Figure 2.5 : MVC used in Java 2.3.3 Presentation-Abstraction-Control Architecture Presentation-abstraction-control (PAC) is a software architectural pattern that uses a hierarchical structure of agents, each consisting of a triad of presentation, abstraction and control parts [5]. The PAC objects will work together to form an agent. The agents or triads communicate with each other only through the control 17 part of each triad [6]. It also completely insulates the presentation (view in MVC) and the abstraction (model in MVC), this provides the option to separately multithread the model and view which can give the user experience of very short program start times, as the user interface (presentation) can be shown before the abstraction has fully initialized [7]. • Control. Control is somewhat similar to the Controller in the MVC architecture. It processes external events and updates the model. It also directly updates the Presentation part. • Abstraction. Abstraction contains the data, like in MVC. However, it may be just part of the complete data structure of the application, and it does not play an active role in the notification of changes. • Presentation. Presentation is exactly like the View of MVC. It displays the information from the Abstraction. Anyway according to the study [7], PAC is not popular use in web application as compared to MVC. Rhizome[8] is the example of PAC used in web application. Figure 2.6 : PAC Architect 18 2.3.4 Summary of Web Architecture This section provides the brief comparison between Web architecture that being studied in this project. However the comparison is not done in deep manner, rather the compare about the usage and common characteristic. Table 2.1 shows the comparison. Table 2.1 : Web Architecture Summary No Characteristic Three-Tier MVC PAC 1 Task Separation Tier Based consist of Presentation Tier, Logic Tier and Data Tier Layer based consist of Model Layer, View Layer and Controller Layer Layer and hierarchical. Layer consist of Presentation, abstraction and Controller. Every layer connected in hierarchy. J2EE J2EE, Struts 2, Spring Rhizome Not explicitly specified but it can be used in small to enterprise scale This is also a cheaper solution which only needs 1 server and 1 developer. 2 Supporting Web Framework 3 Suggestion of Large Scale Usage Enterprise environment Small to enterprise Scale 4 Cost This is much cheaper solution where only 1 server is needed with the minimum of 1 developer. 5 Popularity This is expensive solution as more investment needed for hardware, software and workers Well known as enterprise web application adopted in online back system and stock exchange Well known in most of the web content management system development such Jomlaa Less known but still be applied in some web content management system such as Rizome 19 2.4 Software Development Methodology Review This section provides a literature review on Software Engineering Methodology. Software engineering is the practice of using selected process techniques to improve the quality of a software development effort. This is based on the assumption, subject to endless debate and supported by patient experience, that a methodical approach to software development results in fewer defects and, therefore, ultimately provides shorter delivery times and better value. The documented collection of policies, processes and procedures used by a development team or organization to practice software engineering is called its software development methodology or system development life cycle (SDLC) [9]. The discussion of the software methodology has been divided into few sections namely software process, technique, model and tools. 2.4.1 Software Development Process Model There is various software development approaches defined and designed which are used or employed during the development process of software, these approaches are also referred as "Software Development Process Models". Each process model follows a particular life cycle in order to ensure success in process of software development [9]. According to the survey there are a lot of debates about selecting and following a specific software process model. There are many claims about one development model is better then the others [10]. In this review there are 3 well known software process model to discuss and compare which are Waterfall Model, Rational Unified Model and Agile Model. However the discussion is limited to the important characteristic of the process model. 20 2.4.1.1 Waterfall Model The Waterfall is one of the well known examples of a software engineering methodology. It composed into the stages of system requirements, software requirements, preliminary and detailed design, implementation, testing, operations, and maintenance. In the Waterfall software engineering methodology, as often quoted and viewed, the process flows from stage to stage is like water over a fall. According to the paper title as “Software Engineering Methodology: The WaterSluice” by Ron Burback, in the original description of the Waterfall software engineering methodology, there is an interactive backstep between each stage. Thus the Waterfall is a combination of a sequential methodology with an interactive backstep or feedback [9]. Figure 2.7 depict the phases in the traditional Waterfall model [9]. All these phases are cascaded to each other so that second phase is started as and when defined set of goals are achieved for first phase. Following are the stages involved in Waterfall model. • Requirement Analysis: All possible requirements of the system to be developed are captured in this phase. Requirements are set of functionalities and constraints that the end-user (who will be using the system) expects from the system. The requirements are gathered from the end-user by consultation, these requirements are analyzed for their validity and the possibility of incorporating the requirements in the system to be development is also studied. Finally, a Software Requirement Specification (SRS) document is created which serves the purpose of guideline for the next phase of the model. • Software Design: Before a starting for actual coding, it is highly important to understand what we are going to create and what it should look like. The requirement specifications from first phase are studied in this phase and system design is prepared. System Design helps in specifying hardware and system requirements and also helps in defining overall system architecture. 21 Finally Software Design Document (SDD) will be produced. The system design specifications serve as input for the next phase of the model. • Implementation and Unit Testing: On receiving system design documents, the work is divided in modules/units and actual coding is started. The system is first developed in small programs called units, which are integrated in the next phase. Each unit is developed and tested for its functionality. Unit testing mainly verifies if the modules/units meet their specifications. • Integration and System Testing: As specified above, the system is first divided in units which are developed and tested for their functionalities. These units are integrated into a complete system during Integration phase and tested to check if all modules/units coordinate between each other and the system as a whole behaves as per the specifications. After successfully testing the software, it is delivered to the customer. • Operations and Maintenance: Generally, problems with the system developed, which are not found during the development life cycle come up after its practical use starts, so the issues related to the system are solved after deployment of the system. Not all the problems come in picture directly but they arise time to time and needs to be solved; hence this process is referred as Maintenance. The waterfall model, as described above, offers numerous advantages for software developers. Following are the advantages of Waterfall model [9]: • The staged development cycle enforces discipline: Every phase has a defined start and end point, and progress can be conclusively identified through the use of milestones by both vendor and client. The emphasis on requirements and design before writing a single line of code ensures minimal wastage of time and effort and reduces the risk of schedule slippage, or of customer expectations not being met. • Help improves quality: Getting the requirements and design out of the way first also improves quality. It is much easier to catch and correct possible flaws at the design stage rather than at the testing stage. 22 • Aid efficient knowledge transfer: Because the first two phases end in the production of a formal specification, the waterfall model can aid efficient knowledge transfer when team members are dispersed in different locations. • Easy to understand process: The stages in waterfall model are much easier to understand. This will help the company to reduce cost as their staff does not require additional training just to understand the process flow. Figure 2.7 : Waterfall Model Despite the seemingly obvious advantages, the waterfall model has come in for a fair share of criticism in recent times. The most prominent criticism revolves around the fact that very often, customers do not really know what they want up- 23 front, and rather what they want emerges over time. In this situation, the waterfall model with its emphasis on up-front requirements capture and design is seen as somewhat unrealistic and unsuitable [9]. Further, given the uncertain nature of customer needs, estimating time and costs with any degree of accuracy as the model suggests is often extremely difficult. In general, therefore, this model is recommended for use only in projects which are relatively stable and where customer needs can be clearly identified at an early stage [11]. 2.4.1.2 Rational Unified Process The Rational Unified Process (RUP) is an iterative and incremental development process. The Inception, Elaboration, Construction and Transition phases are divided into a series of time boxed iterations as shown in figure 2.8 [12]. Each iteration results in an increment, which is a release of the system that contains added or improved functionality compared with the previous release. Following are the characteristic of this process [12][13]: • Use Case Driven. Use cases are used to capture the functional requirements and to define the contents of the iterations. Each iteration takes a set of use cases or scenarios from requirements all the way through implementation, test and deployment. • Architecture Centric. This process insists that architecture sit at the heart of the project team's efforts to shape the system. Since no single model is sufficient to cover all aspects of a system, the Unified Process supports multiple architectural models and views. One of the most important deliverables of the process is the executable architecture baseline which is created during the Elaboration phase. This partial implementation of the system serves to validate the architecture and act as a foundation for remaining development. • Risk Focused. This process requires the project team to focus on addressing the most critical risks early in the project life cycle. The deliverables of each 24 iteration, especially in the Elaboration phase, must be selected in order to ensure that the greatest risks are addressed first. Figure 2.8 : RUP Model Referring to figure 2.8, during the inception phase, the business case for the system is established and delimits the project scope. The purpose of the elaboration phase is to analyze the problem domain, establish a sound architectural foundation, develop the project plan, and eliminate the highest risk elements of the project. During the construction phase, all remaining components and application features are developed and integrated into the product, and all features are thoroughly tested[13]. According to survey done on the research paper [10][11][14], RUP process is difficult to learn and consist of many processes. The flexibility of the process will also contribute to the difficulty when it need to modified in accordance with the project requirement [10]. 25 2.4.1.3 Agile Model Most promote development iterations, teamwork, collaboration, and process adaptability throughout the life-cycle of the project. There are many specific agile development methodologies for example Scrum, XP and Crystal Orange. Agile methods break tasks into small increments with minimal planning, and don't directly involve long-term planning. Iterations are short time frames that typically last from one to four weeks. The term “agile” leads to a development process that is more responsive to customer needs compared traditional methods [15]. Agile methodologies believe that adaptability to changing requirements at any point during the project life is a more realistic and better approach than attempting to define all requirements at the beginning of a project and then expending effort to control changes to the requirements. Following are the characteristic of agile methodology [16]: • Reduce the cost of change. In agile, multiple iterations may be required to release a product or new features. Each iteration is worked on by a team through a full software development cycle, including planning, requirements analysis, design, coding, unit testing, and acceptance testing. In traditional system development methods the requirements for the system are determined at the beginning of the development project and often fixed from that point on. This means that the cost of changing the requirements at a later stage will be high. • Emphasis on coding. Agile argue that the only truly important product of the system development process is code. Coding can be drawing diagrams that will generate code, scripting a web-based system or coding a program that needs to be compiled. • Emphasis on testing. Testing is one of the core roots of agile development. Both acceptance tests and unit tests are used. Unit test should be automated tests that test the code. The programmer will try to write as many tests he or she can think of that might break the code he or she is writing; if all tests run successfully then the coding is complete. • Listening to customer needs. Communication between the customer and programmer need to be established. The programmer has to try to understand 26 the business problem, and to give the customer feedback about his or her problem, to improve the customer's own understanding of his or her problem. • Software Architecture Design is optional. Some of the agile methodology did not emphasis on design. Extreme Programming (XP) for example, believe that from the point of view of simplicity, one could say that system development doesn't need more than coding, testing and listening. If those activities are performed well, the result should always be a system that works. According to the study [10], XP use Class-Responsibility-Collaboration (CRC) card based on client’s story to capture requirement. • Emphasis on Software Release. A Release is a piece of development where the customer gets some new software. Through fast iteration, Agile stress on product releases which can be done from 2 weeks to 6 months. An iteration may not add enough functionality to warrant a market release, but the goal is to have an available release with minimal bugs at the end of each iteration. Agile process is suitable for the project where product release is important factor. It also requires huge staff and later break into group which tackle specific problem [10]. This process is also needs more customer involvement [15]. However, in some agile process for example XP, several potential drawbacks has been noted, as compared to more document-based methodologies, This including problems with unstable requirements, no documented compromises of user conflicts, and lack of an overall design spec or document [16]. 27 Figure 2.9 : Agile Model 2.4.1.4 Summary of Software Process Model This section provides the brief comparison between Software Process Model that being studied in this project. However the comparison is not done in deep manner, rather the compare about the usage and common characteristic. Table 2.1 shows the comparison. 28 Table 2.2 : Software Process Summary No Characteristic Waterfall RUP Agile 1 Flow Sequential and back step between stage Iterative and incremental Light/Small Iteration 2 Easiness Easy to understand process Difficult to Understand due to huge process Easy to understand & emphasis on teamwork 3 Requirement & Design Did not specify any method Use Case driven and architecture centric Base on user story and CRC card. Architecture is optional. 4 Flexibility It is not flexible enough to cater variable user requirement Flexible due to iterative and incremental process Flexible with fast development Emphasis of Documentation complete documentation on every stage Documentation is done incrementally Do not emphasis on documentation Suggestion of Usage Suitable for huge project with huge staff and deal with high risk issues. Suitable for project with huge staff, documentation is less important and emphasis on early product release. Staff will group to tackle specific problem. More customer involvement. 5 6 Suitable for project where requirement is very well known and do not change frequently. 29 2.4.2 Software Techniques The favorable software technique in this project is Object Oriented Programming (OOP). This is a programming paradigm that uses objects and their interactions to design applications and computer programs. This programming technique may include features such as information hiding, data abstraction, encapsulation, modularity, polymorphism, and inheritance [17]. Many modern programming languages now support OOP due to it popularity of it benefit. OOP approach allows separate components to be built and tested individually [18]. It also allows reusable components through inheritance, hence help increase productivity. 2.4.3 Software Model Software model is an abstract representation of the system to be built, the system being built, and the system that was built [18]. The model therefore evolves with the system and is a major part of every phase of the project. The model is a collection of artifacts, each one representing a view of the system. The model is used by nearly every member of the team ranging from the stakeholders to system implementer. Following are the key features that the software model provides [18]: • Help manage complexity: As systems become increasingly complex, they extend beyond the ability of any one individual to comprehend. Contracting an abstract model to the system helps manage this complexity. • Clear view of component association: A good model will be able to tell which components are associated with which use cases and in which capacities. 30 Thus, it helps to predict the relative impact that change request might make to the system. • Traceability: The ability to start with one element of the model and trace its collaboration and connection to other parts of the model. Traceability enables project managers to navigate the model to help find answer and solutions to the problems encountered during the development process. Hence, choosing the adequate model is an important managerial decision for the success of the project. The Unified Modeling Language (UML) diagrams are preferred for the systems that will develop using the Object-Oriented technique. The UML diagrams provide the characteristic of the software model features discussed above. The UML is a standard language for specifying and documenting the artifacts of software systems, as well as for business modeling and other non-software systems [19]. The UML represents a collection of best engineering practices that have proven successful in the modeling of large and complex systems. UML also uses mostly graphical notations to express the design of software projects. Using the UML helps project developers to communicate, explore potential designs, and validate the architectural design of the software. UML consist of components such as Views, Use-case, Logical view, Diagram, Use-case diagram, Activity diagram, Class diagram, Sequence diagram and Collaboration diagram [19][20]. Each component plays their roles individually. 2.4.4 Software Tools This section will discuss about the importance of software tools usage in the software engineering development. Computer Assisted Software Engineering (CASE) tools is synonym to the software tools. CASEs are designed to enhance programs that aid the development cycle of the system. The tools assist software engineers and dedicated programmers through preliminary investigation and system 31 analysis [21]. Whenever a new system is installed, the implementation integrates a number of related and different tasks. The process has to be efficiently organized and it is for this very reason that CASE tools are developed. CASE tools are largely marketed and understood as [21]: • Investigation, analysis and design, or Front-End CASE • Implementation and installation, or Back-End CASE Working in software development in general requires specific tools and software. CASE tools are developed for the following reasons [13]: • Increase the speed during system development. • Quicker installation. • Enhanced analysis and design development. • Optimum use of available information. • Create and manipulate documentation. • Enrich graphical techniques and data flow. The following section will describe the tools being used during development of the system. 2.4.4.1 Rational Rose Software Rational Rose is a powerful visual modeling tool to aid in the analysis and design of object oriented software systems. It is used to model a system before we write any code, so we can be sure that the system is architecturally sound from the beginning [19]. It is a graphical component modeling and development tool that uses the industry-standard Unified Modeling Language. Rational Rose tool is used in the analysis and design phase which supports UML analysis and design specifications and provides Object-Oriented (OO) software development environments, such as Java, C++ and Visual Basic, with facilities to translate UML specifications into object implementations [19]. Moreover, it acts as central repository of project 32 definition assets, including models, diagrams and documents generated during the deployment of the UML method. The tool provides the software developer with a complete set of visual modeling tools using a common universal standard modeling language. The software is used for specifying, visualizing, constructing, and documenting the artifacts of software systems [20]. A Rose model is a picture of a system from various perspectives. It includes all of the UML diagrams, actors, use cases, objects, classes, components, and deployment nodes in a system. It describes in great detail what the system will include and how it will work, so developers can use the model as a blueprint for the system being built [20]. Rational Rose supports business modeling, helping analyst to understand the business around the system. It helps with systems analysis by enabling design of use cases and Use Case diagrams to show the system functionality. It will let the developer design Interaction diagrams to show how the objects work together to provide the needed functionality. Class diagrams can be created to show the classes in a system and how they relate to each other. Component diagrams can be developed to illustrate how the classes map to implementation components. Finally, a Deployment diagram can be produced to show the network design for the system. 2.4.4.2 Netbean IDE The NetBeans IDE is an open-source integrated development environment written entirely in Java using the NetBeans Platform. NetBeans IDE supports development of all Java application types (Java SE, web, EJB and mobile applications) out of the box. Among other features are an Ant-based project system, version control and refactoring [22]. 33 NetBeans began in 1997 as a student project under the guidance of the Faculty of Mathematics and Physics at Charles University in Prague [23]. Roman Stanek later formed a company around the project and produced commercial versions of the NetBeans IDE until it was bought by Sun Microsystems in 1999. Until then Netbean ID has been open-sourced by Sun. Netbean IDE has been evolved and the current version is NetBeans IDE 6.5.1, which was released in March 2009. NetBeans has won several awards for the Developer.com products of the year awards 2009[23]: Development Tool, Development Utilities, Wireless / Mobile, Java Tool, and Open Source. All the functions of the IDE are provided by modules. Each module provides a well defined function, such as support for the Java language, editing. NetBeans contains all the modules needed for Java development in a single download, allowing the developer to start working immediately. NetBean IDE offer all the tools the developers need to create professional desktop, enterprise, web, and mobile applications with the Java language, C/C++, and even dynamic languages such as PHP, JavaScript, Groovy, and Ruby [22]. NetBean IDE has been used in project implementation. 2.4.4.3 MySQL Server MySQL server is a relational database management system (RDBMS) server that provides multi-user access to a number of databases. MySQL is owned and sponsored by the Swedish company MySQL AB, which is now a subsidiary of Sun Microsystems [24]. According to Sun, MySQL database is the world's most popular open source database because of its fast performance, high reliability, ease of use, 34 and dramatic cost savings [25]. MySQL is popular for web applications as database component. MySQL is a relationship database, which is a collection of items or tables organized into predefined categories or described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database tables. The popularity stems from the fact that the databases are easy to create and access. Additionally, they are easy to extend, a new data category can be added without requiring that all existing applications be modified [25]. Due to this benefit, this database server has been a favorable choice for this project. 2.4.4.4 Apache Tomcat Server Apache Tomcat is a servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a pure Java HTTP web server environment for Java code to run [26]. Members of the ASF and independent volunteers develop and maintain Tomcat. Users have free access to the source code and to the binary form of Tomcat under the Apache License. Apache Tomcat has 3 main components namely Catalina, Coyote and Jasper. Catalina is Tomcat's servlet container [26]. Catalina implements Sun Microsystems' specifications for servlet and JavaServer Pages (JSP). Coyote is Tomcat's HTTP Connector component that supports the HTTP 1.1 protocol for the web server or application container. Coyote listens for incoming connections on a specific TCP port on the server and forwards the request to the Tomcat Engine to process the request and send back a response to the requesting client. Jasper is Tomcat's JSP Engine. At runtime, Jasper is able to automatically detect JSP file changes and recompile them. 35 2.5 Technology Stack in Java Web Application development This section provides a rough primer on the technological context of a web application which covers the technology stack upon which web applications sit, and take a quick survey of common tasks that all web applications must routinely accomplish as they service their requests. A web application is simply an application that runs over the Web. With rapid improvements in Internet speed, connectivity, and client/server technologies, the Web has become an increasingly powerful platform for building all classes of applications, from standard business-oriented enterprise solutions to personal software [27]. Most web applications run on top of Hypertext Transfer Protocol (HTTP). This protocol is a stateless series of client/server message exchanges. Normally, the client is a web browser and the server is a web or application server. The client initiates communication by sending a request for a specific resource. The resource can be a static Hypertext Markup Language (HTML) document that exists on the server’s local file system, or it can be a dynamically generated document with untold complexity behind its creation. While there are many technology stacks for web application, the discussion is limited in Java technology point of view. Figure 2.6 below depict the technology stack in Java Servlet and Apache Struts 2 [27]. The Java Servlet API exposes these low-level HTTP communications to the Java language. Basically, Struts 2 uses the Servlet API so that we do not have to use it manually.[27] 36 Struts 2 Java Servlet Specification HTTP Figure 2.10 : Java Web Technology Stack 2.4.1 Java Web Development Framework A web application framework is a piece of structural software that provides automation of common tasks of the domain as well as a built in architectural solution that can be easily inherited by applications implemented on the framework [27]. The project has been developed in Java platform therefore it is crucial to discuss the Java framework. This section has been divided into few subsections. It begins with the explanation of the traditional Servlet and JSP framework followed by latest and sophisticated framework namely Struts 2. Additional framework like JPA, hibernate and Tiles will also be discuss. 37 2.4.1.1 Java Servlet Servlets are Java programming language objects that dynamically process requests and construct responses. The Java Servlet API allows a software developer to add dynamic content to a Web server using the Java platform. Following the HTTP protocol, servlets provide a way to map a Uniform Resource Locator (URL) to a special class whose methods would be called. Baiscally, in Servlet, HTML code will be inserted in Java code [28]. It was quickly recognized that although this was a large step forward, generating the HTML code from within the Java code was a maintenance nightmare. Each time a simple user interface change was needed, the Java developer needed to modify the Servlet code, recompile the source and then to deploy the application into the server environment [29]. 2.4.1.2 JSP JavaServer Pages (JSP) is a Java technology that allows software developers to create dynamically-generated web sites, with HTML, XML, or other document types, in response to a Web client request. The technology allows Java code and certain pre-defined actions to be embedded into static content. In JSP coding style is upside-down of Servlet coding, rather than placing the HTML code within the Servlet or Java code, the Java code was placed as script-lets inside the HTML code [29]. Each JSP provided both the logic for processing of requests, and the presentation logic. Sun recommends that the Model-view-controller pattern be used with the JSP files in order to split the presentation from request processing and call to business logic [29][3]. Either regular servlets or separate JSP files are used to process the request. After the request processing has finished, control is passed to a JSP which 38 only used for creating the output. Apache Struts 2 framework is based Model-viewcontroller pattern for web tiers that support JSP rendering. 2.4.1.3 Apache Struts 2 Framework During the course of this project, the student have learned a lot about Apache Struts 2 framework. This framework has been adopted to implement the project. This section will focus on the Struts 2 framework architecture after covering the brief history. Apache Struts is an open-source framework that is used for developing Java web application [30]. Originally, developed by the programmer and author Craig R. McClanahan, this was later taken over by the Apache Software Foundation in 2002[30]. Struts 2 is a second-generation web application framework that implements the Model-View-Controller (MVC) design pattern which is built from the ground up on best practices and proven, community-accepted design patterns[29]. This was also true for the first version of Struts. The MVC pattern provides a separation of concerns that applies well to web applications which manage the complexity of large software systems by dividing them into high-level components. The MVC design pattern identifies three distinct concerns: model, view, and controller. Figure 2.7 below depict the MVC component of Struts 2 [29]. The ModelView-Controller pattern in Struts 2 is realized with the following core components [29]: • Controller. The role of controller is played by the Struts 2 FilterDispatcher. This important object is a servlet filter that inspects each incoming request to determine which Struts 2 action should handle the request. The controller can be customized with XML-based configuration files or Java annotations. 39 • Model. A Struts 2 action serves two roles. First, an action is an encapsulation of the calls to business logic into a single unit of work. Second, the action serves as a locus of data transfer. • View. The view is the presentation component of the MVC pattern. The rendering is commonly supported in JSP pages, Velocity templates, or some other presentation layer technology. Figure 2.11 : MVC Component of Struts 2 Struts 2 Framework is very extensible and elegant for the development of enterprise web application of any size. The architecture of Struts 2 Framework is shown in figure 2.8 below [27]. The details of the architecture will be explained in the appendix B. The architecture might be complex at first but the area of the development is only takes place on 3 components. Referring to the MVC concept and the architecture diagram in Figure 2.8, the developer can change the Controller by specifying struts.xml file, access the Model by specifying Action and provide rendering by setting up JSP page. 40 Figure 2.12 : Struts 2 Architecture It is also important to explain the request life cycle of the struts 2 based on the MVC component described above. Referring to the figure 2.9, Request Lifecycle in Struts 2 applications can be explain in following order [32]: • User Sends request: User sends a request to the server for some resource. • FilterDispatcher determines the appropriate action: The FilterDispatcher looks at the request and then determines the appropriate Action. • Interceptors are applied: Interceptors configured for applying the common functionalities such as workflow, validation, file upload etc. are automatically applied to the request. • Execution of Action: Then the action method is executed to perform the database related operations like storing or retrieving data from the database. 41 • Output rendering: Then the Result renders the output. • Return of Request: Then the request returns through the interceptors in the reverse order. The returning request allows us to perform the clean-up or additional processing. • Display the result to user: Finally the control is returned to the servlet container, which sends the output to the user browser. Figure 2.13 : Struts 2 Request Life Cycle There are many different web frameworks available for today’s developer. Some of these come from Open Source communities, some from commercial companies, and yet others are internally developed for the current web development needs. The decision in choosing a framework is going to the most controversial. With so many choices available, why chose Struts2? Here are some of the features that may lead to consider Struts2 [27][29][30]: • Confirm to follow MVC Pattern • Action based framework • Mature with a vibrant developer and user community • Annotation and XML configuration options 42 • POJO-based actions that are easy to test • Spring, SiteMesh and Tiles integration • Object-Graph Navigational Language (OGNL) expression language integration • Themes based tag libraries and Ajax tags • Multiple view options (JSP, Freemarker, Velocity and XSLT) • Plug-ins to extend and modify framework features In brief Struts 2 action has 3 functions [27]: encapsulate unit of work, locus of data transfer and return control string. Unit of work is the business layer class which can be though as any java class that implement struts 2 framework and return control string. The data transfer between View layer and Model layer become easy when java property become the locus of data transfer. The beauty of the Struts 2 lies in the usage of OGNL. It serves 2 main functions as shown in Figure 3.0: expression language and type converter [27]. Struts 2 uses expression language to bind Java-side data properties to strings in the textbased view layers, commonly found in the name attributes of form input fields, or in various attributes of the Struts 2 tags. Every time data moves to or from the Java environment, a translation must occur between the string version of that data that resides in the HTML and the appropriate Java data type. Struts 2 will do automatic conversion through OGNL 43 Figure 2.14 : OGNL Mechanism in Struts 2 2.4.1.4 JPA and Hibernate The Java Persistence Architecture API (JPA) is a Java specification for accessing, persisting and managing data between Java objects/classes and the relational database [33]. JPA was defined as part of the EJB 3.0 specification as a replacement to the EJB 2 CMP Entity Beans specification. It is now considered the standard industry approach for Object to Relational Mapping (ORM) in the Java Industry [33]. JPA is just a specification, it is not a product, and cannot perform persistence or anything by itself [33]. JPA is just a set of interfaces, and requires an implementation. There are open source and commercial JPA implementations to 44 choose from and any Java EE 5 application server should provide support for its use. JPA also requires a database to persist to. JPA allows Plain Old Java Objects (POJO) to be easily persisted without requiring the classes to implement any interfaces or methods as the EJB 2 CMP specification required [34]. JPA allows the object's object-relational mappings to be defined through standard annotations or XML defining how the Java class maps to a relational database table. JPA also defined a runtime EntityManager API for processing queries and transaction on the objects against the database. JPA defines a object-level query language JPQL to allow querying of the objects from the database. Currently most of the persistence vendors have released implementations of JPA confirming its' adoption by the industry and users. These include Hibernate (acquired by JBoss, acquired by Red Hat), TopLink (acquired by Oracle), and Kodo JDO (acquired by BEA, acquired by Oracle). Other products that have added support for JPA include Cocobase (owned by Thought Inc.), and JPOX [35] . Hibernate is an open source object/relational mapping tool for Java. Hibernate lets us develop persistent classes following common Java idiom, including association, inheritance, polymorphism, composition and the Java collections framework [36]. Hibernate not only takes care of the mapping from Java classes to database tables (and from Java data types to SQL data types), but also provides data query and retrieval facilities and can significantly reduce development time otherwise spent with manual data handling in SQL and JDBC. Hibernates goal is to relieve the developer from 95 percent of common data persistence related programming tasks [35]. Hibernate which is Free Software software under the LGPL license is sufficiently flexible to allow the use of Hibernate in both open source and commercial projects. Hibernate has been used in the implementation of the Entity class of this project. 45 2.4.1.5 Apache Tiles All websites have something in common: they are made of pages that share similar structures. The pages share the same layout, while each page is made of different independent pieces, but always placed in the same position across the entire site. As we can see in figure 2.10 [30], the pages are different, but their difference is only in the body part. Apache Tiles is a template framework built to simplify the development of web application user interfaces. Tiles allows authors to define page fragments which can be assembled into a complete page at runtime. These fragments, or tiles, can be used as simple includes in order to reduce the duplication of common page elements or embedded within other tiles to develop a series of reusable templates. These templates streamline the development of a consistent look and feel across an entire application [37]. Tiles reduce the cost of maintaining the look and feel of web application, and at the same time allows authors or developers to focus on the content that really matters [37]. Tiles is a composite view framework which allows to reuse page pieces across the application. The different parts of the page (template and pieces) can be reused across the whole application. Figure 2.8 shows the reuse component in Tiles. Tiles grew in popularity as a component of the popular Struts framework. Tiles framework has been used in SMS project to manage the rendering layout. Figure 2.15 : Reuse Component in Tiles 46 2.4.1.6 Summary of Java Web Framework This section provides the summary of java web framework studied above. In modern web development, web application is constructed using mixed technology. In Java, while servlet become the foundation of other Java Web framework, it far more difficult to program, hence maintenance become difficult to handle. JSP has been introduced to overcome this problem but it still need servlet to handle the business layer. Struts 2 come in handy when is support servlet task while providing simple plain java programming. Struts 2 is flexible enough to support JSP as a rendering layer, Tiles 2 as layout manager and JPA/Hibernate as database mapping. Besides supporting multiple framework, the previous study also provide list of benefit of using this framework. CHAPTER 3 PROJECT METHODOLOGY 3.1 Introduction Software engineering is the practice of using selected process techniques to improve the quality of a software development effort. Therefore a project must be carried out with some methodology towards the success of that project. This chapter discusses about methodology framework being used for SMS project. The discussion revolved around Software Development Life Cycle (SDLC) that being adopted in this project. This SDLC is a conceptual model used in project management that describes the stages involved in the SMS project, starting from initial feasibility studies until maintenance of completed application. 48 3.2 Project Development Strategy This section discusses about the development strategy used in SMS project. Basically, the development strategy describes the set of activities starting from initial planning until implementation of the project. As shown in Figure 3.1 the development strategy consist of 4 main activities as follows: • System Requirement • Software Requirement • Software Design • Coding and Debugging System Requirement Initial Study Project Background Web Architecture Software Process Java Web Framework Software Requirement SRS Software Design SDD Coding and Debugging SMS Prototype Figure 3.16 : Project Development Strategy 49 3.2.1 Operational Framework The development strategy starts with System Requirement stage. There are 5 main activities in this stage. During the initial study, a series of discussion with Industrial Mentor has been done to do preliminary project study. Finally the project objective and scopes of work has been agreed between the developer (the CASE Student ) and the Industrial Mentor. Project schedule has been defined during this stages. The next activity in this stage is to do the Literature Review. As shown in the figure 3.1, Literature review composed of 4 main studies consisting project background, web architecture, software engineering methodology and java web framework. Project background study has been carried out to understand the requirement of the project. The finding in this study leads to the key topic to be discovered in the next literature Review. During the methodology study phase, comparison has been made between 3 processes model which is Waterfall, RUP and Agile. This provides guidelines to choose suitable process model in this project. In this stage Waterfall model is choosen as a software process. This model emphasis completion of one phases before proceed to the next phases. Beside work in sequence, waterfall is also allows backstep to the previous adjacent phase. This allows the student to proper schedule the development activity over the 5 month period using SDLC steps define in waterfall. The last activity in the literature review is the study of Java Web Framework. This stage exposes the student to the range of Java technology used in web application development. There are many technology learn in this phase such as Apache Struts 2 framework, Apache Tiles framework, JPA and Hibernate. During this study all of the technology mention above can be well integrated to build web application. The application of this technology will be elaborated further in implementation stage. The next stage is Software Requirement. In this stage the entire functional requirement has been gathered and SRS has been constructed. This document is will 50 be used in the next stage which is Software Design. In this stage the SDD has been constructed. The last stage is the Coding and Debugging. In this stage the SMS prototype will be constructed in accordance with the SDD document. 3.3 Problem Solving Methodology This section discusses about the software engineering methodology that being selected as a problem solving methodology for this project. Figure 3.2 depict the overall software engineering methodology used. The components consist of Software process, standard, model, technique and tools. Briefly, Software process defines the model for software development life cycle, software standard define the set of standard to follow during artifact documentation, software model describe the software modeling that help during analysis and design phases, software technique define the coding methodology and software tools define the set of tools used during implementation. Standard DoD Standard Process Waterfall Model Model Software Engineering Methodology Unified Modeling Language Technique Tools Object Oriented Technique Netbean IDE, Rational Rose, Mysql & Tomcat Server, Struts 2, Tiles 2, JPA & Hibernate 51 Figure 3.17 : Problem Solving Methodology 3.4.1 Software Process According to the research done during the literature review section, there are many arguments about selection of Software Process Model in software development. There is also an online open discussion about this endless topic that comparing Agile development with traditional Waterfall model [9]. Therefore, it can be concluded that the selection of software development process model is a controversial task. One must study carefully on the model to be adopted. This section will not discuss about the comparison between methodology models, rather justify about the model selection that adopted for this project. Waterfall model has been adopted as Software Development Process for this project. Following are the reasons on why waterfall model is much favorable selection: • Easy to understand process: The stages in waterfall model are much easier to understand. It follows the general activity of SDLC that consist of requirement analysis, system design, implementation and maintenance. In the company point of view, this model will help them to reduce cost as their staff does not require additional training just to understand the development process mechanism of that model. Besides, this model is also adopted during project 2 in UTM. • The staged development cycle enforces discipline: every phase has a defined start and end point, and progress can be conclusively identified by both vendor and client. The validation/review in every phase is the conformance of DoD guideline. • Aid efficient knowledge transfer: because the first two phases end in the production of a formal specification (engineering document of SRS and SDD), the waterfall model can aid efficient knowledge transfer when team members are dispersed in different locations. 52 • Help improves quality: Getting the requirements and design out of the way first also improves quality. This is because it is much easier to catch and correct possible flaws at the design stage than at the testing stage. The Waterfall model might not be model to be adopted, but it is suitable enough for this project which requirement is well understand and does not change frequently. In contrast, waterfall model is not suitable for project where requirement is complex and uncertain. The following section will discuss about how Waterfall model has been implemented in this project. 3.4.1.1 Requirement Analysis All possible requirements of the system to be developed are captured in this phase. Requirements are set of functionalities and constraints that the end-user ( in this case, student and administrator) expects from the system. During this phase a series of meeting and discussion with the Industrial Mentor has been done to understand and capture the system requirement. Functional requirement will be identified and high level use case diagram will be constructed. The next step is to carefully convert the requirement understanding into use case scenario. Analysis class and its interaction will be developed. To further assist the understanding of the requirement, activity diagram will also be constructed. Every requirement will be identified with unique identification number and requirement traceability will be constructed to ensure every requirement has been captured. Ultimately, Software Requirement Specification (SRS) document is created using the software standard guideline adopted in this project. This document serves the purpose of guideline for the next phase of the model. 53 Software model adopted in this project which is UML will be used to construct the analysis model. Software tools such as Rational Rose and Microsoft Word will be used in this activity. Following the guideline of Waterfall model, all the activities mention in this section must be completed prior to move to the next phase. 3.4.1.2 Software Design The requirement specifications from first phase are studied in this phase and system design is prepared. System Design helps in specifying overall system architecture. This activity can be further divided into 2 main activities namely Preliminary Design and Detailed design. During the preliminary design stage, the interaction between identified classes in previous phase will be studied again. The interaction will influence the overall system architecture. The implementation framework to be used might also contribute to the decision of final system architecture. In this case the previous literature review will help. In this project, the popular Model-View-Controller (MVC) pattern has been adopted as system architecture. This selection is in conjunction with the selection of implementation framework that will be adopted in this project. The overall application state will be studied and state diagram will be constructed. The class will be arranged according to the Package which also known as Computer Software Component (CSC). Every class and CSC will be identified with unique identification number. The interaction between packages will be studied and documented. Static and dynamic diagram will be also be constructed during this phase. 54 During the Detailed design stage, the operation and attribute of every class will be identified. In this case, the analysis class in previous stage will be finalized and additional class might be introduced. The final class is also known as Computer Software Unit (CSU). Once again the requirement traceability from previous stage will be updated where CSC and CSU will be mapped with every requirement define in the first phase. Finally Software Design Document (SDD) will be produced. The system design specifications serve as input for the next phase of the model. Once again, following the software engineering methodology, Software model adopted in this project which is UML will be used to construct the analysis model. Software tools such as Rational Rose and Microsoft Word will be used in this activity. Following the guideline of Waterfall model, all the activities mention in this section must be completed prior to move to the next phase. 3.4.1.3 Coding and Debugging On receiving system design documents, the work is divided in modules or units and actual coding is started. The system is first developed in small programs called units, which are integrated in the next phase. This unit is the implementation of CSU defines in the previous stage. Each unit is developed and tested for its functionality. Unit testing mainly verifies if the modules or units meet their specifications. The requirement traceability will come in handy to verify if the earlier requirement has been fulfilled. Following the software engineering methodology, Software tools such as NetBean IDE, Struts 2, Tiles 2, JPA, Hibernate, MySql and Tomcat server will be used in this activity. Following the guideline of Waterfall model, all the activities mention in this section must be completed prior to move to the next phase. 55 3.4.1.4 Integration and system testing According to the project schedule, integration and testing will be carried out once the coding and debugging of CSUs are completed. This will be scheduled to commence on Jun 2009. As specified in previous phase, the system is first divided in units which are developed and tested for their functionalities. In this phase, these units are integrated into a complete system and tested to check if all modules or units coordinate between each other and the system as a whole behaves as per the specifications. After successfully testing the software, it will be delivered to the customer. The similar tools used in implementation phase will be used. 3.4.1.5 Operation and Maintenance Maintenance can be considered as on going process for entire lifecycle of the software product. Generally, problems with the system developed, which are not found during the development life cycle, come up after its practical use starts, so the issues related to the system are solved after deployment of the system. Not all the problems come in picture directly but they arise time to time and needs to be solved, hence this process is referred as Maintenance. 3.4.2 Software Standard While the company did not adopt any specific software standard, the student has taken initiative to introduce Department of Defense (DoD) standard. Basically this standard will provide the guideline during the documentation of SRS and SDD. 56 Adopting this well establish standard will help the company to manage the documentation not only in this project but also for future development project. 3.4.3 Software Model Unified Modeling Language (UML) has been used in this project. UML modeling is useful tools to represent the system in is visually. During the system requirement analysis, following UML diagram will be constructed: • Use Case Diagram • Sequence Diagram • Collaboration Diagram • Activity Diagram • Class Diagram The use case diagram will help to represent the high level function of the system to be developed. Class diagram represent the group of similar object identified in this project. Sequence and collaboration diagram will represent the interaction between classes. It can be considered as a dialog or message exchange between classes. Activity Diagram represents the dynamic activity for the specific use case scenario. During the design phases following UML diagram will be constructed: • State Diagram • System Architecture Diagram • component diagram State diagram represent the possible state of the application for a certain period of time. System architecture diagram depict the arrangement of classes and its interactions. Component diagram describe the dynamic of the system. It shows all 57 the component needed in order for the system to be executed. General discussion of the software model used in this project can be referred in chapter Literature Review. 3.4.4 Software Technique Software technique used must be supporting analysis and design model and coding implementation phases. Object oriented has been selected to suit the needs of software modeling and implementation. In modeling point of view, UML imposes the used of class which can be realized using object oriented programming. In the implementation point of view, Apache Struts 2 framework, JPA and Hibernate are based on java programming hence supporting Object Oriented programming technique. General benefit of the object oriented technique can be referred in chapter Literature Review. 3.4.5 Software Tools Software tools come in handy for the entire development stages. Following are the list of software tools used: • Microsoft Office 2003 • Rational Rose Enterprise version • NetBean IDE 6.5 • Apache Tomcat 6.0 • MySQL Community Server 5.1 • Apache Struts 2 • Apache Tiles 2 58 • JPA and Hibernate Microsoft Office has been used to document the software artifact from the starting of the project until completed. Rational Rose used in system requirement and software design phase to model the system using UML. Netbean IDE has been used in coding phase. It supports both user interface rendering and business class development. Apache Tomcat will serve as Web Server that provide servlet container for the web application to be developed. MySQL Server will host the database used in this project. Apache Struts 2 will be used as a base framework. Therefore this project is confirmed to meet the MVC pattern. Tiles 2 has been used to manage the website template. It impose reuse component and well integrated with Struts 2. JPA and Hibernate is used to implement the entity class. It help to manage the automatic creation of entity table of database. There General benefit of the software tools used in this project can be referred in Literature review. CHAPTER 4 PROJECT DISCUSSION 4.1 Introduction This chapter is devoted to discuss about the SMS project that being implemented using methodology as discussed in previous chapter. The discussion will much revolve around software process of SMS project consisting activities started with System Requirement Analysis, followed by Software Design, System Implementation and Integration. In conjunction with the Waterfall model that being adopted as a software process, every aspect of the development activity should be related accordingly. Following the guideline of DoD standard, quality of software engineering document specifically SRS and SDD has been maintained. 60 4.2 System Requirement Analysis The first task in SMS Software Process is to capture and analyze system requirement. This section will elaborate more about the steps involved and the output of the activity performed. Relevant example from the SMS project is taken to clarify the discussion. For ease of understanding, this section has been divided into few subsections as follows: • Requirement gathering • Use Case Model • Object and Class Identification • Sequence Diagram • Collaboration Diagram • Activity Diagram • Analysis Class Diagram Software model adopted in this project which is UML will be used to construct the analysis model. Software tools such as Rational Rose and Microsoft Word will be used in this activity. Following the guideline of Waterfall model, all the activities mention in this section must be completed prior to move to the next phase. 4.2.1 Requirement Gathering All possible requirements of the system to be developed are captured in this phase. Most of the requirement has been gathered via series of discussion the Industrial Mentor. Internet survey to other university web application such as UTM and UiTM has been carried out to get the more idea. Additionally, Interview with few Mesiniaga staff that serve as mentor of WBL program is also done. Actors that represent who use the system and Use Case that represent what the system will offer has been identified. The next step will be to construct the Use Case Model. 61 4.2.2 Use Case Model Use Case model is a model of the system intended function (use case) and its surroundings (actor). Functional requirement has been identified and high level use case diagram has been constructed and proposed to Industrial Mentor. Figure 4.1 depict the use case diagram. There are 2 actors and 10 use cases have been identified in SMS project. While the details of the system can be referred in SRS document, this section summarizes the use case function. There are 4 functions that a student can perform which is Login into to the system, view the subject list, View Result and View schedule. The Administrator has 6 functions that he can perform which are Login into the system, Manage Student record, Manage subject Record, Manage Student Result, Manage Schedule and Manage Admin record. Rational Rose has been used through out the modeling phase. Every use case identified in this phase will be elaborated more using Use Case Scenario. Basically, use case scenario is flow of event between the use case (system) and the actor. The event flow can be further broken into 3 categories which are Basic flow, Alternative flow and Exception flow. The next step is to identify the class object. 4.2.3 Object and Class Identification An Object is something that has state, behavior and identity. A group of Object with similar attributes, common behavior, and common relationship with other object can be considered as a Class. An object is an instance of a class and class can be seen as blueprint of object. Using this characteristic, classes have been identified and further classified into 3 categories namely Boundary class, Controller Class and Entity Class. In this project Boundary classes are consist of User Interface 62 that student and administrator interact with. The controller class provides CreateRead-Update-Delete (CRUD) function to the system while the Entity class represents data mapping to the database. The details of the class diagram will be further explained in the Class diagram section. The next step is to construct sequence diagram. Student Login View Subject Student View Schedule View Result Admin Login Manage Student Record Manage Admin Record Administrator Manage Subject Manage Result Manage Schedule Figure 4.18 : Use Case Diagram 63 4.2.4 Sequence Diagram Sequence diagram represents the messages exchanged in ordered manner between objects in a scenario. Figure 4.2 shows an example of sequence diagram taken from this project. It illustrates the flow of event of use case “View Subject Record” starting from the beginning until the end. The use case scenario identified from previous stage will be used to construct the sequence diagram. Every Event flow in the scenario will be converted to sequence diagram, which include Alternative and Exception flow. Basic Sequence Diagram: View Subject : SubjectViewJSP : Subject : Student The use case begin when student press View Subject button. press view subject button : PersistenceServiceInterface : SubjectRecord getAllSubject( ) getAllSubjectRecord( ) getSubjectName( ) Subject controller will request the current subject from persistence Service Interface acording to semester. getMentorName( ) Persistence Service will get the info from subject record and return the output to subject controller. Subject controller will pass the subject info to Student Interface to preview the subject list. use case end verify subject return subject display Subject list press details button display subject details Figure 4.19 : Sequence Diagram 64 4.2.5 Collaboration Diagram Using Rational Rose tools, the collaboration diagram can be obtained automatically from sequence diagram. Whereas the Sequence diagram illustrates the objects and actor interactions over time, the Collaboration diagram shows the objects and actor interactions without reference to time. Collaboration diagram will become the base guide of the system architecture construction. It also used to analyze the dependency between classes, hence quality might be observed. The Figure 4.3 shows the example of collaboration diagram. The next step is to build the activity diagram. Basic Sequence Diagram: View Subject 6: verify subject 3: getAllSubjectRecord( ) : Subject : PersistenceServiceInterface 7: return subject 4: getSubjectName( ) 5: getMentorName( ) 2: getAllSubject( ) 1: press view subject button 9: press details button : SubjectViewJSP : SubjectRecord 8: display Subject list : Student 10: display subject details Figure 4.20 : Collaboration Diagram 4.2.6 Activity Diagram The activity diagram will be constructed based on the use case identified to show the functionality of the system. This diagram defines where the workflow starts, where it ends, what activities occur during the workflow. It also illustrates the order the activities occur. Figure 4.4 shows the example of the activity diagram. The 65 diagram is divided into vertical swimlanes, each swimlane represents a different role within the workflow. By looking at the activities within a given swimlane, we can find out the responsibility of that role. The transitions between activities in different swimlanes identify the communication between roles. The next step is to identify the interaction between classes. Administrator AdminLoginFormJSP Enter userID & Password & press Enter Buttorn Login PersistenceServiceInterface request service to PersistenceService Get userID & Password Verify userID & password Display login success message correct login info? true Display Login screen with error false Figure 4.21 : Activity Diagram 4.2.7 Class Diagram Class diagrams show the interactions between classes in the system. The lines connecting classes show the communication relationships between the classes. Figure 4.5 illustrate the class diagram of this project. It has been arranged in accordance with the class classification which is Boundary, Controller and Entity Class. 66 <<boundary>> AdminLoginFormJSP <<boundary>> AdminFormJSP <<boundary>> StudentListJSP <<boundary>> SubjectListJSP <<boundary>> ResultListJSP <<boundary>> ScheduleListJSP (f rom CSC Admin View) (f rom CSC Admin View) (f rom CSC Admin View) (f rom CSC Admin View) (f rom CSC Admin View) (f rom CSC Admin View) <<boundary>> AdminListJSP <<boundary>> StudentFormJSP <<boundary>> SubjectViewJSP <<boundary>> ResultViewJSP <<boundary>> ScheduleViewJSP (from CSC Admin View) (f rom CSC Admin View) (f rom CSC Student View) (f rom CSC Student View) (f rom CSC Student View) <<boundary>> StudentLoginFormJSP <<boundary>> SubjectFormJSP <<boundary>> ResultFormJSP <<boundary>> ScheduleFormJSP (f rom CSC Student View) (f rom CSC Admin View) (f rom CSC Admin View) (f rom CSC Admin View) <<control>> Login <<control>> Admin <<control>> Students <<control>> Subject <<control>> Result <<control>> Schedule (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) <<Interface>> PersistenceServiceInterface (f rom CSC Service Interf ace) <<control>> PersistenceServiceImpl (f rom CSC Service Interf ace) <<entity>> StudentRecord <<entity>> ResultRecord <<entity>> ScheduleRecord <<entity>> SubjectRecord <<entity>> AdminRecord (f rom CSC Entity) (f rom CSC Entity) (f rom CSC Entity) (f rom CSC Entity) (from CSC Entity) Figure 4.22 : Class Diagram 4.2.8 Requirement Artifact Documentation During the use case development every requirement stated in the scenario will be identified with unique number. A traceability matrix table which contains overall requirement will be useful for the next development phase. Ultimately, Software Requirement Specification (SRS) document is created using the software 67 standard guideline adopted in this project. This document serves the purpose of guideline for the next phase of the model. Basically it contains all artifacts identified in Requirement Analysis. 4.3 Software Design This section discusses about activities in converting the requirement analysis into software design where system architecture has been define. Following the steps in Waterfall Model, the details of the discussion has been divided into 2 subsections namely Preliminary Design and Detail Design. The artifact output of both activities elaborated with relevant sample from the engineering document of this project. 4.3.1 Preliminary Design In this phase, identified classes have been arranged into packages in accordance with its functionality. There are total of 5 packages has been identified in this project. This package is also known as Computer Software Component (CSC). During the literature review, Struts 2 Framework has been identified as a framework for implementation. Therefore the system architecture has been design to meet the requirement of this framework. As explained in chapter literature review, Struts 2 framework imposes MVC pattern. Therefore by adopting this framework, the project confirmed to follow this best practice pattern. The figure 4.6 is the MVC architecture used in this project. It has been arranged into 3 layers consisting View layer, Struts 2 Controller configuration layer and Model layer. 68 View Layer CSC Admin View CSC Student View <<boundary>> <<boundary>> ScheduleFormJSP StudentFormJSP <<boundary>> AdminLoginFormJSP <<boundary>> SubjectFormJSP <<boundary>> <<boundary>> ResultListJSP SubjectListJSP <<boundary>> ScheduleListJSP <<boundary>> AdminListJSP <<boundary>> StudentLoginFormJSP <<boundary>> ResultViewJSP <<boundary>> ScheduleViewJSP <<boundary>> SubjectViewJSP <<boundary>> ResultFormJSP <<boundary>> <<boundary>> AdminFormJSP StudentListJSP Controller Layer Model Layer CSC Service Interface CSC Action <<control>> Login <<control>> Subject <<control>> Admin <<control>> Students <<control>> Result <<Interf ace>> PersistenceServiceInterf ace <<control>> Schedule <<control>> PersistenceServiceImpl (fromCSC Service Interface) (fromCSC Service Interface) CSC Entity <<entity>> AdminRecord <<entity>> StudentRecord <<entity>> ScheduleRecord (fromCSC Entity) (fromCSC Entity) (fromCSC Entity) <<entity>> ResultRecord <<entity>> SubjectRecord (from CSC Entity) (from CSC Entity) Figure 4.23 : SMS System Architecture View layer has 2 packages, consisting JSP classes that serves as interface for student and administrator. The controller layer is managed by Struts 2 framework itself. There are 2 components used by the framework to perform the controller task which Filterdispatcher and Interceptor. The developer does not required to create any classes in this layer, rather the framework provides XML files to configure the controller. Implementation phase provides the detail elaboration. The model layer consist of 3 packages namely Action, Persistence Service and Entity. The name 69 Action has been adopted in conjunction with Struts 2 concept of action class. The Persistence Service provides database access services to Action class. It consists of Interface and its implementation class. While the classes in Entity package used for Object to Relational Mapping (ORM). Interaction between packages is also analyzed in this phase State chart diagram is also developed in this phase. This diagram is used to model the dynamic behavior of SMS system as shown in figure 4.7. Dynamic diagram as shown in figure 4.8 will also build. Figure 4.24 : State Chart Diagram 70 4.3.2 Detail Design During the Detailed design stage, the operation and attribute of every class will be identified. The function of every operation is learned and algorithm is developed and documented. The output of the detail design will help the coding implementation stage. SMS.war Mysql Server Tomcat Server SMS Database Figure 4.25 : SMS Dynamic Diagram 4.3.3 Database Design The database used in this project is MySQL. JPA/Hibernate technology has been used to automatically generate the database table and its column. Through this technology, ORM method has been used to map java class and its property into corresponding table and column of the database. Tables listed in this section are mapping between Java classes and its corresponding database tables that used in this project. 71 Table 4.3 : AdminRecord Table CSU AdminRecord class property Name Data Type id Long userName String userID String password String MySql Database Table Format Column Name Data Type Id (PK) Long userName Varchar userID Varchar Password Varchar Table 4.4 : StudentRecord Table CSU StudentRecord class property Name Data Type id Long userID String password String firstName String lastName String studentID String icNumber Long email String housePhoneNo Integer mobilePhoneNo String address String collegeName String MySql Database Table Format Column Name Data Type Id (PK) Long userID Varchar Password Varchar firstName Varchar lastName Varchar studentID Varchar icNumber Long Email Varchar housePhoneNo Int mobilePhoneNo Varchar Address Varchar collegeName Varchar Table 4.5 : ResultRecord Table CSU ResultRecord class property Name Data Type id Long semester integer year Date studentName String subjectName String grades String MySql Database Format Column Name Data Type id (PK) Long Semester Int Year Date studentName Varchar subjectName Varchar Grades Varchar 72 Table 4.6 : ScheduleRecord Table CSU ScheduleRecord class property Name Data Type id Long event String schedule Date time Time venue String mentor String MySql Database Format Column Name Data Type Id (PK) Long Event Varchar Schedule Date Time Time Venue Varchar Mentor Varchar Table 4.7 : SubjectRecord Table CSU SubjectRecord class property Name Data Type id Long SubjectName String MentorName String description String 4.3.4 MySql Database Format Column Name Data Type Id (PK) Long SubjectName Varchar MentorName Varchar description Varchar Design Artifact Documentation During the preliminary design every packages and classes has been identified with unique number. A traceability matrix table which contains the mapping between requirements, packages and classes will be built. The table 4.6 is the sample of the constructed traceability. Ultimately, Software Design Document (SDD) is created using the software standard guideline adopted in this project. Basically this document contains all artifact that has been identified in preliminary and detail design. This document serves the purpose of guideline for the next phase which is Implementation phase. 73 Table 4.8 : Parts of Traceability table CSC CSU SRS CSC Student View (SDD-REQ100) StudentLoginFormJSP (SDD-REQ-101) SRS-REQ-101 SRS-REQ-102 SRS-REQ-103 SRS-REQ-104 SRS-REQ-105 SRS-REQ-106 SRS-REQ-107 SRS-REQ-201 SRS-REQ-204 SRS-REQ-205 SRS-REQ-301 SRS-REQ-304 SRS-REQ-305 SRS-REQ-401 SRS-REQ-402 SRS-REQ-405 SRS-REQ-406 SubjectViewJSP (SDD-REQ-102) ScheduleViewJSP (SDD-REQ-103) ResultViewJSP (SDD-REQ-104) 4.4 Description Press on Student Area Display login screen Press on Login button Display main screen Press on Reset button Invalid login information Empty login information Press on View Subject button Display subject list No Subject Record Press on View Schedule button Display schedule list No Schedule Record Press on View Result button Select semester & year Display result list No Result Record Implementation This section is divided into 2 activities consisting project setup and coding and unit testing. 4.4.1 Project Setup Before coding can be carried out, programming platform and testing servers need to establish. The fist step is to install and configure Apache Tomcat and MySQL servers. Tomcat server is used to host the web application during testing and MySQL server is used to host the database used in this project. 74 The next step is to prepare the programming platform. This is not an easy task due to lack of experience and usage of multiple technology. Basically NetBean IDE has been used as programming tools. The first step is to import and configure the Apache Struts 2 framework into NetBean IDE. Next step is to import and configure Apache Tiles 2 into NetBean IDE. This framework will be used to manage the user interface rendering. The final step is to import and configure JPA/Hibernate framework into NetBean IDE. Although this is step by step process, it is difficult to implement due to lack of reference. 4.4.2 Coding and Debuging The coding phase needs deep knowledge about Java programming and object oriented technique. This includes traditional Java standard and JSP programming. Programming technique using Struts 2 is also very important. For sake of better understanding on MVC element of system, the following discussion will be divided into subsection explaining about how to implement Model, View and Controller using Struts 2. The use of Tiles and JPA/Hibernate are also explained. 4.4.2.1 View Layer Implementation The classes in View layer has been implemented in JSP with combination of Struts 2 User Interface (UI) tag. This tag must be used so that classes in view layer can communicate with Struts 2 controller. Knowledge of other technology such as HTML and Cascade Style Sheets (CSS) is very helpful in developing View Layer. Figure 4.9 shows the example of View Layer coding implemented in JSP. 75 Figure 4.26 : View Layer in JSP 4.4.2.2 Controller Layer Implementation The communication between JSP in View Layer and classes in Action packages of Model Layer is done using Struts 2 controller. Basically this controller is internal component of Struts 2 and there is no programming needed. However the communication need to be configured using XML file named as struts.xml. This is further discussed in Integration section. Referring to the Struts 2 architecture, the wiring mechanism is the Controller Layer of the system. The content of the XML files is the definition of Action class and its corresponding View class. Figure 4.10 shows the example of struts.xml contents. 76 Figure 4.27 : Controller Layer in XML 4.4.2.3 Model Layer Implementation As shown in figure 4.6, Model layer consist of Action, PersistenceService and Entity packages. As a name suggest, in struts 2 point of view, the classes in Action packages is the implementation of struts 2 action class framework. Classes in Action packages have been developed in traditional Java standard which is also known as (POJO). Java class must implement Struts 2 framework in order to comply with the architecture. In this project the Action classes are basically providing CRUD services to the View layers. Instead of direct call to the database, View layer will ask Action class to perform the job. Figure 4.11 shows the example of Action class in this project. 77 Figure 4.28 : Action Class 4.4.2.4 JPA/Hibernate Implementation Classes in Persistence Services and Entity class are also implemented using POJO. However the classes must implement JPA/Hibernate framework. This framework is needed for the ORM implementation. Using ORM technique, database table will be created and managed using POJO in Persistence Services and Entity packages. Classes in Persistence Service package will provide database CRUD implementation as per requested by the classes in Action package. Classes in Entity package serve as entity classes that map its attribute to the column of database table. This is sophisticated ORM features where, the name of the entity class will be the name of the database table, while the name of the java property will become name of the column. For instance if the class is named “StudentRecord” and has java property of “name” and “password”, then database table will be created where the table name is “StudentRecord” and 2 column named as “name” and “password”. Using ORM technique, the database management can be simplified using plain java language. The coding sample of JPA/Hibernate used in Persistence Service and Entity package is shown in figure 4.12 and 4.13 respectively. 78 Figure 4.29 : PersistenceService in JPA/Hibernate Figure 4.30 : Entity in JPA/Hibernate The integration between persistence service and JPA/Hibernate is done using PersistenceContext.xml files. The entityManager is defined in these files so that the appropriate Hibernate annotation can be used in Persistence Service class and entity class. The integration of MySQL database with JPA/Hibernate is also defines in this XML files. 79 4.4.2.5 Tiles Implementation Tiles is configured using configuration files named tiles.xml. During the integration of Tiles 2, the struts.xml file needs to be modified accordingly. Without the Tiles, Action class has a direct mapping to the classes in view layer using single truts.xml files. With the involvement of Tiles, however, Action class is mapped to the definition in tiles.xml where classes in view layer are defined. Figure 4.10 shows the example of tiles.xml files used in this project. Figure 4.31 : Tiles XML file 4.4.2.6 SMS Application Screen Capture This section provide sample of SMS application screen capture. Although Coding and debugging is still in progress, there are few CSU has been completed. The following figure shows these some of the SMS Application Screen capture. 80 Figure 4.32 : Screen Capture of Login Figure 4.33 : Screen Capture of Subject Form Figure 4.34 : Screen Capture of Subject List CHAPTER 5 CONCLUSION 5.1 Introduction This final chapter reviews the objectives of the thesis and shows how the work presented in this thesis meets these objectives. It also discusses the Contribution made by this thesis. Future works section elaborates how to extend and enhance the SMS project in the future. 5.2 Objective Achievement The main objective of this project is to develop a Student Management System (SMS) for Kolej Komuniti in Mesiniaga Bhd under the Work Based Learning (WBL) program. Following is the details of the project objective to be archived: 82 • To study and understand the Struts 2 Framework and its Model-ViewController (MVC) architecture. • To study and analyze the requirement specifications of the Student Management System of the Kolej Komuniti. • To produce the SRS of the Student Management System • To produce the SDD of the Student Management System • To develop the prototype of Student Management System using Struts 2 architecture During the literature review the Apache Struts 2 framework has been learned in deep. The interest in this framework leads to learn its integration with other supporting technology such as Apache Tiles 2, JPA and Hibernate. The literature review also cover the SMS project background and essence of the software engineering methodology, that offer guideline toward project implementation hence archiving project objective. The methodology chapter specifies the software engineering methodology adoption and describes the way it must be carried out in the implementation phase. Project strategy has been define and problem solving methodology has been constructed which based on the guideline in literature review. Problem solving methodology has been applied for entire project implementation. The Software engineering document, specifically SRS and SDD have been produced in accordance with the Software standard define in the software engineering methodology. 5.3 Experience Gained There are many invaluable experience gained during course of this project. Literature study exposes the student to knowledge of software engineering methodology and Struts 2 Java Web framework, where essences have been 83 practically used during implementation. Time estimation during project planning is one of the interesting parts. The activities in the planning are the mixture of software process and thesis writing. Project strategy has been created in accordance with this planning. Indeed meeting the activity target according to the milestones defined, is a tough task to do. Implementation phase is probably the most challenging task encountered in this project. Lack of experience in web application development is one the contributing factor. Using technology mixture of Struts 2, Tiles 2, JPA and Hibernate for the fist time is another factor. While there are not many web applications has been build using Struts 2 framework yet, it impose MVC pattern which favorable for best practice software engineering design. Through this project, the student has shown the contribution by promoting the practical use of this framework. 5.4 Future Recommendation The Student Management System serves it purpose by providing intended services to the Kolej Komuniti student in Mesiniaga, however over the time the system can be improved further. The features of the system can be extended in the following ways: • Additional Functionality. Additional functionality such as Discussion Forum can be included into the current system. This will provide the student a platform to interact with the mentor hence improve the learning process. • AJAX inclusion. AJAX is very well integrated with Struts 2 framework. Using this technology, Client-Server interaction can be improved efficiently. Using Asynchronous Java Script and XML (AJAX), entire page do not required to refresh upon receiving the response from server, instead only defined part to refresh. 84 REFERENCES 1. Richard N. Taylor. Principled Design of the Modern Web Architecture. ACM Transactions on Internet Technology, Vol. 2, No. 2, University of California, Irvine. May 2002: 115–150. 2. Multitier architecture, Wikipedia. Retrieve January 27, 2009. From the http://en.wikipedia.org/wiki/Three-tier_(computing) 3. Sun Microsystems. The Java EE 5 Tutorial for Sun Java System Application Server 9.1 Santa Clara, U.S.A.Sun Microsystems Inc. 4. Morales-Chaparro R, Linaje M, Preciado. MVC Web design patterns and Rich Internet Applications. QUERCUS Software Engineering Group. Universidad de Extremadura, Cáceres. 2005 5. Presentation-Abstraction-Control, Wikipedia. Retrieve April 22, 2009. From the http://en.wikipedia.org/wiki/Presentation-abstraction-control 6. Torsten llmann, Michael Weber. A Pattern-Oriented Design of a Web-Based and Case-Oriented Multimedia Training System in Medicine. University of Ulm, 7. Germany. 1999 Sridaran R, Padmavathi G, Iyakutti K. A Survey of Design Pattern Based Web Applications. Journal of Object Technology. Vol. 8, No. 2, ETH Zurich. March-April 2009 85 8. Rhizome and the PAC Pattern. Retrieve April 22, 2009. From the http://sinciput.etl.luc.edu/2008/01/rhizome-and-pac-pattern.html 9. Ron Burback . Software Engineering Methodology: The WaterSluice. Stanford University. Dissertation for the degree of Doctor of Philosophy. 1998. 10. Darius Damalakas. XP versus UP:A methodology comparison study work. Roskilde Business College .2004 11. Reed Sorensen .A Comparison of Software Development Methodologies. Hill AFB, Software Technology Support Center. 1995. 12. Unified Process, Wikipedia. Retrieve January 3, 2009. From the http://en.wikipedia.org/wiki/Unified_Process 13. Lorena Azócar Merida. Rational Unified Process (RUP) and its relationship with the end-user in the software system development process. Department of Informatics. Lund University. 2008 14. Jeffrey L. Brewer. A Study of Software Methodology Analysis:“Great Taste or Less Filling” Department of Computer & Information Technology, Purdue University. 2005 15. Agile software development, Wikipedia. Retrieve January 3. 2009. From the http://en.wikipedia.org/wiki/Agile_software_development 16. Jonathan I. Maletic . An Introduction to eXtreme Programming Department of Computer Science, Kent State University. 2002. 17. K. Barclay, J. Savage. Object-Oriented Design with UML and Java. Burlington. Elsevier Butterworth-Hainemann. 2004. 86 18. Jim Conallen . Building Web Applications with UML. Toronto, Canada. Addison-Wesley. 2000 19. Wendy Boggs, Michael Boggs. Mastering UML with Rational Rose 2002. Alameda, CA. SYBEX Inc. 2002 20. Terry Quatrani. Visual Modeling with Rational Rose 2000 and UML.Addison Wesley. 1999. 21. Importance of CASE Tools. Retrieve January 3 rd, 2009. From the http://www.buzzle.com/articles/importance-of-case-tools.html 22. NetBeans - Development Simplified. Retrieve January 10th, 2009. From the http://www.netbeans.org/features/ 23. NetBeans. January 10th,2009. From the http://en.wikipedia.org/wiki/NetBeans 24. MySQL, Wikipedia. Retrieve January 10th, 2009. From the From the http://en.wikipedia.org/wiki/Mysql 25. Why MySQL?, Retrieve January 10 th, 2009. http://www.mysql.com/why-mysql/ 26. Apache Tomcat, Wikipedia. Retrieve January 10th , 2009. From the http://en.wikipedia.org/wiki/Apache_Tomcat 27. Donald Brown, Chad Michael Davis, Scott Stanlick. Struts 2 in Action, Greenwich, CT . Manning Publications Co. 2008. 28. Tim Downey. Web Development with Java Using Hibernate, JSPs and Servlets. Miami, USA. Springer-Verlag. 2007 87 29. Ian Roughley. Starting Struts 2 . InfoQ Enterprise Software Development series, C4Media Inc. 2006. 30. Budi Kurniawan. Struts 2 Design and Programming: A Tutorial. BrainySoftware 31. Publisher. 2008. Ian Roughley. Practical Apache Struts2 Web 2.0 Projects. Berkeley, CA Apress, 2007. 32. Apache Struts 2 Documentation Guides. Retrieve January, 17 2009. From the http://struts.apache.org/2.x/docs/guides.html 33. Java Persistence/What is JPA? Wikipedia. Retrieve January, 3 2009. From the http://en.wikibooks.org/wiki/Java_Persistence/What_is_JPA%3F 34. BEA Systems. KodoTM 4.0.0 Developers Guide for JPA/JDO. BEA Systems Inc. 2006 35. Hibernate (Java), Wikipedia. Retrieve January, 3 2009. From the http://en.wikipedia.org/wiki/Hibernate_(Java) 36. Patrick Peak. Hibernate Quickly. Greenwich. Manning Publications Co. 2006. 37. Tiles concepts. Retrieve January, 3 2009. http://tiles.apache.org/framework/tutorial/basic/ concepts.html From the 88 APPENDICES 89 APPENDIX A SMS Project Schedule 90 APPENDIX B Sequence Diagram for SMS Basic Sequence Diagram : Admin Login : Administrator The use case begin when Admin input his userID and password into the LoginForm screen and press button login : AdminLoginFormJSP : Login : PersistenceServiceInterface : AdminRecord enter username enter password press login button getUsername( ) Username and password will be send to Persistence service interface to check if the user is valid or not. getPassword( ) autheticateAdmin( ) getUsername( ) Persistence service will get the username and passord data from Admin Record databases. Internal comparison will be done and return the record status to Login controller. getPassword( ) validateAdmin( ) If the return status contain the users information then the Login controller will return success to LoginForm. setSession( ) return "success" display welcome screen Welcome screen will be prompted to the admin. use case end A1-Alternative Sequence Diagram: Reset Login Information : Administrator The use case begin when administrator press reset button on login screen. : AdminLoginFormJSP press reset button reset form The login form will reset the any character typed in the login form. prompt empty Login Form Administrator will be prompted back to login screen. use case end E1-Exception Sequence Diagram: Invalid Login Information : Administrator : AdminLoginFormJSP : Login : PersistenceServiceInterface validateAdmin( ) The use case begin when Login controller found that user ID and password is invalid. The Login controller will return "fail' message to LoginForm. return "login fail" promp Login Form Administrator will be prompted back to login screen with error message. use case end E2-Exception Sequence Diagram: Empty Login Information : Administrator The use case begin when administrator press login button while username and password information is empty : AdminLoginFormJSP press login button getUsername( ) getPassword( ) The Login controller will return "fail' message to LoginForm. Administrator will be prompted back to login screen with appropriate error message. use case end return "fail" Prompt login screen with error : Login Basic Sequence Diagram: Manage Admin Record : AdminListJSP : Administrator : AdminFormJSP press manage admin button The use case begin when Administrator press manage admin button. Admin controller will request all admin record. The persistence service will get admin details f rom database and pass it to admin controller. Then, admin records will be displayed to the administrator : Admin : PersistenceServiceInterf ace : AdminRecord getAllAdmin( ) display Admin Record getAllAdminRecord( ) getAdminDetails createAdminRecord( ) setAdminDetails press Add Admin navigate display entry form Administrator press add button, entry form will be displayed and administrator enter user details press submit button.Admin controller will request to create admin record. The persistence service will save the admin details to database. The updated admin record will be displayed to administrator. enter admin details & submit display Admin Record press edit admin Administrator press edit button, editable entry f orm with existing data will be displayed. Administrator display editable entry form updates record and press submit button.Admin controller will request to update admin record. The update record & submit persistence service will save the admin details to database. The updated admin record will be displayed to administrator. Administrator press delete button, a confirmation dialog box will displayed. Administrator choose ok to confirm. Admin controller will request to delete the admin record. The persistence service will delete the admin details from database. The updated admin record will be displayed to administrator. createAdmin navigate navigate updateAdmin updateAdminRecord( ) updateAdminDetails navigate display admin record press delete admin prompt confirmation confirm deleteAdmin( ) use case end deleteAdminRecord deleteAdminDetails display admin record A1-Alternative Sequence Diagram: Reset Admin Information : AdminFormJSP : Administrator press reset button The use case begin when Administrator press reset button on AdminForm interface. reset form The AdminForm will reset any character the previously typed in the form. Administrator will be prompted back to unmodified AdminForm interface. use case end display unmodified admin entry form A2-Alternative Sequence Diagram: Cancel Admin Record Deletion : AdminListJSP : Administrator delete admin record The use case begin when administrator press delete button, a confirmation dialog box will displayed. Administrator choose "Cancel" button to cancel the record deletion. display confirmation dialog box press cancel button display unmodified admin list Administrator will be prompted back to unmodified admin list interface. use case end Basic Sequence Diagram: M anage Result : ResultListJSP : Admi nistrator : Resul tFormJSP manage Result The use case begin when Admi nistrator press manage result button. Li st of semester display semester& year l ist and year wil l be prompted. Admi nistrator select semester& year select appropri ate semester & year press submi t. The resul t control ler wil l request all resul t. The persi stence servi ce wi ll get resul t and student detai ls from database and pass it to result control ler. Then, student l ist wil l di splay student List be displayed to the admi nistrator : Result getResul t( ) : Persi stenceServi ceInterface getResultList( ) : : Resul tRecord StudentRecord getStudentDetai ls getResult vi ew result Admini strator press vi ew resul t button and the resul t controll er get the result according to studentID. Then, result records wil l be displ ayed to the admini strator getResult(studentID ) displ ay resul t Admini strator press add button, entry form create new resul t wi ll be displayed and admini strator enter user detail s and press submit button. resul t controll er wi ll request to create result record. di spl ay entry form The persistence service wil l save the resul t enter detai ls detail s to database. The updated result record wil l be di spl ayed to admini strator. displ ay student l ist Admini strator press edi t button, editable edit result entry form with existing data wil l be displ ayed. Admi nistrator updates record and display editable form press submit button.result control ler wi ll request to update resul t record. The edi t detai ls & submi t persi stence servi ce wi ll save the result detail s to database. The updated result record wil l be di spl ayed to admini strator. displ ay student l ist navigate createResul t createResul tRecord( ) navigate getStudentDetai ls setResul t navigate updateResult updateResul tRecord( ) navigate getStudentDetai ls setResul t delete result Admini strator press del ete button, a confi rmati on di alog box wi ll di splayed. prompt confirmation Admini strator choose ok to confi rm. resul t confi rm controll er wi ll request to del ete the resul t record. The persistence service wil l delete the resul t detai ls from database. The updated resul t record wi ll be displayed to displ ay student l ist admini strator. use case end deleteResult( ) del eteResul tRecord( ) getStudentDetai ls deleteResult A1-Alternative Sequence Diagram: Reset Result Information : ResultFormJSP : Administrator The use case begin when Administrator press reset button on ResultForm interface. The ResultForm will reset any character the previously typed in the form. press reset button reset form display unmodified result form Administrator will be prompted back to unmodified ResultForm interface. use case end A2-Alternative Sequence Diagram: Cancel Result Record Deletion : ResultListJSP : Administrator The use case begin when administrator press delete button, a confirmation dialog box will displayed. Administrator choose "Cancel" button to cancel the record deletion. Administrator will be prompted back to unmodified student list interface. use case end press delete button display confirmation dialog box press cancel display unmodified student list Basic Sequence Diagram: Manage Schedule : ScheduleListJSP : Adm inistrator press manage schedule button The use cas e begin when Administrator press manage schedule button. schedule controller will request all s chedule rec ord. The persistence serv ice will get schedule details f rom database and pass it to schedule controller. Then, schedule records will be display ed to the administ rator Administrator press add button, entry f orm will be display ed and administrator enter schedule det ails and press subm it button. schedule controller will request to create schedule record. The persistence serv ice will sav e the sc hedule details to database. The updated sc hedule record will be display ed t o administrator. Administrator press edit button, editable entry f orm with ex isting data will be display ed. Administrator updat es record and pres s subm it button. schedule controller will request t o update schedule record. The persistence serv ic e will s av e the schedule details to database. The updated schedule record will be display ed to adm inistrator. Administrator press delete but ton, a conf irmation dialog box will display ed. Adm inistrator c hoose ok to conf irm. schedule controller will request to delete the s chedule record. The persist ence serv ice will delete the schedule det ails f rom database. The updat ed schedule record will be display ed to administrator. : ScheduleFormJSP : Schedule getSchedule( ) : PersistenceServ ic eInterf ace get Sc heduleRecord : ScheduleRecord get Sc hedule( ) display schedule pres s create Sc hedule button nav igate display entry f orm ent er schedule details & submit createSc hedule createSc heduleRecord( ) set Sc hedule( ) nav igate display schedule press update schedule nav igate dis play entry f orm update schedule details & submit updat eSchedule updat eScheduleRecord( ) set Sc hedule( ) nav igate display entry f orm press delete schedule display conf irm ation press ok t o conf irm deleteSchedule( ) use c ase end delet eScheduleRecord( ) delet eSchedule display schedule A1-Alternative Sequence Diagram: Reset Schedule Information : Administrator The use case begin when Administrator press reset button on ScheduleForm interface. : ScheduleFormJSP press reset schedule button reset form The ScheduleForm will reset any character the previously typed in the form. display unmodified schedule form Administrator will be prompted back to unmodified ScheduleForm interface. use case end A2-Alternative Sequence Diagram: Cancel Schedule Record Deletion : Administrator The use case begin when administrator press delete button, a confirmation dialog box will displayed. Administrator choose "Cancel" button to cancel the record deletion. : ScheduleListJSP press delete schedule display confirmation press cancel button Administrator will be prompted back to unmodified schedule list interface. display unmodified schedule use case end Basic Sequence Diagram: Manage Student Record : StudentListJSP : Administrator : StudentFormJSP : Students : PersistenceServiceInterface : StudentRecord press manage student button getAllStudent( ) The use case begin when Administrator press manage student button. Student controller will request all student record. The persistence service will get student details from database and pass it to student controller. T hen, student records will be displ ayed to the administrator Admini strator press add button, entry form will be displ ayed and administrator enter user details and press submit button. Student controller will request to create student record. The persistence service will save the student details to database. The updated student record will be displayed to administrator. Admini strator press edit button, edi table entry form with existing data will be displayed. Administrator updates record and press submit button.student controller will request to update student record. The persistence service will save the student details to database. T he updated student record wil l be displayed to administrator. Admini strator press delete button, a confi rmation dialog box will displayed. Admini strator choose ok to confirm. Student controller will request to delete the student record. The persistence service will delete the student details from database. The updated student record wil l be displayed to administrator. use case end getAllStudentRecord( ) getStudentDetails display all student record press add student button navigate display student entry form enter student details & submit createStudent createStudentRecord( ) navigate setStudentDetail s display all Student record press edit button navigate displ ay exi sting student entry form upated student record & submit updateStudent updateStudentRecord( ) navigate updateStudentDetails dispalay student record press delete button display confirmation press OK to confirm deleteStudent( ) deleteStudentRecord( ) display student record deleteStudentDetails A1-Alternative Sequence Diagram: Reset Student Information : StudentFormJSP : Administrator press reset button The use case begin when Administrator press reset button on StudentForm interface. The StudentForm will reset any character the previously typed in the form. Administrator will be prompted back to unmodified StudentForm interface. reset form display unmodified student form use case end A2-Alternative Sequence Diagram: Cancel Student Record Deletion : StudentListJSP : Administrator The use case begin when administrator press delete button, a confirmation dialog box will displayed. Administrator choose "Cancel" button to cancel the record deletion. Administrator will be prompted back to unmodified student list interface. use case end press delete button prompt for confirmation press cancel button display unmodified student list Basic Sequence Diagram: Manage Subject : SubjectListJSP : Administrator : SubjectForm JSP : Subject : PersistenceServiceInterface : SubjectRecord press manage Subject button getAllSubject( ) The use case begin when Administrator press manage subject button. subject controller will request all subject record. The persistence service will get subject details from database and pass it to subject controller. Then, subject records will be displayed to the administrator Administrator press add button, entry form will be displayed and administrator enter user details and press submit button. subject controller will request to create subject record. The persistence service will save the subject details to database. The updated subject record will be displayed to administrator. Administrator press edit button, editable entry form with existing data will be displayed. Administrator updates record and press submit button.subject controller will request to update subject record. The persistence service will save the subject details to database. The updated subject record will be displayed to administrator. Administrator press delete button, a confirmation dialog box will displayed. Administrator choose ok to confirm. subject controller will request to delete the subject record. T he persistence service will delete the subject details from database. The updated subject record will be displayed to administrator. getAllSubjectRecord( ) getSubjectName( ) getMentorName( ) display subject list press add subject button navigate display subject entry form enter subject details & submit createSubject createSubjectRecord( ) setSubjectName( ) navigate setMentorName( ) display subject list press edit subject button navigate display subject entry form update subject & submit updateSubject updateSubjectRecord( ) setSubjectName( ) setMentorName( ) navigate display subject list press delete subject display confirmation choose OK to confirm use case end deleteSubject( ) updateSubjectRecord( ) delete Subject Details display subject list A1-Alternative Sequence Diagram: Reset Subject Information : Administrator The use case begin when Administrator press reset button on SubjectForm interface. : SubjectFormJSP press reset button The SubjectForm will reset any character the previously typed in the form. Administrator will be prompted back to unmodified SubjectForm interface. use case end reset form display unmodified subject form A2-Alternative Sequence Diagram: Cancel Subject Record Deletion : SubjectListJSP : Administrator press delete subject button The use case begin when administrator press delete button, a confirmation dialog box will displayed. Administrator choose "Cancel" button to cancel the record deletion. display confirmation press cancel button Administrator will be prompted back to unmodified subject list interface. display unmodified subject list use case end Basic Sequence Diagram : Student Login : Student : StudentLoginFormJSP : Logi n : PersistenceServi ceInterface UserID The use case begi n when student i nput his userID and password into the LoginForm screen and press button enter password press logi n button getUsername( ) getPassword( ) Username and password will be send Persistence servi ce i nterface if the user i s val id or not. autheticateStudent(, ) getUserID( ) Persistence service will get the username and passord data from Student Record databases. Internal comparison wi ll be done and return the record status to Logi n control ler. getPassword( ) val idateStudent( ) If the return status contai n the users i nformation then the Login controll er will return success to Logi nForm. setSession( ) return "succe... Welcome screen will be prompted to the student. welcome screen use case end : StudentRecord A1-Alternative Sequence Diagram: Reset Login Information : StudentLoginFormJSP : Student The use case begin when student press reset button on login screen. press Reset Button reset Form The login form will reset the any character typed in the login form. prompt empty Login Form Student will be prompted back to login screen. use case end E1-Exception Sequence Diagram: Invalid Login Information : StudentLo gi nFormJSP : L ogin : Persi stenceServi ceInterface : Student vali dateStude nt( ) T he use case be gi n when Logi n control ler fo und that user ID and passwo rd is inva lid . T the Logi n co ntrol l er wi ll return "fai l' messag e to Lo gi nForm. Student wil l be pro mpted back to l ogin scree n with error message. use case end return "i nval id pa ssword " promp Logi n Form E2-Exception Sequence Diagram: Empty Login Information : Student The use case begin when student press login button while username and password information is empty : StudentLoginFormJSP : Login press Login Button getUsername( ) getPassword( ) The Login controller will return "fail' message to LoginForm. Prompt login screen with error Student will be prompted back to login screen with appropriate error message. return "fail" use case end Basic Sequence Diagram: View Result : ResultViewJSP : Result : Student : PersistenceServiceInterface : ResultRecord : SubjectRecord press Online Result Button The use case begin when student press Online Result button. The student interface will prompt the semester & year selection. Student will enter selection and press view result button display semester & year list select semester & year press view result button requestResult( ) getResult(studentID) Result controller will initiate request result to Persistence Service interface. getStudentDetails The persistence service will get the record form Result database & return the result to Result controller. getResult verify result The result controller will verify the result & pass the result to Student Interface use case end send result display result E1-Exception Sequence Diagram: No Result Information : ResultViewJSP : Student : Result verify result The use case begin when the result controller found no result information. return null The controller will return null result information and result view will display "no result info" . display "no result info" use case end Basic Sequence Diagram : View Schedule : ScheduleViewJSP : Student The use case begin when student press View Schedule button. press View Schedule : Schedule : PersistenceServiceInterface : SubjectRecord getSchedule( ) getCurrentSemesterInfo Schedule controller will request the current schedule from persistence Service Interface acording to semester. getCurrentSchedule( ) Persistence Service will get the info from subject and schedule record and return the output to schedule controller. getSchedule( ) return Schedule return subject & schedule Schedule controller will pass the schedule info to Student Interface to preview the schedule. use case end : ScheduleRecord return Subject verify schedule return schedule preview schedule E1-Exception Sequence Diagram: No Schedule Information : Student : ScheduleViewJSP verify result The use case begin when the schedule controller found no result information. The controller will return null schedule information and schedule view will display "no schedule info" . use case end : Schedule return null schedule display "no schedule info" Basic Sequence Diagram: View Subject : SubjectViewJSP : Subject : PersistenceServiceInterface : Student press view subject button The use case begin when student press View Subject button. : SubjectRecord getAllSubject( ) getAllSubjectRecord( ) getSubjectName( ) Subject controller will request the current subject from persistence Service Interface acording to semester. getMentorName( ) Persistence Service will get the info from subject record and return the output to subject controller. verify subject Subject controller will pass the subject info to Student Interface to preview the subject list. return subject display Subject list use case end E1-Exception Sequence Diagram: No Subject Information : Student : SubjectViewJSP : Subject The use case begin when the subject controller found no result information. The controller will return null subject information and subject view will display "no subject info" . use case end verify subject return null subject display no subject info 91 APPENDIX C Collaboration Diagram for SMS Basic Collaboration Diagram: Admin Login 1: enter username 2: enter password 3: press login button : AdminLoginFormJSP 12: display welcome screen : Administrator : PersistenceServiceInterface 4: getUsername( ) 5: getPassword( ) 9: validateAdmin( ) 7: getUsername( ) 8: getPassword( ) 11: return "success" 10: setSession( ) 6: autheticateAdmin( ) : Login : AdminRecord A1-Alternative Collaboration Diagram: Reset Login Information 2: reset form 1: press reset button : AdminLoginFormJSP 3: prompt empty Login Form : Administrator E1-Exception Collaboration Diagram: Invalid Login Information : AdminLoginFormJSP 3: promp Login Form : Administrator 2: return "login fail" : Login : PersistenceServiceInterface 1: validateAdmin( ) E2-Exception Collaboration Diagram: Empty Login Information 1: press login button : AdminLoginFormJSP 5: Prompt login screen with error : Administrator 2: getUsername( ) 3: getPassword( ) 4: return "fail" : Login Basic Sequence Diagram: Manage Admin Record 1: press manage admin button 6: press Add Admin 15: press edit admin 26: confirm 24: press delete admin : AdminListJSP 5: display Admin Record : Administrator 14: display Admin Record 23: display admin record 25: prompt confirmation 30: display admin record : PersistenceServiceInterface 3: getAllAdminRecord( ) 11: createAdminRecord( ) 20: updateAdminRecord( ) 28: deleteAdminRecord 7: navigate 16: navigate 9: enter admin details & submit 18: update record & submit 2: getAllAdmin( ) 27: deleteAdmin( ) 13: navigate 22: navigate 8: display entry form 17: display editable entry form 4: getAdminDetails 12: setAdminDetails 21: updateAdminDetails 29: deleteAdminDetails 10: createAdmin 19: updateAdmin : AdminFormJSP : AdminRecord : Admin A1-Alternative Collaboration Diagram: Reset Admin Information 2: reset form 1: press reset button : AdminFormJSP 3: display unmodified admin entry form : Administrator A2-Alternative Collaboration Diagram: Cancel Admin Record Deletion 1: delete admin record 3: press cancel button : AdminListJSP 2: display confirmation dialog box : Administrator 4: display unmodified admin list Basic Collaboration Diagram: Manage Result 1: manage Result 3: select semester& year 9: view result 12: create new result 22: edit result 32: delete result 34: confirm : PersistenceServiceInterface : ResultListJSP : Administrator 2: display sem ester& year list 8: display student List 11: display result 21: display student list 31: display student list 33: prom pt confirm ation 39: display student list 13: navigate 23: navigate 5: getResultList( ) 17: createResultRecord( ) 27: updateResultRecord( ) 36: deleteResultRecord( ) 15: enter details 25: edit details & submit 20: navigate 30: navigate 14: display entry form 24: display editable form : ResultFormJSP 7: getResult 19: setResult 29: setResult 38: deleteResult 6: 18: getStudentDetails 28: getStudentDetails 37: getStudentDetails 4: getResult( ) 10: getResult(studentID ) 35: deleteResult( ) 16: createResult 26: updateResult : Result : StudentRecord : ResultRecord A1-Alternative Collaboration Diagram: Reset Result Information 2: reset form 1: press reset button : ResultFormJSP 3: display unmodified result form : Administrator A2-Alternative Collaboration Diagram: Cancel Result Record Deletion 1: press delete button 3: press cancel : ResultListJSP 2: display confirmation dialog box : Administrator 4: display unmodified student list Basic Collaboration Diagram: Manage Schedule 1: press manage schedule button 6: press create Schedule button 15: press update schedule 24: press delete schedule 26: press ok to confirm : ScheduleListJSP : Administrator 5: display schedule 14: display schedule 23: display entry form 25: display confirmation 30: display schedule 9: enter schedule details & submit 18: update schedule details & submit 7: navigate 16: navigate 13: navigate 22: navigate 8: display entry form 17: display entry form : ScheduleFormJSP 10: createSchedule 19: updateSchedule : PersistenceServiceInterface 2: getSchedule( ) 27: deleteSchedule( ) 4: getSchedule( ) 12: setSchedule( ) 21: setSchedule( ) 29: deleteSchedule 3: getScheduleRecord 11: createScheduleRecord( ) 20: updateScheduleRecord( ) 28: deleteScheduleRecord( ) : Schedule : ScheduleRecord A1-Alternative Collaboration Diagram: Reset Schedule Information 2: reset form 1: press reset schedule button : ScheduleFormJSP 3: display unmodified schedule form : Administrator Basic Collaboration Diagram: Manage Student Record 1: press manage student button 6: press add s tudent button 15: pres s edit button 24: press delete button 26: press OK to confirm : StudentListJSP 5: display all s tudent record : Adminis trator 14: dis play all Student record 23: dis palay student record 25: dis play confirmation 30: dis play s tudent record 7: navigate 16: navigate 9: enter student details & submit 18: upated student record & submit : Pers is tenceServiceInterface 3: getAllStudentRecord( ) 11: createStudentRecord( ) 20: updateStudentRecord( ) 28: deleteStudentRecord( ) 2: getAllStudent( ) 27: deleteStudent( ) 4: getStudentDetails 12: s etStudentDetails 22: updateStudentDetails 29: deleteStudentDetails 13: navigate 21: navigate 8: dis play s tudent entry form 17: dis play existing student entry form 10: createStudent 19: updateStudent : StudentFormJSP : Students : StudentRecord A1-Alternative Collaboration Diagram: Reset Student Information 2: reset form 1: press reset button : StudentFormJSP 3: display unmodified student form : Administrator A2-Alternative Collaboration Diagram: Cancel Student Record Deletion 1: press delete button 3: press cancel button : StudentListJSP 2: prompt for confirmation : Administrator 4: display unmodified student list Basic Collaboration Diagram: Manage Subject 1: press manage Subject button 7: press add subject button 17: press edit subject button 27: press delete subject 29: choose OK to confirm : SubjectListJSP 6: display subject list : Administrator 16: display subject list 26: display subject list 28: display confirmation 33: display subject list 10: enter subject details & submit 20: update subject & submit 15: navigate 25: navigate 8: navigate 18: navigate 2: getAllSubject( ) 30: deleteSubject( ) 4: getSubjectName( ) 13: setSubjectName( ) 14: setMentorName( ) 23: setSubjectName( ) 24: setMentorName( ) 32: delete Subject Details 5: getMentorName( ) 3: getAllSubjectRecord( ) 12: createSubjectRecord( ) 22: updateSubjectRecord( ) 31: updateSubjectRecord( ) 9: display subject entry form 19: display subject entry form 11: createSubject 21: updateSubject : SubjectFormJSP : PersistenceServiceInterface : SubjectRecord : Subject A1-Alternative Sequence Diagram: Reset Subject Information 2: reset form 1: press reset button : SubjectFormJSP 3: display unmodified subject form : Administrator A2-Alternative Collaboration Diagram: Cancel Subject Record Deletion 1: press delete subject button 3: press cancel button : SubjectListJSP 2: display confirmation : Administrator 4: display unmodified subject list Basic Collaboration Diagram: Student Login 1: UserID 2: password 3: press login button : PersistenceServiceInterface : StudentLoginFormJSP 12: welcome screen : Student 4: getUsername( ) 5: getPassword( ) 11: return "success" 7: getUserID( ) 8: getPassword( ) 6: autheticateStudent(, ) 9: validateStudent( ) 10: setSession( ) : Login : StudentRecord A1-Alternative Collaboration Diagram: Reset Login Information 2: reset Form 1: press Reset Button : StudentLoginFormJSP 3: prompt empty Login Form : Student E1-Exception Collaboration Diagram: Invalid Login Information : StudentLoginFormJSP : PersistenceServiceInterface 3: promp Login Form : Student 2: return "invalid password" 1: validateStudent( ) : Login E2-Exception Collaboration Diagram: Empty Login Information 1: press Login Button : StudentLoginFormJSP 5: Prompt login screen with error : Student 4: return "fail" 2: getUsername( ) 3: getPassword( ) : Login Basic Collaboration Diagram: View Result 9: verify result 6: getResult(studentID) : Result : PersistenceServiceInterface 7: getStudentDetails 5: requestResult( 10: send result ) 8: getResult 1: press Online Result Button 3: select semester & year 4: press view result button : ResultViewJSP : ResultRecord : SubjectRecord 2: display semester & year list : Student 11: display result E1-Exception Collaboration Diagram: No Result Information 1: verify result : Result 2: return null : ResultViewJSP 3: display "no result info" : Student Basic Collaboration Diagram : View Schedule 3: getCurrentSemesterInfo 10: verify schedule : Schedule 4: getCurrentSchedule( ) : PersistenceServiceInterface 9: return subject & sched... 6: 5: getSchedule( ) 11: return schedule 2: getSchedule( ) 7: return Schedule 8: return Subject 1: press View Schedule : ScheduleViewJSP : ScheduleRecord : SubjectRecord 12: preview schedule : Student E1-Exception Collaboration Diagram: No Schedule Information : Student 1: verify result 3: display "no schedule info" : Schedule : ScheduleViewJSP 2: return null schedule Basic Sequence Diagram: View Subject 6: verify subject : Subject 3: getAllSubjectRecord( ) : PersistenceServiceInterface 7: return subject 4: getSubjectName( ) 5: getMentorName( ) 2: getAllSubject( ) 1: press view subject button : SubjectRecord : SubjectViewJSP 8: display Subject list : Student E1-Exception Collaboration Diagram: No Subject Information 1: verify subject : Subject 2: return null subject : SubjectViewJSP 3: display no subject info : Student 92 APPENDIX D Activity Diagram for SMS Administrator AdminLoginFormJSP Enter userID & Password & press Enter Buttorn Login PersistenceServiceInterface request service to PersistenceService Get userID & Password Verify userID & password Display login success message correct login info? true Display Login screen with error false Activity Diagram for CSC Administrator Login Administrator AdminListJSP AdminFormJSP Press "Manage Admin" Admin Request All Admin Record PersistenceServiceInterface Get Admin Record from database Display Admin Record List & interface button Display Entry Form Press "Create New Admin" Request to create record Fill up form & submit Display Entry Form with existing Data Press "Update" button Fill up updates & submit Press "Delete" button Request to update record in database Display Confirmation Press "Yes" Press "No" Create New Record in Database Request to delete record in database Yes No Activity Diagram for CSC Manage Admin Save Update in Database Delete Record from database Administrator Press "Manage Result" ResultListJSP ResultFormJSP Result PersistenceServiceIn terface Display Semester & Year Select Semester & Y ear RequestAll Result GetStudend & result record Display Student List Press 'ViewResult" get single Result Display Student result press "create new result" display entry f orm Fillup f orm & submit create record in database request to update record in database updat e record in database display entry f orm with existing data press "update" button f illup update & submit press "Delete" Button request to create record Display conf irmation request to delete record in database press "Y es" y es press "No" No Activity Diagram for CSC Manage Result delete record f rom database Administrator Sched uleListJSP Schedul eFormJSP Sch edule Request for All schedule info press "m anage schedule" PersistenceServiceI nterface get schedule from database Display schedule list & interface button press "create new schedule Display entry form request to create new record in database fillup form & submit press "edit" display entry form with existing data request to update record in database fillup update & submit press "delete" display confirmation request to delete record in database press "Yes" yes press "No" create new record in databse no Activity Diagram for CSC Manage Schedule update record in database delete record from database Administrator StudentListJSP StudentFormJSP press "ma na ge student" Student request to get Al l Student Record PersistenceServiceInterface get all student re co rd fro m database Di spl ay student record & Interface bu tto n di splay entry form pre ss "cre ate new student" request to crea te new record i n databa se fill up entry form & submit press "Edit" button display entry form wi th exi sti ng data fil lup updates & submi t press "del ete" bu tto n press "Yes" create ne w record in da tabase request to update record i n database di spl ay condi rmation req uest to d el ete record i n database yes no press "No" Activity Diagram for CSC Manage Student up da te record in database del ete record i n database Administrator Subj ectListJSP Subj ectFormJSP press "ma nage subject Subj ect request to get all sub ject from data base PersistenceServiceInterface get all subject record from data base display subject list & Interface button press 'cre ate new subject" display entry form fillup entry form & submit request to create new subject press "edit" button display e ntry form with existing data fillup update & submit press "delete" button request to upda te record in database request to delete record in database display confirmation press "Yes" yes press "No" cre ate new subject record in database No Activity Diagram for CSC Manage Subject update record in database delete record in database Student StudentLoginFormJSP enter userID & Password & press enter Login PersistenceServ iceInterface Request service login & password from database verify userID & password display login success message display Login screen with error Yes correct login info? No Activity Diagram for CSC Student Login get userID & password Student Press "View Result" ResultView JSP Result PersistenceServ iceInterface display semeser & year request to get result select semester & year & submit display result Activity Diagram for CSC View Result get student detail & result from database Student ScheduleView JSP Schedule get semester schedule press "View Student" PersistenceServ iceInterface get subject list and schedule list from database Display Semester Schedule Activity Diagram for CSC View Schedule Student Subj ectView JSP press "View Subject" Subj ect request to get semester subject display semester subject Activity Diagram for CSC View Subject PersistenceServ iceInterface get semester subject in database 93 APPENDIX E Class Diagram for SMS (SRS) <<boundary>> AdminLoginFormJSP <<boundary>> AdminFormJSP <<boundary>> StudentListJSP <<boundary>> SubjectListJSP <<boundary>> ResultListJSP <<boundary>> ScheduleListJSP (f rom CSC Admin View) (f rom CSC Admin View) (f rom CSC Admin View) (from CSC Admin View) (f rom CSC Admin View) (f rom CSC Admin View) <<boundary>> AdminListJSP <<boundary>> StudentFormJSP <<boundary>> SubjectViewJSP (f rom CSC Admin View) (f rom CSC Admin View) (f rom CSC Student View) (f rom CSC Student View) <<boundary>> StudentLoginFormJSP <<boundary>> SubjectFormJSP <<boundary>> ResultFormJSP <<boundary>> ScheduleFormJSP (f rom CSC Student View) (from CSC Admin View) (f rom CSC Admin View) (f rom CSC Admin View) <<boundary>> ScheduleViewJSP <<boundary>> ResultViewJSP (f rom CSC Student View) <<control>> Login <<control>> Admin <<control>> Students <<control>> Subject <<control>> Result <<control>> Schedule (from CSC CRUD Manager) (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) (f rom CSC CRUD Manager) <<Interface>> PersistenceServiceInterface (f rom CSC Service Interf ace) <<control>> PersistenceServiceImpl (f rom CSC Service Interf ace) <<entity>> StudentRecord <<entity>> ResultRecord <<entity>> ScheduleRecord <<entity>> SubjectRecord <<entity>> AdminRecord (f rom CSC Entity) (f rom CSC Entity) (f rom CSC Entity) (f rom CSC Entity) (f rom CSC Entity) Class Diagram for SMS (SDD) <<b oun dary>> Admi nL og inFo rmJSP <<bo und ary>> Admi nFormJSP <<bo unda ry>> Stude ntListJSP <<bo und ary>> Subj ectLi stJSP <<bo und ary>> Resu ltLi stJSP <<bo und ary>> Sch edu le Li stJSP (from CSC Admin View) (from CSC Admin View) (from CSC Admin View) (from CSC Admin View) (from CSC Admin View) (from CSC Admin View) Stri ng userna me Stri ng password sub mit() re set() Stri ng u sername Stri ng u serID Stri ng p assword Stri ng firstName Stri ng l astName L ong i cNumb er su bmi t() rese t() a dd() e di t() d el ete() ma nage() add () edi t() del ete() mana ge() <<b oun dary>> Subj ectVie wJSP Strin g u serna me Strin g u serID (from CSC Student View) <<b oun dary>> Stu den tFo rmJSP (from CSC Admin View) Stri ng subj ectNa me Stri ng m ento rNa me Stri ng u sername Stri ng p assword Stri ng subj ectNa me Stri ng m ento rNa me L ong d escri ptio n su bmi t() rese t() submi t() re set() su bmi t() rese t() (from CSC Student View) <<co ntro l>> Log in (from CSC Action) Stri ng username Stri ng pa ssword Map se ssi on g etUse rn ame() g etPassword() se tSessio n() val id ateStu den t() val id ateAdmi n() l ogou tAd min () l ogou tStud ent() Stri ng even t Date sched ul e Stri ng venu e a dd() e di t() d el ete() ma nage() add () edi t() del ete() mana ge() <<b oun dary>> Sche dul eVie wJSP Stri ng e vent Date da te Ti me ti me Stri ng ve nue Stri ng m entorName in t seme ste r Date yea r Stri ng stu den tNa me Stri ng subj ectName Stri ng grade s vi ewSched ul e() vie wResu lt() <<b oun dary>> Sub jectFormJSP (from CSC Admin View) <<b oun dary>> Sche dul eFormJSP <<b oun dary>> Resu ltFo rmJSP (from CSC Admin View) Stri ng event Date schedu le T ime ti me Stri ng venue Stri ng mentorName (from CSC Admin View) i nt Se mester Date yea r Stri ng stu dentName Stri ng subj ectNa me Stri ng g rade sub mit() re set() su bmi t() rese t() <<co ntro l>> Studen ts <<co ntrol >> Admi n <<co ntro l>> Sub je ct (from CSC Action) (from CSC Action) (from CSC Student View) (from CSC Student View) vi ewSub ject() Strin g u serID Strin g p assword Strin g fi rstNa me Strin g l a stNa me Long i cNumbe r Strin g e mai l In t hou sePho neNo In t mobi l ePho neNo Strin g a dd re ss Strin g co ll eg eName <<bo und ary>> Stude ntLo gi nFormJSP i nt Seme ster Date ye ar Stri ng stud entName <<b oun dary>> Resul tVi ewJSP <<bo und ary>> Admi nLi stJSP (from CSC Admin View) manag e() add() edi t() del ete() Stri ng su bjectName Stri ng mentorName <<co ntro l>> Resul t (from CSC Action) <<co ntro l>> Schedu le (from CSC Action) (from CSC Action) Col lectio n admi ns pesistence Se rvi ce Coll ectio n stude nts pesi stence Se rvi ce Col le ctio n sub je cts pesistence Se rvi ce Col le cti on resu lts p esiste nceService Col l ectio n schedul es p esi stence Se rvice getAll Admi n() del eteAdmi n() cre ateOrUp date() getAll Stu den t() del eteStude nt() createOrUp date() getAl lSubj ect() del eteSub je ct() cre ateOrUp date() g etResul t() d eleteRe sul t() createOrUpd ate() g etSch edu le () d el eteSched ule () createOrUp date() <<Interfa ce >> Persi ste nceServi ceInterface (from CSC Persistence Service ) <<co ntro l>> Persi ste nce Servi ceImpl (from CSC Persistence Service ) a utheti ca teStude nt() g etRe sul t(stude ntID)() g etCu rre ntSched ul e() g etAl l Subj ectRe co rd () createSu bje ctRecord() u pda te Subje ctRecord() d el eteSubj ectRe co rd () g etAl l Admin Re cord() createAd mi nRecord() u pda te Admi nRe co rd () g etAl l Stu dentRecord() createStude ntRe co rd () d el eteStudentRecord() createSched ul eRecord() u pda te Sche dul eRecord() g etAssi gnmentRecord() g etRe sul tList() createRe sultRecord() u pda te Resul tReco rd () d el eteResul tRe cord() u pda te Stude ntRecord() d el eteSchedul eRe co rd () a utheti ca teAdmi n() <<en ti ty>> Stu den tRecord (from CSC Entity) Stri ng u serID Stri ng p assword Stri ng fi rstNa me Stri ng l a stNa me Stri ng stu den tID Stri ng e mai l L ong i cNumber Int home PhoneNo Int mobi l ePhone No Stri ng a dd re ss Stri ng co ll eg eNa me L ong i d se tUserID() g etUserID() se tPa ssword() g etPa sswo rd () se tFirstName () g etFi rstName () se tL astName () g etLastName () se tStud entID() g etStud en tID() se tEma il () g etEma i l() se tIcNumb er() g etIcNumb er() se tHo mePho neNo() g etHo mePho neNo() se tMo bi l ePhone No () g etMobi l ePhone No() se tAd dress() g etAd dress() se tCo ll eg eName() g etCo ll e geName() se tId() g etId () <<e ntity>> Resul tRecord (from CSC Entity) <<e ntity>> Sch edu le Record (from CSC Entity) Int seme ste r Date yea r Stri ng stu den tName Stri ng subj ectNa me Stri ng g rade s L ong i d Stri ng even t Date sched ul e T ime ti me Stri ng venu e Stri ng men to r Lon g id se tSe mester() g etSe mester() se tYe ar() g etYe ar() se tStud entName() g etStud en tName() se tSu bj ectNa me () g etSu bj ectName () se tGrade () g etGrade () se tId() g etId () setSched ul e() getSched ul e() setEvent() getEvent() setT i me() getT i me() setVen ue() getVen ue() setMen to r() getMen to r() setId() getId() <<e ntity>> Sub je ctRecord (from CSC Entity) <<e ntity>> Admi nRecord (from CSC Entity) Stri ng subj ectName Stri ng m entorName Stri ng d escri ption Long i d Stri ng username Stri ng userID Stri ng pa ssword L ong id setMe ntorName() getMentorName() getSu bj ectName() setSu bj ectNa me() setDe scri pti on() getDe scrip ti on () setId() getId () se tUserna me() g etUse rn ame() se tPassword() g etPassword() se tUserID() g etUse rID() se tId() g etId()