Homework Database

From Cmsc434_f09
Jump to: navigation, search

General Description

The goal of this assignment is to get you familar with using a simple database on a server that a web application can communicate with, and to use that technology to design a simple interactive database-backed website.

The assignment is to build a website that lets a person plan their travel on the Red line of the Metro. You can look at the existing (out of date) metro-timetable.pdf, and you can use the data that has been extracted into a comma separated datafile metro-data.csv.zip and into a SQLite database metro-data.db.zip. The requirements are:

  • Use a server-based database to store the metro timetable.
  • Design and implement a website that lets users plan their trips. The following tasks must be supported:
  1. Find when the next train leaves from a user specified station
  2. Find when the next train leaves from a user specified station after a specified time
  3. Find when the last train from a user specified station leaves
  4. Determine how frequently trains leave from a specified station and how that changes throughout the day.
  5. Have a way to enter a user name and a favorite station
  6. Have the ability to log in with a user name specified in task 5 and do any of the first 4 tasks with that user’s favorite station (i.e., don’t require the specification of a station in this case). Note that you do not need to use passwords for these users, nor do you need the ability to delete users.
  • Turn in the functioning website and your source code by adding a row to the table below.

You will be graded as follows:

  • Technology working (40%)
  • Design (60%)

UPDATE 10/9: Requirement for writeup was removed and those points moved to Design.

Technology

You are free to use any frontend and backend technology you want as long as you create a website that runs in a modern web browser with no plugins except possibly Flash. In addition, you must host your website on a publicly accessible server.

UPDATE 10/9: This is an individual assignment. To support ease of collaboration among group members, I suggest that you use source code control. A freely available service such as Assembla for project management and source code control is one easy way to get access to this service. For publicly accessible web servers that support CGI, you can use:

  • Your dorm/home computer if it has a static IP address and is on all the time and you install a web server (such as Apache - http://www.apache.org/), or if you have a Mac, it is built in.
  • A commercial service such as www.1and1.com which has a beginner package that is $3.99 / month for a a minimum of 6 months for a total of $23.94 which if you share among your group is about $6 each.
  • Any other server you have access to.


I suggest that you use one of the following two technology options (but you are free to use any other technology that meets the requirements.)

Python + SQLite on backend, and hand-coded Javascript on the frontend

This approach has the advantage that it is conceptually simpler (although if you don’t know Python, you will have to learn that). It is also simpler to deploy – you need access to a webserver that can run scripts (which may require that you use a commercial hosting service). However, this approach is not as scalable. If you are interested in learning a deeper technology that will serve you well for building larger sites, then consider option 2.

Start by learning about SQLite – the database. If you aren’t already familiar with SQLite, you should read about it (SQLite). If you are using a Mac, it is built in and you can use it immediately from the command line. If you are on other platforms, you can download it for free. The most important characteristic of SQLite for the purposes of this homework is that it is serverless, requires no configuration, and the database lives in a single file – making it very easy to deploy on servers that you don’t have complete ownership of.

Here is a description of how to use Python with SQLite along with an example to get you started Python and SQLite.

GWT + deployment on Google App Engine

This approach has the advantage that you do all of your programming in Java with Eclipse, and thus can rely on the advantages of a modern software engineering environment. Furthermore, the client and server components are written in the same language (Java), can share data structures, and thus it is conceptually and practically easier to work on both sides of the solution. Finally, you get the advantage of using Google’s free AppEngine servers. On the down side, using this technology requires more learning, and you should probably allocate 5-10 hours to go through Google’s tutorials for server communication, deploying on AppEngine, and using their database model. To go down this path, I suggest that you follow these tutorials:

  1. Getting started (you should already have done this for the previous homework).
  2. Remote Procedure Calls
  3. GWT and Google App Engine

You may also want to consider using an external widget library such as Ext GWT.

Here is the complete source code for an CS directory search app with functionality similar to the Python example Media:CSDirectory.zip, and here are some files and pointers to bulk loading the database bulk-load.zip

Finally, here is the working app: http://bbb-test.appspot.com

Post a link to your web pages in the table below. Fill a sample row in the table, or duplicate and edit a row if there aren't any samples left. Alphabetize by last name.

Last Name First Name Webpage Zipped source
Apau Emmanuel [1] File:Database.zip edit "Read my README!!!"
Bardack Avi Metro Website File:ARBDatabase.zip
Berns Michael Metro App File:Htdocs.zip
Bukhari Adil Metro Red Line Site File:MetroAdil.zip
Cheng Jeffrey JC Metro JC Source
Craft Mike Metro Site Source
Folkoff Martin flash file zip
Fruin Brendan Red Line Source
Gmurczyk Antoni Website [Source]
Greene Jared Metro Site Source
Handy Matthew Website Source
Hatley Leshell Website Source
Jackoway Alan Website Zipped Source
James Jeffrey Awesome Website Wicked Source
Kindred Austin Metro Info Zipparoo
Kuenzel Michael Metro Site Zippy Zip
Morris Brian BTM-Metro BTM-files
Nishihama Ed Metro Zip
O'Brien Steve site codes
Osman Tarek Database Website tocode
Pirner Amanda Metro Website Metro Source Code
Reynolds Timothy Metro Site File:Database HW.zip
Rogan Thomas Website only accessible from on campus Backup link

Zipped Source

Siddiqi Noor Site Source
Sidhu Tandeep Webpage accessible only on campus or via campus vpn Source
Slutsker Sasha Website Source code in the form of a GitHub Repository - zip
Smith Bria Website Zipped Source
Speck Chris Website Source]
Vaughn William "Chip" Database Website Choose Red Line Times.zip in Directory
Weisenborne Jimmy App Link JimmyMetroProject.zip
Young Jason Database Website Source Code
<list name> <first name> <webpage> <source>