Development of a Web Based B&B Reservation System Elizabeth Gates 22July04
Introduction Customer information Reservations Small B&B business
Goals Maintain customer information and reservations for parent’s B&B Learn database and web application programming Research web testing
Project Description Web pages Web application
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
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
Target Customer Small business owner Well educated, intelligent but not necessarily strong computer skills Wants a tool to make running the B&B easier
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
User Interface (cont’d) All valid choices appear on a menu User given flexibility when entering field information
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
Security Form-based authentication Login uses j_security_check, j_username, j_password
Web Application Demonstration Questions?
Design Approach Servlet-Centric Model View Controller (MVC) Architecture Database Manager Tomcat Servlet Container
Servlet-Centric User servlets to handle information flow Presentation Layer = JSPs Business Logic = Servlets Data Access = Database
MVC View Layer = JSPs Control Layer = Servlets Model Layer = Database
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
Database Manager Single access point (singleton class) Error Checking Ties tables together
Database Manager (cont’d) Beans Class for each database table DatabaseMgr class
Testing Approach Black Box Testing Automated Test Suite Free
Web Test Research Web Site Management Tools Load & Performance Test Tools Link Checking Tools Web Security Tools Language Specific Web Test Tools
Web Test Research (cont’d) WebWalker JUnit HttpUnit ServletUnit TestCollector
JUnit & HttpUnit Unit tests for Java for white box testing HttpUnit extends JUnit to create automated test suites for web applications
HttpUnit (cont’d) Class to replace the browser Verify links Verify forms (number, action, fields) Verify buttons
Test Issues Testers must have knowledge of code Tests break because of change to submit buttons Tests break because of web page sequence changes
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
Lessons Learned DB testing not very effective during development Didn’t understand servlets and JSPs Couldn’t get vertical slice to verify design early
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
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
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
Web Test Suite Demonstration Questions?