Forum OpenACS Q&A: Linking in OpenACS

Collapse
Posted by Dirk Gomez on

On the Siemens ShareNet project there was one particularly interesting feature: "linking". Users are able to create commented links between objects in the system.

Here's a snapshot from a demo system where a knowledge object "Zope" of type "Competitor" would be linked to another knowledge object of type "Person":

http://ccm.redhat.com/doc/core-platform/5.0/acs-core/doc/images/add-link.gif

(No, I was not responsible for the content.)

IIRC information was stored in a table that somewhat looked like this:

link_id
object_id_a references acs_objects
object_id_b references acs_objects
comment     varchar2(4000)
direction   check whether in ('l2r','r2l','bi')

*Every* module in ShareNet was "sn-linking"-enabled e. g. in the "knowledge library" a link would look like this:

http://ccm.redhat.com/doc/core-platform/5.0/acs-core/doc/images/checklist.gif

(Link to Joe Lichtenberg)

Now, I was wondering whether such a facility already exists in OpenACS - HEAD is fine. If yes, where/how can I find it? If no, is there a designated OpenACSish way i.e. using one of the tables the object system provides?

Collapse
2: Re: Linking in OpenACS (response to 1)
Posted by Dave Bauer on
You should look at the acs-relationships system. It is designed to define relationships between acs-objects. You can define a relationship type and attach attributes to the relationships.

See:
https://openacs.org/doc/sql/display-sql?url=acs-relationships-create.sql&package_key=acs-kernel

and
https://openacs.org/doc/openacs-4/object-system-design.html#objects-design-relation-types

I think the data model is more enlightening than the documentation.

Collapse
3: Re: Linking in OpenACS (response to 1)
Posted by Don Baccus on
We don't have any UI that exposes the ability to relate objects.  Also the content repository has a lighter-weight way of relating content objects that competes with acs-relationships - this is purely due to the fact that the CMS/CR was originally written as a standalone application and later grafted to ACS 4.0 without sufficient integration.

I think acs-relationships are the way to go because the CR stuff's limited to cr_items and obviously we want to be able to relate any two objects in the system, particularly people and content.

They're heavier-weight than I'd like as each row's an object.

On the other hand this allows one to use permissions to control access to knowledge links.  In general this strikes me as being too fine-grained but I've not had to build a complex system of this sort so I may be wrong.

Along similar lines is the notion of "general ranking", allowing one to define ranking dimensions and to hook ranking to any object in the system. "mirror mirror on the wall, who's the cutest of them all"  Why ... none of them, they're all geeks, one star max!  Ranking of anything, yep ...

I have the tarball of some very minimalistic steps in that direction taken by someone who'd hoped to have time to complete a general rankings package but ended up landing a large contract to work on a java-based knowledge management system instead.

Anyway ... implementation of the kind of relationships Dirk mentions along with a completed general rankings package would give us a quite a base for doing "knowledge management" type stuff.  The content repository also implements the kind of dynamic type extension stuff, complete with help to automate form building and handling neede for something like ShareNet, though we're not quite sure how well it works (Jeff Davis is investigating this as part of his work in implementing a module for dotLRN)