[dev] Re: Re: Adding contact to nag task [Patch]
Chuck Hagenbuch
chuck at horde.org
Mon Jan 27 11:18:43 PST 2003
Quoting Jeroen Huinink <j.huinink at wanadoo.nl>:
> Sort of. Are you thinking about specifiying relationships through API
> functions or do you want a relationship setup next to the current API
> setup. E.g. there is this _services array. Do we want a _relationsships
> array to define relationships?
No. I see no need to add a system parallel to the registry system, and you'd
have to give me a *very* convincing reason to do so. It's a flexible system
that's already capable of handling everything you're talking about.
> In another subthread we already discussed that we could have more than
> one relationship between different providers. E.g. an "author" and
> "editor" relationship between Gollem and Turba and a "client" and
> "employee" relationship between Hermes and Turba.
>
> We could use the _relationsships array to specify that a certain
> relationship is the reverse relationship of another and therefore only
> allow reverse references if explicitly allowed. E.g.
Use an API function to list the relationships. Why are you tied to this new
array?
> In nag:
> _relationship["contact"] = array (
> provider = "contacts",
> ... // probably some other elements to go here as well.
> description = _("Contact"),
> );
>
> _relationship["related_contacts"] = array(
> reverse = "tasks/contact",
> description = _("Related tasks")
> );
>
> In gollem:
> _relationship["author"] = array (
> provider = "contacts",
> ... // probably some other elements to go here as well.
> description = _("Author"),
> );
>
> _relationship["authored_documents"] = array(
> reverse = "documents/author", // I noticed that gollem doesn't "provide"
> anything yet so I invented "documents" for the purpose of this example.
> description = _("Related tasks")
> );
Seems like that's overly complicated; you ought to be able to figure out the
reverses programattically, just by checking if they exist...
-chuck
--
Charles Hagenbuch, <chuck at horde.org>
must ... find ... acorns ... *thud*
More information about the dev
mailing list