Forum OpenACS Q&A: Re: Working notes on OpenACS 6 proposals

Collapse
Posted by Tom Jackson on

I'm unclear on the meaning of parent_id, and why an object can have only one of these. Can you re-use objects, or can only pages reuse objects? If I upload a photo in photo-album, can I re-use the same photo somewhere else?

Collapse
Posted by Joel Aufrecht on
I've been thinking about object parentage in terms of dimensions.  Each object in the system has a location in at least two dimensions, and each dimension is a tree.  One is the object type dimension: each object has one and only one object type, and that object type is directly descended from the "base object".  For multiple inheritence, polymorphism, etc, let's leave that out of this dimension until there's a need for it.
The second dimension is the "basic dimension."  Every object has a place in this dimension for two purposes: so that it can be located by a user, and so that it has a permission context.  (This would replace the context_id regime.  E.g., currently every object is in a package, and inherits permissions from the package.  Instead, any object could be in any other object and inherit thusly.)  This dimension should also be single-parent unless there's a strong reason otherwise, which I haven't seen yet.

Now, we want additional dimensions so we can arrange the site in different ways just by moving folders around on a tree.  Do we do this with entire additional dimensions, or with symlinks, or is there a need for both?  I can see use cases for each.  For the first, I want to build one site map for visitors, another for customers, and a third for staff.  I could do that with permissions masks, but that only lets me hide sections, not change their layout.  For the second, Tom's example of putting a photo in two places is a use case.  In that example, the photo should still have only one "true" home, from which permissions are determined.