CS 536 Homework 5: Web Programming

Due: October 11, electronically via turnin (asgmt name hwk5)


Next week, we will be discussing programming for the web. To get everyone in the mindset for this discussion, this assignment asks you to write a simple web program with forms and scripts. You may do this assignment in whatever web authoring language you wish as long as your program is up and running on some URL through which I can run your program.

Program Requirements

Your program must implement the authoring part of a blogging tool, in the spirit of what's shown on this screenshot mockup page. In the mockup, each post has a title, date, and content. The title and body are plain ASCII-text (so if you want HTML tags inside your posts to work, your software will have to escape these explicitly -- handling embedded tags is not required).

The main page of the blog has a list of posts, sorted by dates in reverse chronological order and a form for creating new posts. The form has input boxes for each of the title and the post content. When the user submits the form, a preview page appears with the content of the post. The post should not appear on the main page until the user confirms it from the preview page, whether by link or a form button.

You are not required to save posts to disk (unless required by your web environment), but your application must pass the persistence test: a post added from one machine should also be visible on the main page from a different computer the next time the main page is visited (you do not need to automatically update main pages that are already open on other computers when a new post arrives). Your version may differ from the sample mockup in layout or specific elements used (ie, a radio box instead of two buttons, links instead of buttons, etc), but does need both a preview page and a main page. You do not need to deal with omitted real blog features like permanent links, comments, tags, etc. Matching the functionality of the mockup is sufficient.

This assignment should be easy for those of you with prior web programming experience. For those new to web programming, there are lots of online resources. You can host your scripts in your WPI CCC account, using CGI scripts to process the forms. The CCC webpages give information on how to do this. This is the easiest option for those who are new to web programming. You are welcome to host your work on your own machine or another server, as long as that server will be accessible while I'm grading this assignment.

What to submit

Turn in a README file that contains the URL from which I can run your program. Also upload the files for your forms and scripts.


Back to the Assignments page