[Pmwiki-users] PmWiki development

J. Perkins jason
Tue Jun 8 16:35:28 CDT 2004


Patrick R. Michaud wrote:
> Right, I'm just experimenting with possibilities for nested groups,
> but I'm still not fond of the idea.  I still haven't seen an instance
> where it's really needed or useful (although I'm looking into the
> stuff that Jason Perkins wrote about a few days ago).

You can try it out at

   http://www.sim8.com/wikibox/wiki.php?page=/HomePage

Very rudimentary at the moment, just trying to prove the concept. You 
can treat the whole site as a sandbox, edit away.

As for whether or not this is useful, I'll leave that up for debate. The
one application where I have had a hard time working around the
Group.Page scheme is documenting a software library, as I described in
my last post on the subject. I'll try to make this quick. I've got this
code:

namespace Outer
{
   namespace Inner
   {
     public class MyClass
     {
       public void MyMethod() { ... }
       public void AnotherMethod() { ... }
     }
   }
}

In the current implementation I'd have these pages:

Docs/HomePage
Docs/Outer
Docs/Outer_Inner
Docs/Outer_Inner_MyClass
Docs/Outer_Inner_MyClass_MyMethod
Docs/Outer_Inner_MyClass_AnotherMethod

This works. But to link from "MyMethod" to "AnotherMethod" I have to
write [[Outer_Inner_MyClass_AnotherMethod]]. Also, the page names are
not suitable for printing (I could fix it with some hacking, unless
there are underscores in any of my namespace/class/method names).

With nested pages I have

/Docs/Outer/Inner/MyClass/MyMethod

where each level is its own page. I can use the PHP path functions to
parse it up and display it. Linking from MyMethod to AnotherMethod is
just [[AnotherMethod]]. IMHO, this isn't any more difficult to
understand than the current version, just different.

Trying to figure out how to generalize it enough that it could be
swapped in and out...

I think that it is possible to make this a configurable option, with the
caveat that pages created in one system might not work with another. You
need to create what I've been calling a "resolver" for lack of a better
term. When a request comes in for a page, treat the page name as an
opaque key. All page information comes from replaceable functions.

Alright, that's my $1.50, I'll let you all get back to the debate while
I go get the latest PmWiki from cvs.

Jason







More information about the pmwiki-users mailing list