Midnight, Sunday 14 April 2013 (Nathan)
Midnight, Sunday 21 April 2013 (Gold Coast)
25%
Your task in this assignment is to design and implement the basis of a simple online auction system using HTML, CSS, PHP, Smarty and MySQL.
The goal of the assignment is to design and implement a simple database-backed Web application that models one component of an online auction system such as eBay. The application should allow users to offer items for sale, to update and delete the items offered for sale, and to browse and search items that have been offered for sale.
Users may offer items for sale. Each item has a name (possibly a short phrase), a description, a category, a vendor, and a starting price. Names are short strings, descriptions are arbitrary length strings, vendors (for this assignment) are short strings, and starting prices are decimal values. Each category has a name (a short string) and a description (an arbitrary length string). Hence, the category field of an item should be a reference to the corresponding category. Ideally, the item offer form would include a selection (a drop-down list) of category names to choose from. Note that the set of categories is determined by the developer; users can't alter the set of categories.
Users may search the set of items offered for sale by category, name, description or vendor. The category should be selected from a selection (!) and the name, description or vendor should be entered into a text input field. Users can then browse the set of all items by entering an empty query and may browse the set of all items in a given category by selecting the category only. Only single-term name, description or vendors are required (but we'll be impressed if you apply task 4 of laboratory 3 to implement multi-term queries).
The home page should basically display just a search form and a link to an offer item form.
Each page containing a list of items for sale (resulting from browsing or searching) should contain the name and category of each item in the list, and the name should be a link to a separate page containing the full details of that item.
From the page containing the full details of an item, users may either update or delete the item.
For simplicity, in this assignment you do not need to paginate results of browsing or searching, and you do not need to implement any authentication or authorisation mechanisms. (This means that any user can update or delete any other user's offering, but we'll correct this in Assignment 2.)
All user input must be appropriately sanitised and validated.
Cascading style sheets should be used to provide a simple, uniform, distinctive, usable interface to your application. Every page should have HTML5 header, navigation and footer elements, but a multi-column layout is not required.
The user interface must use HTML forms. It must use CSS to separate HTML document content from presentation. The server-side scripting language must be PHP. Category information must be stored in one MySQL table and item information in another MySQL table. The implementation must use Smarty templates to separate application logic from HTML presentation.
The implementation must use good program structuring techniques as taught in Programming 2 and in this course. As a minimum, groups of related function definitions should be stored in separate definition files, PHP scripts should not contain any HTML content, all files should be properly commented and indented, and all HTML and CSS files should be valid.
Recall that it's good practice for every table to have a unique integer identifer as its primary key. For a variety of reasons, you should name your tables "a1_categories", "a1_items", etc.
Do not use JavaScript or user authentication. You will not gain extra marks for doing so and may even lose marks (for introducing unnecessary complexity).
For our convenience, please put your name, student number and link to the documentation in the footer of every page of your application.
Start work now!
Design and implement your solution incrementally.
Start by designing the structure of MySQL tables. This task is critical.
Then decide which documents or scripts you will need, whether they are forms, scripts that generate output, or (action) scripts that are executed only for their effect.
Then incrementally design and implement the scripts, testing after completing each script.
Clarifications and more detailed suggestions may be given in lectures and laboratories.
Test your application thoroughly after implementing each new feature, and test it on at least two distinct browsers.
Your submission will require written documentation together with well-commented source files, and possibly a demonstration of your application. Your documentation must be in the form of one or more HTML documents. It must:
For our convenience, please put your name, student number and link to the documentation in the footer of every page of your application.
We expect the structure of your application to be clear, simple, standards-conformant, validated, and well-documented. We expect the organisation and English in your implementation and documentation to be of high quality.
Assessment of your assignment will be based on functionality, implementation, documentation, overall quality, and submission details. We will award approximately 2 marks for submission and documentation, 3 for interface and interaction design, 15 for functionality and 5 for implementation quality.
Keep your solution simple. You will not get additional credit for doing more than was requested.
Note. Read and follow the instructions below carefully. Marks will be deducted if you do not follow these instructions exactly.
Solutions must be submitted to and must run on dwarf.
/export/student/sxxxxxxx/public_html/wp/assign1/ dwarf.ict.griffith.edu.au. (Here
xxxxxxx is
your student number.) Check early that you are able to do this.
assign1 must contain all
relevant files.assign1 must not contain
any irrelevant files. Clean your directory before submission./export/student/sxxxxxxx) has
permission 701, that all directories including and below
public_html (wp, assign1,
templates, etc.) have permission 705, directory
templates_c has permission 707, and all HTML, CSS, PHP,
template and documentation files have permission 604. Any variations
must be carefully justified.
doc.html, in directory assign1/docs. Microsoft Word
files will not be accepted.
When you are ready to submit, send a short email to the following addresses:
This message must have following exact subject line (for our email filters):
WP Assignment 1 Submission
The body of this message should contain the following items, each on a separate line:
/export/student/sxxxxxxx/public_html/wp/assign1/.
(Note that this is not a URL. Type "pwd" in your
assignment directory in a terminal window to see the full path to the
directory.)
http://dwarf.ict.griffith.edu.au/~sxxxxxxx/wp/assign1/index.php.
(If your home page is index.html or index.php you do
not need to include the file name in the URL.)
http://dwarf.ict.griffith.edu.au/~sxxxxxxx/wp/assign1/docs/doc.html.