| |
SwikiAction
category: Network-Pluggable Web Server
superclass: ServerAction
subclasses: AuthorizedSwikiAction CachedSwikiAction ActiveSwikiAction PSwikiAction
SwikiAction is the action to implement a Swiki, a collaborative website.
This is a web server in Squeak. Each page served has an "Edit this Page"
link. The syntax rules for editing pages (from any web browser) are in the
file FormattingRules.
The pages may be viewed from any web browser, and the URL is
http://thisMachine:80/OurOwnArea.1 ('OurOwnArea' is the name of the Swiki
area.) See http://guzdial.cc.gatech.edu:8080/myswiki for an example
focused on discussing Swikis.
Swiki is based on the Wiki Server, designed and implemented by Ward
Cunningham. See the original Wiki at http://c2.com/cgi-bin/wiki, or the
Squeak-focused one at http://c2.com:8080/
See PWS class howToStart.
Modified by Ted Kaehler to have all state on the disk at all times. Do not
snapshot the image during normal server operation. Restart the server by
loading all state from the disk.
Each separate Wiki is a folder inside the Server folder. The name of the
folder is the name of the Wiki. Each page is a file. (Inefficient on Macs
because of large minimum page size, but that's an OS problem.) All
versions of all pages are kept. Each page contains chunks, just like a
changes file. Each chunk is one version of one page:
self name: 'Ted''s Page' date: '1/28/1998' time: '12:47:21' by: 'tk' text:
'Here is the body of the page' back: 116!
The last item is number of bytes in the chunk. It is the number of bytes
from the start of the chunk to just in front of the number. This allows
back-chaining to old versions. On startup, the chunk is executed
explicitly using evaluate:for:logged:. It supplies the page name to a
SwikiPage and installs it in the URLmap. By doing this for all files in
the folder, the map (url->page) is built. During operation, the chunk is
not executed. Instead, take the file directly, look at 'back:' at the end,
jump back to the start of the chunk, scan for 'text:' and read the text.
The looks of the pages served are controlled by templates. They live in
the 'swiki' folder in the 'Server' folder. See page.html for how to change
the look of a served page. Beware that templates are cached by
HTMLformatter. If you change a template, you will not see the effect until
you reload the Swiki.
A symbol *append here* may be added anywhere in the page. Clicking on it
will bring up a page with a text editing form. The what you type will be
inserted just before the *append here* marker. This allows append-only
pages, or multiple questions with places to add to the answer.




|
|