On Thu, 5 Jul 2007, Alexandru Stanoi wrote: > Derick Rethans wrote: > > > > Use Cases > > --------- > > > > * ACL as PHPGACL: http://phpgacl.sourceforge.net > > * Holding a file directory > > * Content structure for CMS > > CMS content structure seems like the best application for Tree. But does > it need to handle content versioning then? Or would that be another > component?
That's more a property of the data itself, not the structure. The versioning is something that should lay on top of PersistentObject for example. > > > Requirements > > ============ > > > > The component should handle the representation of tree structures in > > database tables. There are different algorithms for representing tree > > structures in a relational model and they can all be the fastest for a > > specific application. Therefore we need to implement a backend mechanism > > with multiple backends for each specific optimized algorithm. > > > > Besides the database backends there could be other places on where to > > store tree structures - for example simply on the file system or in an > > XML file. The backend mechanism should support this as well. > > Might as well mention PHP arrays here, for small trees? Yeah, I guesso :) > > Design goals > > ============ > > > > It's desirable to have an OO API to handle the nodes like the DOM > > extension, e.g. Node->appendChild(). On the other hand it's an advantage > > not be obliged to extend an abstract node class when working with the > > content of the leaves. > > Do you mean that the content is a node in the tree? Or that the node > contains the content as a property? The content is not a node in the tree - although it could be physically in the same table row. When working with Trees however the content would be accessible through a property of a node. > > Format > > ====== > > > > The following algorithms should be supported: > > Would it be possible to convert between different algorithms > back-and-forth? Some algorithms might be more appropiate (speed-wise) > for some tasks while others would be not, so the conversion could be > useful in this case to port the data to other algorithms. Yes, I can not see why not. I updated the document with your comments. regards, Derick -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
