Digital Media

Moshell - Spring 98

Labs 1 & 2 Described;
Comments about Lab 3
You may do these lab projects either as individuals, or working with a partner. It is not a good idea to work in teams larger than two, at this stage. (You can do Lab 3 in a larger team, if the project you choose can justify that much labor.)

Lab 1 - A Miniature On-Line Commerce Application

Your company sells widgets. You decide to construct an on-line ordering system for your company. The first prototype of your Sales-Master system will handle only part of the problem - that is, maintaining the inventory of widgets left to sell. It is not required to capture the customer's address, etc. (That will come later.)

The customer first accesses a URL which invokes your first server software. This "server1.pl" opens an inventory file, which contains a single record that might look like

widgets=32

if you have 32 widgets still in stock. It then produces a dynamic HTML page which contains information something like this, if the inventory is >0:
 

"Welcome to Widget World. Today we are selling widgets for $14.95. We have 32 widgets in stock. How many would you like to order?"

A text input box is provided, into which the customer types an integer. The customer then clicks on the SUBMIT ORDER button. If, on the other hand, your inventory was 0, the message would say something like
 
"I'm sorry, we're out of widgets today. Try us again tomorrow please."
The order form (issued when inventory was >0) is targeted at "server2.pl". This program, in turn, checks to see if the order is less than or equal to the inventory. If so, it emits dynamic HTML containing information such as
 
"Thanks for your order of 17 Widgets. The cost of your order is $254.15."

If the order was for 50 units, which is more widgets than your current inventory, your message would emit information such as
 
"Your order exceeded our available inventory. We are shipping you 32 widgets, and will back-order 18 widgets. The cost of your order is $478.40."

Grading
 

I will grade your labs on-line. You should mail to me (moshell@cs.ucf.edu) the URL of the site you want graded. These mailings should occur during the 48 hour period comprising 1 and 2 March. (Mailing them to me at various times across several weeks, makes it hard for me to keep track of all the submissions.) I will try to get them graded by the end of that week.

Include in your site, a mailto link so I can send you the grade. Please don't send me requests for a preliminary review saying "is this good enough?" because that doubles the number of things I have to look at. Have your friends check out the site, if you need that kind of feedback.

Note: You should read the requirements for Lab 2, and avoid implementing Lab 2's specific add-on features as "top 5% features" in Lab 1. Doing that makes it hard for me to grade Lab 2.

----------------

Lab 2: Commerce Gets Serious

The most obvious flaw in lab 1 was that we did not capture any information about the customer. In Lab 2, you will build a multi-stage system. Your company now sells three items: Economy Widgets, Ecology Widgets and Elite Widgets. You will create a first-page order form that ask for the customer's name, address, phone number and e-mail. Your software will check to see that this information is provided, and will reply with an error screen if anything is missing. If everything is as it should be, THEN your software sends the customer a second form, containing the order information.

The name and address data that was acquired during the first form will be hidden inside "hidden variables" and sent back out as part of the order form. Then, when the order comes back, if it contains no errors,  a confirmation screen is sent. This confirmation screen contains the customer's address, and the order itemized. The customer is allowed at this point to click one of two SUBMIT buttons:

a) Change the Order
b) Submit the Final Order

If they click "Change the Order", they receive their order form, regenerated, so they can change it. If they click "Submit the Final Order", the inventory is decreased by the appropriate amount, and another confirming screen is sent out. This one will report that the order is being processed and will be shipped within 48 hours.

Finally, your software dumps into a text file (orders.txt) the order information for that customer, including the name, address, and what was ordered. To prove that this part of your lab works, you can enter an order into your system, then capture the orders.txt file and mail it to me, along with the URL for my testing.

Grading: You will mail me your URLs and sample order.txt files for Lab 2 during the 48 hour period of 22 and 23 March.

Comments about Lab 3: As you can see, your system is beginning to behave like a real commerce system. There are three issues left to explore, which (if you choose to do the On-Line Commerce System for your third lab) will occupy the rest of your semester. These are:

1) Soliciting a form of payment (we'll use fake credit card numbers, with 4digits.)
2) Using a secure server
3) Transitioning to a scripted, rather than an "ad hoc" system.

The first two ideas are pretty obvious.   "Ad hoc" means special purpose; built for just one set of merchandise. By a scripted system, I mean that we will set things up so that your server software does not have to change when your merchandise changes. Your order form will be "streamed" from a source document,  through the server, combined with the inventory file and a price table, and will appear as a full HTML form. Then, a company owner would only have to edit the source document and the price table, to change their line of merchandise.