- 1 General Description
- 2 Technology
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:
- Find when the next train leaves from a user specified station
- Find when the next train leaves from a user specified station after a specified time
- Find when the last train from a user specified station leaves
- Determine how frequently trains leave from a specified station and how that changes throughout the day.
- Have a way to enter a user name and a favorite station
- 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.
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.)
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:
- Getting started (you should already have done this for the previous homework).
- Remote Procedure Calls
- 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