|
Q:I read the project 4, but I still don't have concret idea
about what TODO list manager is, what we can get from such
server. Could you again give us a list of steps required to make a
TODO list manager?
A: A TODO list is a list of items (each can be a text
string). For this project I've asked you to also keep track of the
date entered for each item. For example, here is my TODO list for
Spring Break:
| Item | Date Created |
| Grade Test | Thu Mar 4 14:21:45 EST 1999 |
| Grade Project 3 | Mon Mar 1 06:13:01 EST 1999 |
| Think about stuff | Sat Mar 6 09:11:03 EST 1999 |
| Eat Cookies | Sat Mar 6 09:11:03 EST 1999 |
Your CGI proram must be able to display a user's current list, to add
new items to the list, and to delete items from the list. You must
support multiple users, so you need to have some kind of a logon
screen - you can check out the pizza server CGI programs for examples:
| Using hidden fields: |
Code |
Test
it |
available on the CS machines in the directory
~hollingd/public.html/netprog/code/CGI/pizza |
| Using cookies: |
Code |
Test
it |
available on the CS machines in the directory
~hollingd/public.html/netprog/code/CGI/pizzacookie |
Here is a list of steps that might be useful in your development:
- Create a CGI program that can send back an HTML version of a TODO
list (read from disk).
- Create a CGI program (or add to the above program) that can add a
new item to a TODO list and update the list saved in a file.
- Create a CGI program (or add to the above program) that can delete an
item from to a TODO list and update the list saved in a file. It is
required that you allow users to delete items by clicking or
selecting, that is - the user should not have to type in the text of a
TODO list item to delete it.
- Modify the above program(s) so that they can operate on a TODO
list stored in a file that corresponds to a specific user name. You
can also have a single TODO list containing entries for multiple
users, although you then need to extract a single user's items when
asked for a list.
- Create (or add to the above program) a logon screen that
establishes the user's name. This information must somehow be
propogated to future requests (using hidden fields or cookies) so that
each time the CGI is run it knows what the user's name is.
The Pizza server program(s) are examples of a single CGI program that
can do more than a single function - the one progam handles logon
screens and pizza orders. In general I think this makes it easier to
develop, instead of 4 or 5 programs you just have one.
|