Web Programming in Scheme
Form new groups of two for this assignment. We will not accept this assignment from people working individually or with a partner from the previous assignments. Email cs173tas@cs.brown.edu the names of the members of your group by 5 pm on Wednesday, 10/19/05 (only one member needs to send this email). If you cannot find a partner, send us an email by the same deadline and you will be assigned a partner. In order to avoid being assigned a random partner, we suggest staying after class on Wednesday to find a partner in person. Missing the email deadline will lower your grade for this assignment by 10% per day late.Part 1
Repeat the Raw Web Programming assignment using the PLT Scheme Web Server.PLT Scheme Web Server: For simplicity, the wording of this section denotes local file paths using "\" slashes as in Windows. The PLT Scheme Web Server works on multiple platforms, so you will need to change the direction of slashes if your OS requires slashes in a different direction for local paths.
- To start the server on your home machine, run PLT\web-server.exe -p <port> from where you installed DrScheme. A typical port is 8080.
- To see some sample servlet code, look at the files in PLT\collects\web-server\default-web-root\servlets\examples .
- To add a servlet to the default server, save your scheme file with a .ss extension and place it in PLT\collects\web-server\default-web-root\servlets .
- To view servlet PLT\collects\web-server\default-web-root\servlets\<path>\<servlet-name.ss>, go to http://localhost:<port>/servlets/<path>/<servlet-name.ss>. For example, to see the sample servlets go to http://localhost:<port>/Defaults/doumentation/servlet-examples.html. In general, put dynamic files (servlets) in a servlets folder or subfolder. Web servers optimize static and dynamic content.
- If you change your servlet while the server is running and want future requests to the base URL of the servlet to use the new version of the servlet, go to http://localhost:<port>/conf/refresh-servlets to clear the servlet cache. Note that the old version with CPS'd pages will still be runnable.
- To view PLT Scheme Web Server documentation, either use the help desk or go to http://localhost:<port>/defaults
- Quasiquoting: you may notice sample servlets quoting lists with "`" instead of "'", called quasiquoting, as opposed to quoting. Quasiquoting provides the ability to force evaluation on specific elements of a quasiquoted expression instead of directly returning the expression. To force evaluation of an element in a quasiquoted expression, prefix the element with the character ",". For example, to generate the list '(1 2 3 4) you may write `(1 2 ,(+ 0 3) 4). Quasiquoting can be used as a convenient way of inserting dynamic elements into HTML templates for this assignment, similar to inline patterns found in other web languages. For more information on this technique, search the Help Desk for "quasiquote" and look at the explanations for the "," and ",@" operators.
Part 2
Include a readme file in your submission. In it, contrast 3-5 language features that you used in this assignment to the language features encountered in the Raw Web assignments. Even if the members of your group used different languages in the Raw Web assignment, all of you are still responsible for understanding the presented response. The analysis should be 2 paragraphs or fewer. Grammar and word choice matter.Submission
Only one partner should submit the .ss files and readme to WebCT. The readme file should contain the names of the members of the group. Every other member of the group should submit an empty file. If you do not submit to WebCT, you will not receive a grade for the assignment.Codewalk
We may want to try using your site during the codewalk so it must be accessible. Either come with a url from which we can access your site or bring a computer already running your site. Make sure your site is accessible before your presentation - we will consider it nonfunctional if we cannot see it.Hosting Tips:
- Unix/Linux/OS X: running "ifconfig eth0" from the shell will show you your IP address for many configurations.
- Windows: running "ipconfig" from the shell will show you your IP address for Windows XP, 2000.
- You may want to specify a port address and make sure your firewall allows access to it - we strongly suggest testing accessibility from another computer.