Primary Objectives:

  1. Be able to write a MVC web application that uses a multi-table, relational database instance that you created
  2. Be able to create models with foreign keys and navigation properties
  3. Be able to implement CRUD functionality with non-trivial models
  4. Learn to write more complex T-SQL scripts to create more complex database tables
  5. Practice more LINQ
  6. Implement custom attribute checking

Overall Requirements:

  • You must use a “Code First with an Existing Database” workflow
  • Use a script to create your tables, populate them with sample data and another to delete them; the script(s) need to be added and committed to your git repository
  • All pages must use strongly typed views
  • Use only fluent (dot notation) LINQ syntax

"As a student in CS 460 who is preparing for the final exam, I wish to create a complex web application from scratch -- including database, CRUD functionality and some AJAX -- so that I can practice and get a good grade on the exam."

Abraham Lincoln's bench mallet
Abraham Lincoln's bench mallet. Up for auction Dec. 5, 2017 at Christies Auction House. Expected to fetch $300,000 to $500,000.

Reginald's Ancient Antiquities Auction House

This assignment is based off last years CS 460 Programming Final Exam.

Questions/Tasks:

You are to build a demonstration site where buyers and sellers can connect and items can be sold. There are Buyers. They visit the site to make Bids on Items that have been put up for sale by Sellers. Please read the entire assignment and then complete or implement each of the following:

  1. [Setup] Create a new MVC application. Do all your work for this assignment in one or more feature branches.
  2. [Modeling & Design] Begin with the domain model. There are four entities: Buyer, Seller, Item and Bid. This page explains the relations between entities and provides seed data. All relations must be present as named constraints in your database schema. Generate an E-R diagram of your database schema to include in your portfolio.

    Write an UP script (in App_Data/up.sql) to create the database and a DOWN script (in App_Data/down.sql) to delete all tables.

    Build the database.

  3. [Content/Coding] Create a welcome page with the title, Reginald's Ancient Antiquities Auction House, and a menu/navbar that is shared among all pages. Later questions will have you add things to this menu.

  4. [Content/Coding] Implement CRUD functionality for Items and place a menu item on the main menu/navbar to the list page. Items are identified to all parties by their ID. Items are for sale by a Seller, who has a name. It is important for these views to correctly show/handle the item ID, name and seller's name.

    Here are the 5 parts needed:

    • Item Index/List page
    • Item Create page (Create): should NOT allow user selection of the ID -- the system should create a new unique ID.
    • Item Details page (Read):
    • Item Edit page (Update): should NOT allow editing of the ID.
    • Item Delete page (Delete)
  5. [Content/Coding] Add a Create page for Bids and place a link to it on the main menu/navbar. This is only a create page, nothing else. The user, acting as a Buyer, should be able to select which buyer they are, the item they are bidding on and set their bid price. They should not be able to set the timestamp for the bid -- that must be set by the server to be the current time when the bid was submitted.

    There must not be any way to delete or edit Bids. Once a bid is placed, it is final.

    Add a button to the welcome page that says Bid on an Item! Clicking on that button should take the user to this create a bid page.

  6. [Content/Coding] Watch bidding feature: add functionality to the Item details page that displays all bids for this item in a list or table, in descending order by price. For each bid you must show the buyer's name and bid price. You must retrieve and display this data using AJAX. It should update automatically every 5 seconds (see: MDN::setInterval()) without reloading the page.

    var ajax_call = function() {
        //your jQuery ajax code
    };
      
    var interval = 1000 * X; // where X is your timer interval in X seconds
      
    window.setInterval(ajax_call, interval);
  7. [Content/Coding] Add a list or table to the home page that shows the most recent 10 bids across all items, ordered chronologically. For each bid you should show the Item ID, Item Name (which should be a link to the item details page), Buyer's Name, Bid Amount and the Bid timestamp. Format the timestamp so that if it was bid today then show only the time. If it was older than that, show the date as well. (Assume everyone is in the same timezone and it's whatever time you're using.)

  8. [Portfolio Content] Make a video of your application in use. Demo all functionality. Since you're making a video for this one we'll go super easy on the Portfolio content. The only content you need there is a page with links (to your video) and your E-R Diagram.