This page hold discussions relating to the future design of the UnityWiki implementation; the UnityWiki page holds more general information, including feature requests, and UnityWikiBugs is the place to go if something is going wrong.


Modularity And Plugins

UnityWiki is a significant improvement PikiPiki in terms of features. However, with each additional feature, the code becomes more and more labyrinthine. Along this road lies MoinMoin, and avoiding the complexity of that was the main reason for choosing PikiPiki in the first place.

Hence, the thrust of the present reworking of UnityWiki is to introduce a more modular framework. Ideally, as much functinoality as possible should be removed from the "core" script, and put into modules. NooParser, the redisgned Wiki notation parser, is the first step towards this.

The basis of the framework, as used in NooParser, is that an extension defines one or more Python classes that subclass particular base classes defined by the framework. When run, the script imports all of these classes into the top-level namespace (or possibly some other namespace, such as "extensions"), and then goes through that namespace searching for subclasses of the known classes and performing any action neccesary to register them. Hence, the extension module doesn't have to provide any manifest of its contents.

The following is a provisional list of the extension classes defined by the framework:

Each class overides various methods. Instances of the classes are instantiated if and when needed (at some unspecified point between module import and a method being called); if, for example, a particular ActionExtension is not needed for the current request, the class will not be instantiated, but it will be imported.

<<< Any suggestions about this would be gratefully received. -- RobHague >>>

<<< Taking SisterSites as something I would like to make a module for, it's clear enough that the names list would be an ActionExtension, but what would the link-to-another-wiki come under? -- SimonBooth>>>

<<< You'd define a WikiNode subclass that defined the syntax for such links, and the replacement HTML. Depending on how it worked, you may cache values such as foreign lists-of-pages in the file system somewhere for efficiency. In any case, both the WikiNode and AcitionExtension could go into the same file. -- RobHague >>>

<<< Sorry, overuse of the word 'link'. The link-to-another-wiki appears automatically if the page exists elsewhere (either in the margin (which could be a WikiNode, I suppose, but it would have to override the default link node), or on a holding page, or (as I've implemented it) in the header. There's no special syntax, it's just something the wiki does. Either we'd want a HeaderExtension or some way of replacing the default ActionExtension, but neither of those seem like great solutions. -- SimonBooth>>>

<<< Ah. In that case, some sort PageFurniture plugin to define page header/footer information is probably in order. This would also be useful for, say, tables of contents that listed all of the anchors in a page, and more flexible customization of the HTML before and after the page, allowing you to alter the layout (add a margin frame or whatever). -- RobHague >>>

The (proposed) sequence of loading things is this:

<<< This would involve splitting the functionality in WikiFormat.py between UnityWiki.py, Extensions.py, and a new module or two to go in extensions. WikiFormat.py itself would remain, to contain the definitions of WikiNode and a minimum set of other node types (ones that are mentioned explicitly in the parser, like TextNode, BlanklineNode and indentNode). Anyone see any problems with this scheme? -- RobHague >>>


X M L On Disk Representation

This is quite esoteric, and probably only matters to people who actually have installed copies of UnityWiki, either mirrors or independent sites. The proposal (which I've discussed with Ben a little) is that users would still edit pages in Wiki notation, but they'd be tree-based internally, and stored as XML on disk. The advantages of this would be:

However, there are also disadvantages:

<<< Thoughts? -- RobHague >>>


Database Integration


Authentication

Currently, the Wiki relys on HTTP Basic authentication, which is pretty appaling (it sends the username and password, in the clear, with every request).

<<< We could improve things a little by moving to HTTP Digest. Alternatively, I could knock something up based on cookies. Anyone have any preference either way? -- RobHague >>>

UnityWiki: BraveNewWiki (last edited 2008-01-20 00:02:47 by tack)