[drupal-devel] clipper and relations

Boris Mann borismann at gmail.com
Wed Sep 7 07:27:23 UTC 2005


On 6-Sep-05, at 11:52 PM, Kristjan Jansen wrote:

> My .02 on this:
>
> 1.  I do not get the inverse order in clipper.module:
>
>
>> 12 parent-child 15 means that node 12 is parent of 15
>> 45 child-parent 10 means that 10 is parent of 45
>>
>
> Why not just write '10 parent-child 45' ?

Thinking about this today, we can actually probably just do "12  
clipper-parent 15". Actually, parent-child would be modeled by  
default in the relation.module, but it lets me illustrate that we'll  
standardize on $modulename-relation.

> 2. how to impress the 'strength' or 'weight' of the relation  
> between two nodes?

There is a weight column, we've just been skipping it in examples.

> 3. relationships are so genereric feature so they proably need a
> $domain(s) property(ies) so 'uid:12 <-> uid:13' and similar relations
> can be mapped.

It's actually a left-id and right-id, NOT restricted to node-ids. So,  
it can already handle user-ids or anything else.

As per Adrian's example with buddylist, it might be something like:
12 buddylist-buddy 13
13 buddylist-enemy 14

It's up to the implementing module to decide what to do with the data  
in the table. The relation.module will just provide helper functions  
for dealing with a lot of the basics, implement basic relations and  
default displays. Modules can the focus on UI or other more complex  
display/workflow issues. Ideally, like event or attachment etc., any  
content type could be relation-enabled.

> Implementing this (and domain for relation itself) we are approaching
> to RDF [1] territory really fast ;)

Is that a bad thing? :P

--
Boris Mann
http://www.bmannconsulting.com





More information about the drupal-devel mailing list