Forum OpenACS Development: Response to Some 4.X questions, and comments, including adding wizards to the package spec and complaints about subsites

Relational Segments

Relational segments are just a way of defining relations to groups, and they consist of unique pairs of group_id's and rel_type's. So a relational segment might be something like the members of group A, or the components of group B.

So far, the only use that I've seen for this in acs 4.x is to define constraints on membership and composition relations. Such as constraining membership relations between users and groups, and constraining composition relations between groups.

Constraints can be specified, so that you can say that I want all members of group B to also be members of group C. Or you can say that you want group X to be a component of group Y. You can also have more than one constraint on each 'side' of a relationship, and you can extend relationship types and add your own attributes to a relation, so relation types and their constraints can be arbitrarily complex.

Not only can you describe something like the member-in-a-role approach used in acs 3.x, but you can describe and constrain other types of relationships used in acs 3.x that were thrown together in an ad-hoc fashion for each new package. The advantage to the acs 4.x approach is that the relationships are described and accessed using a consistant interface.

So the price for this higher level of abstraction, is a longer learning curve and poorer performance due to the complexity of the implementation, balanced against having a consistent interface that supports arbitrarily complex modeling of relationships. It's hard to say now if it is a win, having not tried to apply the new relations concepts to new module development or to a new site development project, but it's likely that for most development projects, a small set of patterns will emerge that are useful when using the relations/constraints/segments code in acs 4.x.

acs 4.x definitely requires more of an up-front investment in learning, before you can become productive when using the toolkit. This will be turn-off for alot of people who were originally drawn to the acs toolkit, because it provided alot of functionality, and yet, it was easy to learn.