30
Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

  • View
    218

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Development of a Web Based B&B Reservation

System

Elizabeth Gates22July04

Page 2: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Introduction

Customer information Reservations Small B&B business

Page 3: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Goals

Maintain customer information and reservations for parent’s B&B

Learn database and web application programming

Research web testing

Page 4: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Project Description

Web pages Web application

Page 5: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Web Pages

For potential B&B customers Available to the public Describes the B&B, owners,

immediate area, provides directions, and reservation information

Has a victorian look and feel

Page 6: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Web Application

For the B&B owner only Must login Help page and Quick reference

guide Add\Modify\Delete\View customer

information Add\Modify\Delete\View reservation

information

Page 7: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Target Customer

Small business owner Well educated, intelligent but not

necessarily strong computer skills Wants a tool to make running the

B&B easier

Page 8: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

User Interface

Consistent and simple Return button to Welcome Page in

same place on each page Logout only from Welcome Page Online help only on Welcome Page

but on separate page

Page 9: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

User Interface (cont’d)

All valid choices appear on a menu User given flexibility when entering

field information

Page 10: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Database

Originally MS-Access because it was readily available

Changed to MySQL because more documentation available

The purchased version of MySQL offers more security for servers

Page 11: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Security

Form-based authentication Login uses j_security_check,

j_username, j_password

Page 12: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Web ApplicationDemonstration

Questions?

Page 13: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Design Approach

Servlet-Centric Model View Controller (MVC)

Architecture Database Manager Tomcat Servlet Container

Page 14: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Servlet-Centric

User servlets to handle information flow

Presentation Layer = JSPs Business Logic = Servlets Data Access = Database

Page 15: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

MVC

View Layer = JSPs Control Layer = Servlets Model Layer = Database

Page 16: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

MVC (cont’d)

Not the simplest but not the most complicated approach

Allows handling of session management, data flow and database access more efficiently

Separation of tasks for large project

Page 17: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Database Manager

Single access point (singleton class)

Error Checking Ties tables together

Page 18: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Database Manager (cont’d)

Beans Class for each database table DatabaseMgr class

Page 19: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Testing Approach

Black Box Testing Automated Test Suite Free

Page 20: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Web Test Research

Web Site Management Tools Load & Performance Test Tools Link Checking Tools Web Security Tools Language Specific Web Test Tools

Page 21: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Web Test Research (cont’d)

WebWalker JUnit HttpUnit ServletUnit TestCollector

Page 22: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

JUnit & HttpUnit

Unit tests for Java for white box testing

HttpUnit extends JUnit to create automated test suites for web applications

Page 23: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

HttpUnit (cont’d)

Class to replace the browser Verify links Verify forms (number, action,

fields) Verify buttons

Page 24: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Test Issues

Testers must have knowledge of code

Tests break because of change to submit buttons

Tests break because of web page sequence changes

Page 25: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Test Issue Solutions

Black box testing tradeoffs Unique ID created for each form The “Return to Welcome Page”

button form has same ID for each page

DB test suite

Page 26: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Lessons Learned

DB testing not very effective during development Didn’t understand servlets and JSPs Couldn’t get vertical slice to verify

design early

Page 27: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Lessons Learned

JSPs and Servlets complicated Takes a lot of code and

communication between servlets and JSPs to get a small application to run

Went back to clean up code after better understanding

Page 28: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Lessons Learned

DB Manager Class works well only for small-medium sized project Becomes too large Need a different design for large

project Used to maintain a single point of

access and handle DB error checking

Page 29: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Lessons Learned

Credit Card Security Important for B&B owner to keep CC

information Form-based authorization can specify

SSL for file access Encryption of data in DB May cost money Requires B&B owner’s input

Page 30: Development of a Web Based B&B Reservation System Elizabeth Gates 22July04

Web Test SuiteDemonstration

Questions?