ZF hierarchical data manipulator (previously known as Zend_Tree)

I have submitted a proposal for Zend_Tree months ago, but it seemed like the timing wasn’t right. I also believe that the naming convention “Tree” is causing a lot of confusion, and that the proposal could use some serious refactoring. The way I see this component, is more like a “background component” that manipulates, stores, hierarchical data.

We have already demonstrated a numerous amount for the need and value of a basic, simple class wrapping PHP arrays. Tree-like manipulation of such arrays might also prove useful to some core ZF components, such as Zend_Session, Zend_Acl, Zend_Registry, and Zend_Config.

The ZF goals include consistency. Factoring common code into a shared API helps this goal.

We have requested for expanding our group think/brainstorm to include what “tree” functions might be needed by these components. But until now there hasn’t been much (not to say none) feedback on this.
Condsider the following example (thanks Gavin):

Given a user, user session, and a “social” website (like myspace.com), perhaps a model populates a list of the user’s friends who are online. If this “tree” of data were saved to the registry, I can imagine business logic processing that data and deciding to move some or all of the resulting data into the user’s session. The move might result in a merging of values with an existing namespace in the user’s session, or the creation of a new namespace, both “tree” operations. Both Zend_Session and Zend_Acl appear to have several reasons to modify or display some or all of their “tree” data structures, sometimes in ways more complex than provided by simple accessors.

1 Comment so far »

  1. Matjaz Slak said,

    Wrote on March 12, 2007 @ 12:15 pm

    I’ve done quite some work developing such a feature for my own work (not in PHP), so if you require someone to brainstorm the “usual” features required to implement such a system, feel free to contact me.

    I’m now just starting to use the Zend framework for one of my projects, so I’m not yet very skilled on it, but I’m quite into PHP programming.

    Matjaz.

Comment RSS · TrackBack URI

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment: