Anda di halaman 1dari 28

2014

Software Development Report for Hanson Guestbook Application

CMT4440 MR. ADITYA SANTOKHEE


PAUL OLADIMEJI

MIDDLESEX UNIVERSITY

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

ABSTRACT Hanson University recently deployed a modern automated library system, in order to ease and alleviate the problems generated by manual management of library resources and processes. The top management currently seek the implementation of a feedback system, so as to gauge the performance of the automated library, and to solve any occurring issues. This report documents the software process, tools, and techniques surrounding the design and implementation of a guestbook system for publishing, viewing, and managing comments about the library system. Software architecture, design patterns and testing techniques are explored, with justifications provided for design choices. The development process yielded a fully functional guestbook comments system, providing support for users to enter comments, and also providing an interface for the library administrator to manage inappropriate comments.

pg. 1

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

TABLE OF CONTENTS
ABSTRACT ......................................................................................................................................................................0 INTRODUCTION .............................................................................................................................................................4 Problem Statement ...................................................................................................................................................4 Requirements ............................................................................................................................................................4 Goals and Purpose.....................................................................................................................................................4 SOFTWARE DEVELOPMENT METHODOLOGY ................................................................................................................5 SYSTEM DESIGN & ARCHITECTURE ................................................................................................................................7 SYSTEM DESIGN DIAGRAMS IN UML .........................................................................................................................7 USE CASE DIAGRAM ...............................................................................................................................................7 Use Case Description .............................................................................................................................................8 SEQUENCE DIAGRAM ..........................................................................................................................................10 Entity Relationship (E-R) DIAGRAM .....................................................................................................................11 Database Design ..................................................................................................................................................11 SYSTEM IMPLEMENTATION .........................................................................................................................................13 Creating the Database in MySQL .............................................................................................................................13 FRAMEWORKS USED ...............................................................................................................................................14 CodeIgniter MVC Framework: .............................................................................................................................14 LIBRARIES USED .......................................................................................................................................................14 SOFTWARE DESIGN PATTERN: USE OF MODEL-VIEW-CONTROLLER (MVC) ...........................................................15 SYSTEM DEVELOPMENT ..............................................................................................................................................17 Code Snippets..........................................................................................................................................................17 Admin Functions ..................................................................................................................................................17 Function to Insert Comments ..............................................................................................................................18 GUESTBOOK MODEL ............................................................................................................................................19 Screenshots of Guestbook ......................................................................................................................................20 TESTING THE SYSTEM ..................................................................................................................................................24

pg. 2

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION INITIAL TESTING.......................................................................................................................................................24 FINAL TESTING FEEDBACK .......................................................................................................................................24 CONCLUSION ...............................................................................................................................................................27

pg. 3

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

INTRODUCTION PROBLEM STATEMENT As stated earlier, the deployment of an automated library system in Hanson University has required the management to incur feedback from the users of the system. There has arisen a need for a method to gather user feedback on the system, and for students to communicate with each other using a virtual commenting system. REQUIREMENTS The initial requirements for the guestbook system included, but were not restricted to: A web-based system which would run on any modern browser, e.g. Google Chrome, Mozilla Firefox. This web-based system would mean no installation would be needed on the operating system. A system where users could view comments made by other visitors, as well as input their own comments. This module will not be authorized, so as to allow ease of use. An authorized and authenticated admin module for management of user comments, i.e. deleting redundant or invalid comments. A clean, usable interface easily navigable by the website visitor.

GOALS AND PURPOSE The purpose of this project is to produce a guestbook system accessible for use by visitors of the Hanson Automated Library System. It is pertinent to take the building and deployment of the system as a full software development process which follows the right patterns and methods of development. Justifications would be provided for design choices, as well as a demonstration of software development techniques using UML techniques and diagrams.

pg. 4

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

SOFTWARE DEVELOPMENT METHODOLOGY The adoption of development methodologies in software development projects has been agreed by experts to be critical to the success of a project and the delivery of its objectives. Geambasu et al (2011) opine that methodologies are critical in ensuring projects are delivered within schedule, within cost, and meet the requirements of stakeholders/users. While there are a wide range of methodologies to choose from in a particular software project, the software process adopted for the development of the guestbook system is the widely popular eXtreme Programming (XP) framework, which is an agile development methodology. Some key factors influenced the choice of this framework for this project, and they are described below: User requirements could be changed or modified as needed by the library, which is the Product Owner. Scrum is flexible enough to adapt to changes in the system, even up till late in the development cycle. Short timeframe of development. Feedback has to be provided constantly to the stakeholders, who are the administrators of the Hanson Library. Scrum supports this through its iterative cycles of development and testing, including feedback. XP is a true developers framework that shortens the time and steps taken to deliver a product, thus enabling quick completion of projects. Though the scope of development for the guestbook system is small, it is necessary to implement efficient development strategies that create an efficient system that can be scaled to an increasing number of users of the system. The XP process, as adapted for this project, is divided into two major phases of Release Planning, and Iteration Planning. The Release Planning phase was where the deliverables and user requirements were defined, in their order of priority. In the comprehensive Iteration planning phase, these requirements which were defined in collaboration with the project owners, were split into tasks, along with a plan to deliver these tasks. Paul Oladimeji, the developer, first collected User Stories, which were estimated easily due to their simple nature. User stories are basically a written document where a stakeholder describes what he or she requires from the project.

pg. 5

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

XP Development Process

The user story was then broken down into the following tasks: i) ii) Task 1: Design system architecture Task 2: Develop data and system models. This was accomplished through the use of UML (Unified Modelling Language) diagrams, detailed later in the report. iii) iv) v) vi) Task 3: Obtain feedback. Modify models based on user feedback. Task 4: Build guestbook system. Task 5: Collect feedback on system prototype. Deploy and maintain guestbook system.

The maintenance phase was conducted after the first release of the guestbook system was productionized. After this phase, the project was officially ended.

pg. 6

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

SYSTEM DESIGN & ARCHITECTURE One of the critical steps towards the completion of this project is the design and representation of the systems structure, behavior, and views. This representation helps in identifying the interfaces and critical components of the system, and aids in a more efficient development process. SYSTEM DESIGN DIAGRAMS IN UML USE CASE DIAGRAM This is used to model the dynamic relationship between internal and external users of a system and the functionalities of the system. It is a high-level design modelling technique used to gather system requirements, and gain an outside view of the system. In this guestbook application, the actors consist of the commenters on the system, and the administrator of user comments.

pg. 7

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

USE CASE DESCRIPTION Use Case: Managing

Comments

Actor

Administrator

Preconditions

The administrator wishes to manage the comments of the guestbook.

Flow of Events

1. The Use Case begins when the Admin visits the guestbook homepage. 2. The Admin goes to the Log in page, and enters credentials. 3. If credentials are correct, Admin is redirected to Manage Comments page. 4. Admin deletes comment. Alert pops up to confirm deletion.

Alternative Flow of Events

Invalid login credentials: The user is bounced back to the login page.

Post Conditions

On successful completion: Comment is entered into database. Admin logs out after comment management.

pg. 8

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

Use Case: Entering & viewing Comments

Actor

Guestbook Visitor

Preconditions

The visitor wishes to enter comments on the guestbook.

Flow of Events

1. The Use Case begins when the visitor visits the guestbook homepage. 2. The website visitor enters comments on the system.

Alternative Flow of Events

Empty input fields: The page displays errors notifying the user to fill in empty fields. Viewing other comments: The user accesses the View Comments page, and views comments made by other visitors.

Post Conditions

On successful completion: Comment is entered into database.

pg. 9

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

SEQUENCE DIAGRAM MANAGING COMMENTS

pg. 10

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

ENTERING COMMENTS

ENTITY RELATIONSHIP (E-R) DIAGRAM

DATABASE DESIGN The database for the Guestbook system implements a very simple design consisting of just two tables, as seen in the E-R diagram: i) ii) Admin table, for storing details of guestbook administrators Comments table, for storing details of the comments.

In the tables below are the tables and their corresponding fields:

pg. 11

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

ADMIN TABLE Column Name Data Type Restrictions

id

INT

NOT NULL, AUTO-INCREMENT

username

VARCHAR(32)

NOT NULL

password

VARCHAR

NOT NULL

The password field is hashed and encrypted in md5 format by PHP code, thus the password value is rendered unreadable by anyone who accesses the database. COMMENTS TABLE Column Name Data Type Restrictions

id

INT

NOT NULL, AUTO-INCREMENT

name

VARCHAR(32)

NOT NULL

email

VARCHAR(32)

NOT NULL

comment

TEXT

NOT NULL

date-posted

DATETIME

The date-posted field is left isnt explicitly defined as not null, because it is automatically inserted when a comment is entered at the backend. Hence, there is no need for user input.

pg. 12

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

SYSTEM IMPLEMENTATION After the conceptual modelling phase of the project was approved by the project owners, implementation of design began. CREATING THE DATABASE IN MYSQL Using the PhpMyAdmin interface, a database hanson_library_guestbook was created. In this existent database, the following SQL queries were run subsequently, to create the Comments and Admin tables. create table comments ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(32), email VARCHAR(32), comment TEXT NOT NULL, date-posted DATETIME, PRIMARY KEY(id));
Comments Table SQL Query

create table admin ( id INT NOT NULL AUTO_INCREMENT, username VARCHAR(5032 password VARCHAR(), PRIMARY KEY(id));
Admin Table SQL Query

pg. 13

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

FRAMEWORKS USED CODEIGNITER MVC FRAMEWORK: CodeIgniter is an Application Development Framework for PHP developers, whose goals is to enable the development of projects at a much faster pace than using native PHP from scratch. It provides a rich set of libraries, functions, and helpers to automate common scripting tasks, as well as provide a simple programming interface and structure to access said libraries. CodeIgniter lets you creatively focus on your project by minimizing the amount of code needed for a given task. CodeIgniter is freely available for download at http://codeigniter.com/. LIBRARIES USED CodeIgniter Libraries: Some of the common libraries provided for use by CodeIgniter in the Guestbook application include: Form Helper Library Session Library Database Library

Form Library: The CodeIgniter Form Helper contains functions that assist with, and quicken the process of working with forms. It is invoked and loaded using the $this->load->helper('form'); block of code. The Form Helper also contains a set of form validation functions that restrict the user from submitting empty fields into the database. Session Library: The Session Library, loaded using the $this->load->library('session'); block of code, helps in the creation of user states that persist until the session is destroyed. It helps in tracking user activity as they browse the site, by storing session information for each user in the browser cookie. Database Library: The Database Library in CodeIgniter helps in the abstraction of common databaserelated tasks such as connecting to the database, and querying the database. It is loaded in the constructor using the following code snippet: $this->load->database();.

pg. 14

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

SOFTWARE DESIGN PATTERN: USE OF MODEL-VIEW-CONTROLLER (MVC) CodeIgniter is a loose MVC framework adopted for use in this project. MVC is a popular software design pattern for building applications that run on the web. A Model View Controller pattern consists of the three following components:

Model This is the lowest level of the pattern which is responsible for maintaining data. The model is responsible for managing the data and database of the application. It responds to the request from the view and it also responds to instructions from the controller to update itself.

View - This is responsible for displaying all or a portion of the data to the user, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.

Controller This is the software Code that controls the interactions between the Model and View. The controller is responsible for responding to user input and perform interactions on the data model objects. The controller receives the input, it validates the input and then performs the business operation that modifies the state of the data model.

MVC is popular as it isolates the application logic from the user interface layer and supports separation of concerns. Here the Controller receives all requests for the application and then works with the Model to prepare any data needed by the View. The View then uses the data prepared by the Controller to generate a final presentable response.

pg. 15

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

MVC Architecture The Guestbook Model is called written in the file guestbook_model.php, and has its functions written in the Guestbook_Model class. These functions modify the database, and they include: add_comment(), get_all_comments(), and delete_comments(). These functions are named in a descriptive way, following PHP nomenclature conventions. The controller class is called Guestbook, written in the guestbook.php file in the controllers folder. This class includes functions to validate user input, interact with the models, and display views. Some of the functions include login(), view_comments(), insert_comment() and logout().

pg. 16

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

SYSTEM DEVELOPMENT CODE SNIPPETS Below are some of the snippets of code for the critical functionalities in the guestbook system. ADMIN FUNCTIONS

Above code snippet implements all admin functionality for the guestbook system. The function login_view() checks to see if the session variable is NOT empty, and if it isnt, it means the admin is already logged in, and is redirected to the Manage Comments page. In the case that the session variable is empty, the Login page is loaded, where the admin can enter credentials and be authorized. This authorization is performed by the login() function.

pg. 17

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION


The manage_comments() function checks the session variable just like the login_view() function, but this time refers to the login page, if user is not logged in. If user is logged in, he is redirected to the Manage Comments page. The delete_comments() function, after session check, calls the delete_comments() model function, using the ID of the comment to be deleted as a function parameter. After performing a deletion, the admin is redirected to the Manage Comments page.

FUNCTION TO INSERT COMMENTS

This function is called when the Submit button is clicked on the comment form. It first performs input validation to check if any of the fields are empty. This is what the code $this->form_validation->set_rules($val_rules) does. $val_rules is an array containing the fields and their required validation. The input posts are then assigned to variables which are then assigned to the $data array declared at the beginning of the function. The model function add_comment() then inserts the contents of the $data array into the database.

pg. 18

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

GUESTBOOK MODEL

The functions of the Guestbook model are described in the above code snippet explanations.

pg. 19

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

SCREENSHOTS OF GUESTBOOK

Homepage: This is the first page that displays when the guestbook URL is entered in the browser. It displays the form to enter comments. A descriptive menu is highlighted at the top of the page, with instructions for navigation.

pg. 20

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

Input validation if fields are not entered.

Notification at the top of page, if submission was successful.

pg. 21

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

Admin Login page

pg. 22

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION


Comment Deletion. A JavaScript alert pops up to confirm that the comment is sure to be deleted. After deletion, the manage comments page reloads with the comment gone.

pg. 23

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

TESTING THE SYSTEM While regular user tests were performed during the course of iterative development using eXtreme Programming techniques, the major challenge for measuring the effectiveness of the system is the final testing after the completion of development. INITIAL TESTING Initial testing was done during the course of development, to find issues that needed to be fixed in the system.

Evaluation Criteria Process Ability Ease of Learnability Navigation

Evaluation Status Satisfactory Satisfactory Non-satisfactory

Comments

Fix

Navigation to home page after comment deletion from admin needs input into browser URL field.

The Guestbook logo at the top of the page was made as a link to the home page. The descriptive menu also provided a link to the homepage.

Application Errors

None reported

Security

Satisfactory

Testers reported no The prototype was tested on a local server security concerns. so the probability of software vulnerability was low.

FINAL TESTING FEEDBACK

pg. 24

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

To perform this, a group of 5 fellow MSc students browsed the guestbook, and were asked to give estimated scores, out of 10, based on specified parameters. The results for this feedback is provided below:

Testers Tester 1 Tester 2 Tester 3 Tester 4 Tester 5

Usability 8 8 9 7 8

User Interface 8 6 8 9 7

Performance & Speed 10 9 9 9 9

Testing Feedback based on specified criteria


12 10 8 6 4 2 0 Tester 1 Tester 2 Usability Tester 3 User Interface Tester 4 Performance & Speed Tester 5

Based on the above feedback, it is obvious that the most efficient part of the system is its Performance, which was rated at an average rating of 9.2 by testers.

pg. 25

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

LIMITATIONS & FUTURE WORK There are no major limitations with the system, however, some users may feel that the system is too open to unwanted visitors, thereby suggesting the authorization of guestbook visitors who can post on the application. This feature could be implemented in a future release of the work. Also, a way for users to add their URLs so it renders clickable on the View Comments page would be a more robust solution.

pg. 26

SOFTWARE DEVELOPMENT REPORT FOR HANSON GUESTBOOK APPLICATION

CONCLUSION This software development report details the development process behind the creation of a guestbook system for Hanson Automated Library. The system consists of open modules for viewing and entering comments, and an authorized module for managing comments. The XP development methodology was followed, and appropriate user testing was carried out to determine the efficiency of the system. Conclusively, an evaluation of the systems limitations is made, and any suggestions for improvement are highlighted.

pg. 27

Anda mungkin juga menyukai