CISC474, Homework H08, Spring 2007
JDBC and MySQL

Introduction

In this assignment, you'll redo the product servlet you did in H07, changing the model to use a MySQL database

I've provided code for you for a new version of the Beer MVC Servlet from HFSJ, that builds on the H07 version by changing the Model to one that uses a MySQL database. We are using some (though not all) of the MySQL "best practices". Here's what we are doing that is right:

Here are a few things we should be doing that we are not doing yet. We'll cover these in future homeworks if time permits.

An outline of how H08 is different from H07

Assignments that must be completed first

Overview

In this assignment, you will:

Step-by-Step Instructions

Step 1: Reading

The following reading is recommended:

Step 2: Unpack, Review, and deploy the beerAdvisorDB.tgz source

You can obtain the source either as:

You may also browse the source in the H08 directory.

Download this to your development directory. You can do this directly on porsche in the same way that you did it for H07 (see H07 for details).

Before you deploy it, follow the steps to set up your own database. You can use the file beerAdvisorDB/sql/create_BA_Beers.sql as a model, and use the procedure outlined on the SQL_GettingStartedWithSQLInCISC474 wiki page.

Step 3: Create your own product advisor web app, following the same model

Now, create your own app, using the same product you used in H05,H06 and H07.

Step 4: Prepare a static page (on copland) to document your work

You'll create a static HTML page http://copland.udel.edu/~jstudent/cisc474/H08 that contains

Step 5: Prepare a tarball (or zipfile) of your source distribution

Here is some advice from the wiki on creating a tarball and creating a zip file

Step 6: Upload the tarball (or zipfile) to your download directory, and submit to WebCT

Be sure that the link you created in Step 4 works properly for downloading your source distribution.

Be sure when you go into WebCT, that you both upload and submit.

(The reason to have you also submit on WebCT as well as putting the code on the web is that submitting on WebCT (a) creates a permanent archive, (b) establishes a submission time, and (c) enables the TA to give you a grade.)

Grading Rubric (100 pts total)

Item Description Points
SQL You have an sql directory with an SQL file to create and populate your database. 10
Java code Your Java code works and is well commented and structured 15
Javadoc Your code has proper javadoc
(i.e. not the Javadoc that was in my code, still unmodified!)
10
Ant Your build.xml file looks reasonable 10
JUnit You have reasonable JUnit tests, and they are updated to reflect the database version of the Servlet (just like the BeerAdvisorDB example illustrates) 10
WAR file You used a WAR file 10
Scripting and Submitted You followed instructions for scripting and submitting 10
Reasonable package names No example.com type package names 5
index.html Not form.html 5
tarball or zip file of source distribution
works properly
Top level directory is correct, you can unpack and do Ant, and get a menu. global.properties need to be changed only for classpath, and for deployment reasons. 5
HTML validates as HTML 4.0.1 strict, XHTML 1.0 strict, or XHTML 1.1 You should have a validation icon on your index.html, and your "result" HTML should validate when you copy and paste the view source of the resulting HTML (not the JSP source) into the "validate by direct input" box at http://validator.w3.org (the third one down). 10
TOTAL POINTS    

Due Date: Wed, May 02, 5:00pm


Valid XHTML 1.0 Valid CSS!