Re: Tree (was: wolframs packages)

From: Date: Fri, 04 Jun 2004 19:55:07 +0000
Subject: Re: Tree (was: wolframs packages)
References: 1 2 3  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-1374@lists.php.net to get a copy of this message
I wrote:
I'll comment the rest of your mail later :) - have to go now.
- different traversal algorithms, an iterator interface would be nifty.
Yeah, true. Some specialized iterators a certainly a good idea. One could already iterate easily over an unfold()'ed or serialize()'d tree, so I'll take up this idea for myself, thanks :)
The idea is: a minimal (and I mean it!) core class, an extended admin class for tree manipulation, and some decorators to provide output filters (such as datatype conversions and field masking). The containers should be pluggable.
What I really don't like are these "container implementaions" which tend to duplicate the API and make everything more difficult than easier...
agreed, I had to jump more than once to implement a mdb driver in current pear::Tree. The problem is the support to more containers was not planned at all in the original code. But if designed properly, it can be trivial to implement. All we need is a common interface, aka a stub, to proxy driver-specific calls. I did so in Translation2, it hasn't been difficult :-)
I have to re-emphasize, that I'm against a container model, unless we use PHP5 and __call(). I guess we should start with some UML diagrams for the beginning ;-) Regards, Michael

« previous php.pear.qa (#1374) next »