From: "John Brant"
<brant(a)refactory.com>
Date: Die Sept 9, 2003 04:27:59 Europe/Zurich
To: <renggli(a)student.unibe.ch>
Subject: smallwiki
I was looking at porting SmallWiki to my #Smalltalk since it looks much
better than WikiWorks and it has tests. Anyway, when I was looking
over the
code I had some questions/comments:
*) #= methods should test the class of the argument
*) The Structure class is using become: to model the history of pages.
The
current page is become:d with the new page (making the new page the
current
one). Instead of relying on VW's object header records to perform
become
quickly, I think a better solution would be to explicitly model the
page
collection with the current page. In addition to being explicit about
what
is happening, it will also make it easier to port to other Smalltalk's
(e.g., #Smalltalk which can't implement a become:). Finally, I believe
it
would make it easier to support a database as a backing store (instead
of
the sixx or image formats).
*) Template>>initialize refers to an undeclared parent variable.
*) You shouldn't need to refer to SmallWiki.* in the SmallWiki
namespace.
Instead just refer to the class or shared variable directly.
*) In the ParserTests>>setUp method there is a missing ";":
(Role name: 'anonymous')
add: Page permissionCode
yourself
*) Your namespace defines Text so the Server class>>defaultWorkspace
reference to Text is referring to your Text class instead of the
default VW
Text object.
*) The storage class seems to be linked to your storage mechanisms
(image or
sixx files). Instead I would like to be able to store the pages into a
database. However, the default implementation of Storage doesn't really
support this (since it is dealing with a delay loop that just
checkpoints
the wiki every so many minutes).
*) You don't need to specify a starting state for SmaCC if your
starting
state is the first one listed. You only need to specify the start
state if
you want multiple start states or the production isn't the first one
listed.
*) Why not provide an instance creation method for Text? Everywhere
that you
create a new Text object, you always send the #text: message (and
sometimes
it then sends the #yourself message).
*) You should use the #includesKey: method on Dictionary instead of
defining
a method like:
templates at: aName ifAbsent: [ ^false].
^ true
*) Instead of using "??? isNil not" and "??? isEmpty not", you should
use
"??? notNil" and "??? notEmpty".
*) How difficult/easy would it be to change to a WikiWorks syntax? --
just
wondering about converting existing wikis (e.g., the
wiki.cs.uiuc.edu
pages).
John Brant