From: Timothy J. H. <tim...@ma...> - 2004-06-26 14:01:06
|
I thought the JScheme Users might be interested in seeing how I teach JScheme servlets in my Intro to Computers classes. I've prepared some example links you can click on to get a quick feel for how the novice web development environment works. These are links into the current Summer School class website, so if you want to play around writing some servlets please put them in the following folder: http://tat.cs.brandeis.edu:8090/sum04/cs2a/practice/ QUICK INTRO TO JSCHEME SERVLET ENVIRONMENT The idea is that the students write Scheme programs ending in .servlet and the server then evaluates these programs returning the result to the browser, e.g. http://tat.cs.brandeis.edu:8090/sum04/cs2a/practice/demo1.servlet returns the date/time/IP/OS and other info. The students can view the file by adding a "V" to the suffix: http://tat.cs.brandeis.edu:8090/sum04/cs2a/practice/demo1.servletV This allows students to look at other students code (just as they can look at other students HTML using the "View Source" menu item. When the students need to edit the file, they type a "." at the end of the name and are prompted for the password (in this case it is "jscheme") http://tat.cs.brandeis.edu:8090/sum04/cs2a/practice/demo1.servlet. which brings them to a page that allows them to view/edit/save the servlet code. Changes to the code result in the original code being stored in a backup directory. http://tat.cs.brandeis.edu:8090/sum04/backup/sum04/cs2a You can see the code for validating here http://tat.cs.brandeis.edu:8090/sum04/lib/schemevalidate.servletV and the code for editing here http://tat.cs.brandeis.edu:8090/sum04/lib/umethod/umethod.servletV This is clearly not a secure system so we run the server on an isolated network and don't store any sensitive data on it (e.g. no grades, credit cards, etc.) It could be made more secure, but that s a later project Notes on how to write JScheme servlets are here http://tat.cs.brandeis.edu:8090/cs2asum04/lectures/L6.html?printable=yes but are being revised this summer. The long term goal is to design a variant of Scheme, a curriculum, and an environment so that web programming can become a standard part of the undergraduate experience. Comments/suggestions welcome. ---Tim--- |