Project 2 System Architecture

Two assignments relate directly to the goals of Project 2: This document should communicate completely my expectations for your two deliverables. If not, please ask questions via email or in class.

System Architecture Diagram

Since I will be implementing parts of your Web site design myself (building the database and compiling Java servlets), I have requested that you turn in a system architecture diagram that demonstrates your understanding of the Web-enabled restaurant system we will build for phase II.

You are welcome to use any flowcharting methodology you want to document the system flow, but I would expect you to use a methodology which is easy to follow using common sense. Imagine you are providing this document for your bosses' boss (who pays your consulting fee), a person you like and want to please. Your bosses' boss understands technology quite well, but doesn't know the details of what you have done. I would expect your flowchart to contain boxes (or circles or whatever symbol you want to use) that represent people and pieces of technology. As a minimum:

and any other key people or technology components in the restaurant system process should be represented.

Let me give you a simple example. If I were documenting an ATM banking system as an assignment, I might create a flowchart that looked like this:

whereby I would then document transaction A like this:

A - Checking Account Withdrawal

A1 - Customer inserts Bank Card into ATM and enters PIN through keypad
A2 - ATM connects with Account Database to Verify PIN
A3 - Customer makes Checking Withdrawal request for $X
A4 - ATM connects with Account Database to Deduct $X from Account
A5 - Customer removes $X and Bank Card from ATM

Note the consistent numbering system (I would have processes B, C, D, etc. numbered sequentially as well).

Your system architecture diagram should document all functionality requested in the following section.

Restaurant Web Site Enhancements (Phase II)

Through project 2, you will have the opportunity to see a Web-enabled restaurant system. You have already done a great job of starting the interface from customer and chef to the restaurant database. My responsibility is to add new requirements to make your work challenging (but not tedious). I have come up with the following list of requirements for Phase II:
  1. A New Customer Form (that will create a new Customer record in the database) for the Customer
  2. A New Menu Item Form (that will create a new Meal record in the database) for the Chef
  3. A New Order Form (that will create a new Order record in the database) for the Customer
  4. A Chef's Preparation Report (that will show the Chef what food needs preparation in the kitchen) for the Chef
  5. An Order Receipt Report (to show the customer the current order and total cost) for the Customer
  6. Add and Delete buttons on the Order Receipt Report (which will add or delete items and create an updated Order Receipt Report) for the Customer
  7. A Total Revenue Report (which shows total receipts by Category for all sales in a month) for Management
  8. A Late Order Report (showing late percentage and average delay) for Management
I will manage the restaurant database such that Meal_Order information is updated when the Chef creates each Meal. I will also perform overall deletes to the database so the tables do not get too full. For most students, you will be sharing the same database and therefore be sharing customer and meal information. I might delete any of your records at any time.

To make our database work for everyone, I am requesting that you use the database field names as the NAME attributes within your form control elements. For example, in your New Customer Form, you would have an INPUT element that looks like this:

<INPUT TYPE=TEXT NAME=Phone_Nbr>

because I have documented in the Restaurant Database document that the Customer table field for phone number is named Phone_Nbr. Creating your forms for requirements 1, 2, and 3 above should be easy if you just create an input control for each field in the respective tables.

New Requirements Details

Requirements 1-4 are not new requirements but requirements I reviewed from Phase I (project 1). Make the changes requested of you based on feedback from project 1.

The Order Receipt Report should show provide one horizontal line of text for each meal a customer has requested for that order. Add the other obvious fields the customer would want to see (for example, Quantity). You will fill the details for the report automatically by creating the proper SQL command that requests the right fields based on the current Order_ID (the Web browser will keep track of that).

The Add and Delete Buttons should allow a user to select an item on the Order Request Report (a checkbox next to each item would work well) and then send the proper SQL command to process the add or delete. The Add and Delete Buttons do not have to be of TYPE=INPUT, but instead can be of TYPE=BUTTON. The Submit button should be reserved for the customer submitting the order (which is when the order becomes final). I will show you the code in class that will be behind your Add and Delete buttons. They will both make servlet calls. You will just have to provide me with the SQL command each servlet should process.

The Total Revenue Report will sum up all orders that have been delivered during the last month and show them by meal Category. You will be responsible for providing the proper SQL command to generate the report and you will create the report as a static HTML document (like the Chef's Preparation Report of Project 1). The report will also show a grand total which will be calculated by the servlet (I will show you the code).

The Late Order Report will show a list of all late orders for the month. The report should show the Order_ID and interesting fields that might help in determining why such orders were late. You can group the report any way you think best. You will hand in the proper SQL command to make the detail report. You will also hand in a second SQL command that determines the percentage of orders that were late and the average minutes late. The Late Order Report should also show one horizontal line of text for each late order over the last month.

Turning in Your HTML Documents

An example of how you should turn in your HTML code is this Add Menu Item Form. Note the name attributes are EXACTLY the same as the Meal table stipulates (specifies). Note the FORM has a proper ACTION attribute:

ACTION=http://www.cev.washington.edu/servlets/newMeal

and a proper SUBMIT button:

<INPUT TYPE=SUBMIT VALUE="Add Item">

Right after the SUBMIT button code, you should place a comment outlining what SQL Commands should be run and under which conditions. Take a look at the example:

<!--
Upon Choosing SUBMIT, Servlet Processing should:

1. Find the next available Meal_ID with SQL Command:
SELECT MAX(Meal_ID) AS MAX_ID FROM Meal

2. Verify the Meal is not already in the database with SQL Command:
SELECT * FROM Meal WHERE Name='Name'

3. If not already in Meal Table, Add to the Meal table with SQL Command:
INSERT INTO Meal VALUES (Meal_ID,'Name','Description',Price,Prep_Time,Category_LU,'Comments')
-->

You will have two such comments for your Order Receipt Report, one for creating the body of the Order items table and another for processing the Delete button (the Add button should just connect you with a proper form for adding a new menu item.

Tying Things Together

So, the system architecture diagram should show nine processes (the add and delete buttons are two separate processes) and how the people and technology work together for all nine. If you can't get all nine on one diagram, break it into multiple diagrams but break out your explanations in a purposeful manner (for example, put all your reports on one diagram and all your forms on another). I don't mind if your diagram is very busy as long as your explanatory text is clean. So, you can use reference numbers and letters (like A1 above) and then write your explanations on a separate page. Note that you can also label the same parts of a process for multiple processes (for example, a single line can be labeled A1, B1, C1, E1, G1 if that step is the same for 5 transactions).