View this PageEdit this Page (locked)Attachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Project 4--or How to Webify Your Newspaper Without Really Trying

How to add a web server to an exsisting newspaper:

Note: This is based off of milestone 4, and is a group extra credit project for Cult of Cactaur.

Project description
Source code etc...

Well, having created a basic newspaper and interface for the first couple of milestones in our project, we were asked to add the following functionality:

The basic Newspaper web access must work (e.g., http://mycomputers.ip.edu:9000/newspaper after Newspaper webstart), but not the deselection of news sources. Web-based generation of the newspaper must also work.


How did we do this? How can you do this in your own project? Well, hopefully, these steps will give you some basic insight into how to use the web server capabilities in Squeak to your advantage.

How to get started

Caveat: This code has a couple of known errors
1) It may not work for all web formats of the pages. Some of the error code we needed was not created at this point in the project. We apologize for the inconvenience.

2) Some .jpg formats are incompatible with the project. This is due to Squeak itself not handling these correctly, and is not an error on our part.

3) Squeak's HTML parser has issues. If you encounter any errors, please try filing in the following code:

'From Squeak2.7 of 5 January 2000 [latest update: #1762] on 1 March 2000 at 4:41:00 pm'!

String class methodsFor: 'internet' stamp: 'mjg 3/1/2000 16:40'!

valueOfHtmlEntity: specialEntity
specialEntity = 'quot' ifTrue: [ ^$" ].
specialEntity = 'lt' ifTrue: [ ^$ ].
specialEntity = 'amp' ifTrue: [ ^$& ].
specialEntity = 'gt' ifTrue: [ ^ $>].
specialEntity = 'nbsp' ifTrue: [ ^ Character nbsp ].

(specialEntity beginsWith: '#') ifTrue: [
^Character value: ((specialEntity copyFrom: 2 to: specialEntity size) asNumber min: 255)].

^nil ! !


Note: this code courtesy Mark Guzdial

Links to this Page