CS 2135 (A01) Project
A Languages Perspective on Web Programming: Part 2

Project Motivation and Goals

The first part of the project demonstrated that web scripts are essentially closures. This part of the project continues the exploration into the connections between concepts in web programs and core concepts in programming languages.

After completing this stage of the assignment, you should be able to:


Due Date

The project is due October 14 (Sunday) at 11:59pm via turnin (use assignment name project2).


The Assignment, Stage 2

  1. Start with a version of the CGI scripts that does NOT implement the personalization feature. You may use your own version, or you may start with one of the sample solutions (see the "links and hints section" below). Tell us whether you started from your own or a sample solution, and tell us the URL for your version for this assignment.

  2. Enter the name and address on the first page. Bookmark the second page. Start a new browser, visit the bookmarked second page, and try to place an order. What happens and why?

  3. Edit your current set of scripts to save the name and address using cookies.

  4. Using the cookies version, get to the second page and bookmark it. Open a new browser, visit the bookmarked second page, and try to place an order. Does the order come out properly? If not, what goes wrong and why?

  5. On the same computer, open a new browser and go to the first page. Place a new order with a different name and address.

  6. Open a new browser and visit the bookmarked second page that you saved in step 2. Place an order. Does the order come out properly? If not, what goes wrong and why?

  7. Go to http://www.amazon.com. Add an item to your shopping cart (you'll be able to cancel the order without buying it later). Duplicate your amazon window (by doing a "New Window" operation from the file menu). Add a second item to your shopping cart from the new window. Use the back button in the new window to return to the page you were on before you added the second item to your cart. Return to the first window and add another item to your cart. How many items are in your shopping cart? What does this tell you about shopping cart data (where it is located, its relationship to the life/contents of browser windows, etc)?

  8. What do these exercises tell you about the nature of cookies? When are they appropriate and when are they inappropriate for writing web applications?


What to Turn In

Submit the following files via turnin:

Links and Hints

Suggestions for links to additional tutorials and pages that you find useful in doing this assignment are welcome.


Collaboration Policy

This is an individual project. Collaboration is not permitted on this assignment. The course staff are the only people you may approach for help with this project. You may not ask anyone outside of the course staff questions on any aspect of this project, including how to write and run CGI scripts; this includes webmaster@wpi or helpdesk@wpi. If you believe there's a problem with running CGI scripts from your account that warrants CCC assistance, get permission from the course staff to contact helpdesk.

In particular, do NOT bother webmaster@wpi or helpdesk@wpi if you get an "Internal Server Error" while developing your code. This error likely appears due to a bug in your script, not a problem on the server. If you are convinced you have a server error, contact the course staff before contacting any systems staff.