From: Steve W. <sw...@wc...> - 2000-07-17 03:28:10
|
On Sun, 16 Jul 2000, Jeff Dairiki wrote: > As of yet, I'm not at all convinced this is worth the effort. It's a big > kettle of fish. I see three reasons to consider saving the pages in > a partially transformed state: > > 1. Eliminate name collisions when merging wikis. > > So, I think this is a moot point. Yes, I was recounting that I thought about the problem when I was trying to merge two Wikis, not that it was a motivating factor here. Our criteria here should be, will this bring real benefits? > 2. Easy automatic link fixing when a page is renamed. > > I don't think this makes it worth the effort. It will be easy enough > to translate the links (e.g. with my forthcoming generalized > wiki_transform) > in the raw markup. OK... > 3. Faster page rendering. > > This might be an issue. However, if it is, I think the best way to speed > page rendering is just to cache the transformed HTML in the database. Oh, I hadn't thought of that... but I doubt the gain would be much. > Drawbacks of partial pre-transforming: > > 1. Complexity. (Not that I'm not a fan of complexity ;-? ) > 2. Bugs in transform code are more likely to cause permanent changes/losses > of page content. > 3. Inversion of the pre-transform is another kettle of fish, especially if one > wants to ensure the the output of the inversion matches the original > markup. > (Eg. was the link entered as "WikiLink", "[WikiLink]", or "[ WikiLink ]"?) No doubt, there is risk. "Fortune favors the bold." :-) Point 3 is particularly troublesome though. I sketched out a simple pair of algorithms to help me think about this: On submit of a page: replace all links with tokens update list of links save page to db save list to db On select of page: fetch page fetch link list replace tokens with links send page to user So what are the possible benefits? Here's a list of what I thought of: Undefined pages can be listed separately (ListOfUndefinedPages), page names can be changed, pages can be deleted (and links to deleted pages would be replaced with a message, or link to a different page) Three things, initially. sw ...............................ooo0000ooo................................. Hear FM quality freeform radio through the Internet: http://wcsb.org/ home page: www.wcsb.org/~swain |