ECE 6102: Dependable Distributed Systems
Programming Assignment 2
Due date: March 16, 2018, 11:55 PM
Main Idea
In this assignment, you will extend your wine inventory project from
Assignment 1 to maintain a shopping cart and allow customers to add wines they
browse or search for to the shopping cart. Compared to Assignment 1,
you will have more freedom to design this application in whatever style you
like but here are some required features that you must support:
- In addition to the country, region, variety, winery, and year fields,
there must be a price field. The price should be displayed in the
results for both the browse and search functions, and the price
should be entered on the page where new wines are added to the inventory.
- The browse and search displays must also include a mechanism for users to
add any displayed wine to their shopping cart. This can be done in several
ways, e.g. an explicit link for every wine or an HTML form that allows the
user to select items and then click a button to add the selected items to the
cart.
- There must be a way for users to display the items currently in the
shopping cart along with the total cost of the items, and a way to delete
items from the cart.
- Buying more than one bottle of the same wine should be possible
in a given transaction. You can either provide a numeric input as
part of the wine selection process or just add the same wine
multiple times. Either way, the wine should be displayed only once
in the shopping cart with the appropriate quantity displayed
alongside it.
- The shopping cart key should be unique to a specific user so that
multiple users can access the service simultaneously and maintain
their own shopping carts.
- There should be a purchase feature, which allows users to buy
the items in the cart. This should clear out the shopping cart and
display a message thanking the user for their purchase. This action
should also write entries to the data store to record the wines
purchased and their prices, the date and time, and the user ID of
the purchaser.
- The two items above are best implemented by requiring the user to
log in, using the login feature from the Guestbook app, before creating
a shopping cart for them.
Additional Requirements:
Other miscellaneous requirements for the assignment will be added here as they
are worked out.
- To make this a REST-ful implementation, the shopping cart should
be a globally available resource. So, anywhere that a user is
logged in, they should see just one shopping cart. For example, a
user logs in from one computer and purchases a wine. Perhaps they
terminate the session before actually purchasing the wine. Later,
the user logs in from another computer. Their shopping cart should
show the wine purchased earlier on the other computer. Or, if the
user has two different sessions active on different computers and
purchases one wine in each session, both wines should appear in the
shopping carts in each session.
Turn-in:
On T-square, turn in the following items:
- The URL for your AppEngine Wine Shopping app in the text box.
- An archive of your Wine Shopping project directories with all of your
code, configuration files, etc. (zip or tar.gz formats accepted)
- An additional submission of just the python source file/s.
An example submission would look like:
wineshop-david-cabinian.appspot.com (in the text box)
appengine-wineshop-python.zip (in submission
attachments)
wineshop.py (in submission attachments)
Again, make sure to include your name as part of the project ID that you turn
in so the TA knows the project is yours.
Note:
You should use a different project ID from your Assignment 1 project
and your Assignment 1 project should remain deployed in case the TA
needs to access it for any reason.