[dev] Turba Groups

Michael Cochrane mike@graftonhall.co.nz
Thu, 21 Mar 2002 13:35:40 +0000


Quoting Chuck Hagenbuch <chuck@horde.org>:

> > should Turba_Group also have a listMembers() function (returning an
> > array of Turba_AbstractObjects)?
> 
> Sounds good, yes.
Ok, it actually returns a Turba_List as this is much easier to work with. 

> > And should I also be implementing a Turba_GroupView and
> > Turba_GroupView_List
> > (List is most obvious, but _Tree would allow nested groups)?
> 
> Sounds good.
Skipping this for now, just using the Turba_ListView, with a slightly different
template

> 
> > I'll have a play around a bit and see what I come up with. Chuck or Jan
> > or anyone else, did you have anything specific in mind for the
> > implementation of the classes?
> 
> The main hurdle is storage, and decisions like whether or not to make 
> groups just a set of object ids, or to have them be just email addresses, 
> or to copy all information (I'd nix this option, but the other two are 
> valid, and might co-exist); whether to allow groups to have contacts from 
> multiple sources, etc.
I currently have groups as a set of object ids.... has a few not so nice side
effects.. when you add a contact to a group, it's always going to still be
listed outside the group in 'browse'... i suspect most people would expect it to
be moved into the group rather than just linked.

This kinda leads to two possible solutions. 
1. All objects are members of a root group and 'browse' displays the contacts in
that group... and having all other groups branch off this, which works fine with
using objectids. Nested groups are working fine.
2. Storing the complete Turba_AbstractObject in the Turba_Group some how. Not
sure how this one would happen cleanly though.

If you want a diff of what I have so far then just yell out. I'm going to persue
option 1 a bit further.

> Feel free to use the Category:: framework to store groups, if that makes 
> sense.
May have to look into this one.

- Mike :-)


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/