I made some progress after the prototyping work Kai and I did yesterday.
First, we found that for some reason, using plone.relations to build relationships between "social actors" needs manipulating persistent objects, so we had difficulty to achieve the simple use case of a member adding a friend to his friends list, using plain memberdata.
With the hypothese that the SocialActor has a proxy which is a persistent object (currently I am simply using the MemberFolder, the social actor being a plain Plone user), I can manage to add contacts for a connected member. So we should be able to have an interface where you can see members and add them to your friends list.
I will continue when I get at home, fixing a security bug, and provide a quick interface so people can test, and tomorrow I will commit my changes to the collective.
More details and discussion tomorrow.
Hi all,
I tried to join in remotely but I guess sprints are meant to be in one location for a reason. Without that level of direct communication I don’t think its easy to get things done fast.
In the absence of anyone else I started on the invite core code. If there is someone more familiar with z3 utilities can you give me some advice on where to go next with it?
Didn’t see you online yesterday Kamon, which is a pity because it’s odd about needing a persistent object because there used to be code in plone.relations that already worked for ordinary members. Using a proxy.
http://article.gmane.org/gmane.comp.web.zope.plone.cvs/17877
Since members have a unique id (member id) then it should be possible right?
Anyone more familiar with plone relations?
The next steps I think are to create a basic UI for the social graph to inform the framework that kai and Kamon are making so as to focus it on whats needed. And to finish the invite code and then integrate the invite code into the socialgraph ui.
The basic UI for a socialgraph in plone could be that a user to can add other users to one or more of his/her contact lists. A user has 1 or more contact lists, Each contact list has a name which the user label whatever they want, “friend”, “enemy”, “people not to sit next to next plone conference because they smell”. I suspect this might be general enough for a large enough subset of usecases to be useful.
Dylan.
Found the code
http://dev.plone.org/plone/browser/plone.app.relations/trunk/plone/app/relations/userrelations.py
http://dev.plone.org/plone/browser/plone.app.relations/trunk/plone/app/relations/userrelations.txt
It’s in the trunk version of plone.app.relations
Hi!
I made some progress after the prototyping work Kai and I did yesterday.
Cool! :-)First, we found that for some reason, using plone.relations to build relationships between "social actors" needs manipulating persistent objects, so we had difficulty to achieve the simple use case of a member adding a friend to his friends list, using plain memberdata.
Well, I was working on plone.base.profile today and I basically created a layer on top of it which can be used like this:
membermgr = MemberManager(plonesite)
member = membermgr.getMemberById('myname')
member is then a virtual object but could be persistent by making your own member manager
It implements IMember which then be used to adapt whatever to it, like
basicinfo = IBasicMemberInfo(member)
print basicinfo.fullname
I will check this in later. It's on my laptop which run out of battery earlier.
So maybe this can help and the member manager can make persistent members on the fly.
This all might also lead to an replacement of the memberdata tool maybe which is more extensible.
With the hypothese that the SocialActor has a proxy which is a persistent object (currently I am simply using the MemberFolder, the social actor being a plain Plone user), I can manage to add contacts for a connected member. So we should be able to have an interface where you can see members and add them to your friends list.
Cool! :-)I will continue when I get at home, fixing a security bug, and provide a quick interface so people can test, and tomorrow I will commit my changes to the collective.
More details and discussion tomorrow.
Great news, esp. that we get started on all of this! :-)
Hi all,
I tried to join in remotely but I guess sprints are meant to be in one location for a reason. Without that level of direct communication I don't think its easy to get things done fast.
In the absence of anyone else I started on the invite core code. If there is someone more familiar with z3 utilities can you give me some advice on where to go next with it?
Didn't see you online yesterday Kamon, which is a pity because it's odd about needing a persistent object because there used to be code in plone.relations that already worked for ordinary members. Using a proxy.
http://article.gmane.org/gmane.comp.web.zope.plone.cvs/17877
Since members have a unique id (member id) then it should be possible right?
Anyone more familiar with plone relations?
The next steps I think are to create a basic UI for the social graph to inform the framework that kai and Kamon are making so as to focus it on whats needed. And to finish the invite code and then integrate the invite code into the socialgraph ui.
The basic UI for a socialgraph in plone could be that a user to can add other users to one or more of his/her contact lists. A user has 1 or more contact lists, Each contact list has a name which the user label whatever they want, "friend", "enemy", "people not to sit next to next plone conference because they smell". I suspect this might be general enough for a large enough subset of usecases to be useful.
Just realised contacts might also be confusing as we're using it with regard
to contact importing, for instance for importing email addresses from
hotmail etc.
I just noticed in Plaxo its called connections.
Linkedin uses Contacts as a menu item then tabs for connections and imported
contacts. It has "add connections" "remove connections".
Anyone object to that?
Friends or buddies won't work as it doesn't work for all possible
relationships.
> - I wonder if we should maybe rename SocialActor etc. to simply Member
> as I think it's more common. SocialActor
> sounds more academic which is of course ok but my fear is that some
> people have problems with too much academic
> talk ;-)
+1 for that. Plone site users are called members. Lets keep it that to avoid
confusion.
> - Dylan and I discussed that plonesocial.base.profile might be renamed
> to .member because a member is the basic thing
> and we might attach profiles to it.
>
> - In socialgraph I now see SocialActor and SocialActorProxy. If you
> look into my package you might see IMember and an adapter
> for the plone site to retrieve an object (a proxy basically)
> implementing IMember. This is not persistent and the idea was that it
> can act as a point on which you can adapt something. I do this with
> IBasicMemberData. I wonder what approach is better. And
> what about factoring it out to .profile/.member? My MemberManager
> can of course also be changed to provide persistent member
> objects. I don't see a real need for a proxy here though.
>
> So that have been my remarks. Feedback is welcome :-)
>
> And although we might have duplicated efforts here maybe we can throw
> all this together and see what mix might do the job best.
> Eventually we have to change something anyway should we try to write
> applications on top of it.
Lets put it all together in plonesocial.common.member or and then build a
plonesocial.app.connections??? What does .app mean anyway?
>
> But great work everybody! :-)
>
> Moreover I wonder if we should maybe do some skype conference or so to
> discuss things a bit more in realtime.
Lets do it. I'm 'dylan_jay' on skype or 'djjay' on irc.freenode
Friends or buddies won't work as it doesn't work for all possible
relationships.
+1 for that. Plone site users are called members. Lets keep it that to avoid
> - I wonder if we should maybe rename SocialActor etc. to simply Member
> as I think it's more common. SocialActor
> sounds more academic which is of course ok but my fear is that some
> people have problems with too much academic
> talk ;-)
confusion.
Lets put it all together in plonesocial.common.member or and then build a
> - Dylan and I discussed that plonesocial.base.profile might be renamed
> to .member because a member is the basic thing
> and we might attach profiles to it.
>
> - In socialgraph I now see SocialActor and SocialActorProxy. If you
> look into my package you might see IMember and an adapter
> for the plone site to retrieve an object (a proxy basically)
> implementing IMember. This is not persistent and the idea was that it
> can act as a point on which you can adapt something. I do this with
> IBasicMemberData. I wonder what approach is better. And
> what about factoring it out to .profile/.member? My MemberManager
> can of course also be changed to provide persistent member
> objects. I don't see a real need for a proxy here though.
>
> So that have been my remarks. Feedback is welcome :-)
>
> And although we might have duplicated efforts here maybe we can throw
> all this together and see what mix might do the job best.
> Eventually we have to change something anyway should we try to write
> applications on top of it.
plonesocial.app.connections??? What does .app mean anyway?
Lets do it. I'm 'dylan_jay' on skype or 'djjay' on irc.freenode