For this project, you will work in groups of either 2 or 3 students. This project will last for 3-4 weeks.
We will discuss partnership formation and effective partnership behaviors in class.
When you search imdb.com for a movie, the interaction goes
roughly like this:
- You type a search request into an entry blank on the imdb page displayed in your
browser and hit Return or click on the magnifying glass icon.
- Your browser translates your search request into a suitable HTTP request, initiates a TCP
connection with the web server at imdb.com, and sends the HTTP request.
- imdb.com's web server translates the HTTP request into a database query and
sends that query to its database server.
- imdb.com's database server collects search results and sends them back to imdb.com's web server.
- imdb.com's web server incorporates the database results into an HTML page and sends that page
back to your browser.
- Your browser scans the HTML for <img> tags and <script> tags, etc. that tell it
where to get the images and javascript files and CSS files it needs for the full presentation and
functionality of the page. The browser then initiates new connections for all of those resources.
- Your browser turns the HTML into a visual display suitable for human viewing, and renders that display
on your screen (usually re-rendering after the CSS and javascript and images arrive).
This style of interaction (person → browser → web server → database → web server
→ browser → person) is at the heart of many of the most useful websites (not to mention
the not-so-useful sites as well).
During the next few weeks, you are going to develop a database-driven web application.
Rough ordering of steps
Your work is going to proceed in stages, approximately as follows. We'll do several of
these steps in class.
- Choose and obtain a dataset to work with.
- Create a prioritized user-oriented feature list.
- Create mock-ups of your web page structure and its rough appearance.
- Create a development plan (we'll do this in class).
- Design and set up a database to hold the data.
- Design an HTTP-based API given your database and your user (I'm sorry, but I can't bring myself to
use the term "RESTful", which I find oddly annoying)
- Implement the API interface
- Implement an end-to-end system that follows the pattern described in the imdb example above,
but without useful queries and results. This will be sort of a database-driven client/server
"hello world" application. (See Section 10 "Tracer Bullets" in The Pragmatic Programmer.)
- Implement and test one feature at a time, according to your development
plan. In between stages of this part, you might adjust your development plan
to adapt to new understanding of the project. (This phase, one small testable
bite at a time, is called
iterating (possibly NSFW, depending on where you work).
This project will get you beginning experience with quite a few important software technologies,
including HTML,
HTTP,
flask,
PostgreSQL,
psycopg2 (the most commonly used Python PostgreSQL library),
AJAX,
JSON, and a little bit of
Javascript.
In the process of developing this project, we will also discuss
user stories,
more test-driven development
with Python's unittest module,
the design of functional and client/server interfaces, automation with
Makefiles,
documentation, a variety of code construction topics, and undoubtedly other stuff that
will come up as we proceed.
This will be a lot to learn over a pretty short time. I'll help you break
it down into reasonably bite-sized pieces, so if you keep up-to-date, you'll see the whole
thing come together gradually, and you'll have learned a lot of new stuff in the process.
This should be fun!