2.11 Raw Web Programming
Complete this assignment with Team One.
This assignment asks you to write a web program. At this point in the course, the purpose of this assignment seems unclear. Once the assignment has been handed in, however, we’ll introduce an entirely new way of programming the web which is intimately linked with one of the fundamental ideas of programming languages. By completing this assignment now, you’ll be better prepared to appreciate this idea when we introduce it in class.
Though this assignment should not take you very long, we are giving you a lot of time because we know that not everyone is familiar with web programming; you may need to do some learning on your own. Furthermore, to avoid last-minute problems, this project has an early “Hello, World!” hand-in in which you must demonstrate you have a web programming environment set up.
2.11.1 Choose Your Language
Unlike the other programming assignments in the course, in this one you will be able to use a programming language of your choice. If you’re already familiar with web programming, choose a language that you’re comfortable with. If you’re not, the Web is a font of meta-information, so you should have little trouble in finding resources about programming for it.
If you write a CGI script, see this page for help using the department servers. Otherwise, you will need to host a Web server yourself.
2.11.2 “Hello, World!”
We’re want you to get your web programming setup sorted out early. You must demonstrate that you have by creating a “Hello, World!” web application. The application should show a web page with the text “Hello, World!” and the current time and date.
We won’t require a formal handin for this. Instead, e-mail the me with the URL of your application and what language/environment you’re using. We must receive this e-mail by 5 PM on the day after the “out” date.
2.11.3 Program Requirements
You will write a simple survey, the details of which are specified below. Although this program is quite simple, it is representative of the core of much larger Web software (just as the interpreters we write in this course are themselves quite lean, but represent the core of large programming languages).
When users finish the survey, they should see a list containing all of the questions they were asked and their responses. This list should not include any questions which a particular user was not asked.
The back button should work properly. If a user answers a question, clicks the back button, then reanswers the question, the later answer should take effect.
Window cloning should work properly. If a user fills out the survey to a certain point, then creates a new window (or tab) which is a copy of the current one, then it should be possible to fill out both surveys independently. Furthermore, clicking the back button in one window should not affect any others.
We won’t require a formal handin for this. Instead, e-mail the me with the URL of your application and what language/environment you’re using. We must receive this e-mail by 5 PM on the “due” date.
2.11.4 Survey Specification
1. Does the Amulet of Yendor mean anything to you? Answer is yes or no. Go to question 2.
2. Do you play Nethack? Answer is yes or no. If yes, go to question 3. If no, end the survey.
3. How many times have you ascended? Answer is a nonnegative integer. If positive, go to question 4, otherwise go to question 5.
4. What conducts have you had? Answer is a string. Go to question 5.
5. What role do you like to play? Answer is either Archeologist, Barbarian, Caveman, Healer, Knight, Priest, Monk, Ranger, Rogue, Samurai, Tourist, Valkyrie, or Wizard. Go to question 6.
6. Have you played any other Roguelikes? Answer is yes or no. End the survey.
2.11.5 Grading
This assignment is graded as a written assignment. The items in Program Requirements are consider four questions. The Survey Specification is considered a question.