Links
Course Documents
     Main Page
     Assignments
     Contact Information
     Course Announcement
     Schedule and Syllabus
     Course Participants
     Discussion Forum
     Swiki Chat Area
     Lecture Material
     Independent Research
     Project
     Questionnaires
     Previous Course
Swiki Features:
  View this Page
  Edit this Page
  Printer Friendly View
  Lock this Page
  References to this Page
  Uploads to this Page
  History of this Page
  Top of the Swiki
  Recent Changes
  Search the Swiki
  Help Guide
Related Links:
     Atlas Program
     Center for LifeLong Learning and Design
     Computer Science Department
     Institute of Cognitive Science
     College of Architecture and Planning
     University of Colorado at Boulder
[spacer]
The code for the project builder is located on seurat.cs.colorado.edu.

seurat% cd ~haleden/s/swiki.d/swiki/PitAPB

seurat% ls

actions/  addresses/  pages/  proj/  rendered/  
settings.xml  setup.xml  templates/  uploads/

(these correspond to the components described in the architectural documentation at:
http://l3dswiki.cs.colorado.edu:3232/refs/4)

The starting point for most swiki accesses are "addresses." For example: http://seurat.cs.colorado.edu:8080/PitAPB/allproj accesses the "allproj.book" address.

seurat % emacs allproj.book
(i use emacs because the files are in some strange line coding that more/vi get confused about)

| path size |
path _ request raw url.
size _ (book name size) + 11.
path _ (path size = size) 
    ifTrue: [''] 
    ifFalse: [path copyFrom: size to: path size].
book 
    formatBookTemplate: 'allproj' 
    request: request 
    response: response 
    shelf: shelf

This simply uses a template to format the requested page. (this would resolve to the file templates/allproj.book).

seurat % emacs ../templates/allproj.book

<?doctype?>
<html>
<head>
<title>PitA Project Builder</title>
<?endhead?></head>
<body<?colorscheme?>>
<h2>Pita Project Builder</h2>
<?pbgallery?>
<h3>Create New Project</h3>
<p>To create a new project, insert the new directory name below (do 
   not include any spaces, /s, \s, or :s in the name).  
text.</p>
<form action="<?tonewproj?>" method="post">
<input type="text" size=10 name="newproj">
<input type="submit" value="create">
</form>
<?endbody?></body>
</html>

as you can see, for the most part this is just html code, but there are special tags that are bracketed by <? and ?> that represent actions (and are located in the "actions" directory (things may inherit from other swiki types (e.g., "PitAPB" inherits from "super", so sometimes you have to track down things under other, higher-level folders.)

emacs ~haleden/s/swiki.d/swiki/refs/actions/doctype.book

'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Tansitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">'

In this case this text is simply embedded in the document–in other situations, the action may perform some computation, such as enumerating the elements of a directory and putting them as a table to be inserted into the template.

more later,

hal

View this PageEdit this PagePrinter Friendly ViewLock this PageReferences to this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide