[Pmwiki-users] Re: Re: Re: Organization of pages (was: Hierarchical groups)
Wed Jun 16 14:01:54 CDT 2004
Oops.. thought I'd already sent this. Since I can't remember why it was
still in my "postsponed" box, I'll just send it.
On Sun, 13 Jun 2004, Patrick R. Michaud wrote:
> On Sun, Jun 13, 2004 at 11:03:36AM +0200, Christian Ridderstr?m wrote:
> > > > It's probably a good idea to think of the pages as a database (regardless
> > > > of how it's implemented), and look at how to structure it from that point
> > > > of view.
> > >
> > > PmWiki 2.0 does just that.
> > Ok. Do you have a reason for not giving pages a unique ID? From my
> > experience with databases I'd say that's almost a requisite?
> Well, pages *do* have a unique ID, the page name is a unique ID.
Yes (when you include the group name in "page name"). But this ID is not
constant if we allow pages to be renamed (more than just changing the
> The question (I think) you are really asking is why not give pages
> a unique ID other than the page name,
No, I mean in *addition* to their page name. It should be as simple as
adding a field: "ID=2323" where the number is increased each time a new
page is created.
Btw, I'm more and more starting to think of the page name as the "URI" of
the page. And further more, I can think of cases where I'd want the same
page to be accessed through the same URI. (We've already discussed using
[[include:]] and [[redirect:]] as a solution for this)
> and the answer is that I then have to come up with a set of tools and
> interfaces for a wikiadministrator to be able to manipulate the pages in
> the database (no matter how it's stored)--i.e., removing groups, copying
> pages from one wiki to another, and other things that can be done within
> the filesystem now become much more difficult and require a lot of extra
> scripting and support.
I don't think we are talking about that much work here (and if necessary I
could write it for you --- that's how much I think ID's are needed).
> I don't see the benefit (version control of page names) as being
> anywhere close to worth the cost in terms of ease of maintenance,
> importing pages, exporting pages, backups, etc.
I just realized that with an extension, version control of page names
would let you deal with renamed pages (that don't have a redirect).
Would that be useful?
> Using IDs other than pagenames throws out a lot of tools (ftp, rm, mv,
> del, cp, etc.) that are now available for administrative purposes, or at
> the least makes them more difficult to use.
* 'rm' will still work (the pages i definitely gone though)
* 'mv' will still work (the page has been renamed though)
* 'cp' would need extra work aftwards (*)
* Restoring a page that has been backed up will still work
* Importing a page from another wiki would need extra work afterwards (*)
I don't think it's that difficult, and I'd be fine with having to choose
between manual manipulation of the database and being guaranteed unique ID
numbers of the pages.
(*) In this situation a page may have been added that has the same ID as
some other page. However, I think this could be handled automatically by a
"cleanup" script, that wouldn't even have to know which file was
incorrectly added. It could do something like this:
* Scan all pages for their IDs and generate a list
* Check the list of IDs for duplicates
* Give the more recent file a new ID (possibly logging the change in
Christian Ridderstr?m http://www.md.kth.se/~chr
More information about the pmwiki-users