Contact model: Difference between revisions

From diaspora* project wiki
m (MrZYX moved page Contact to Contact model: It's about the model, not the concept directly.)
(+ood notice)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Out of date}}
{{Note|1=Is this page still useful? Only [[An introduction to the Diaspora source]] links here and this is the only model with further explanation. I feel like we should either explain all of them or none..(?) --[[User:Waithamai|waithamai]] <sup>[[User talk:Waithamai|talk]]</sup> 01:53, 30 August 2017 (UTC)}}
This is a proxy class for describing relationships between users and can best be understood through an example.
This is a proxy class for describing relationships between users and can best be understood through an example.


The columns are labled in a confusing manner:
The columns are labeled in a confusing manner:


* A contact has a user, that is you and the perspective we're using from now on.
* A contact has a user, that is you and the perspective we're using from now on.
* A contact has a person that is the other entity in the relationship.
* A contact has a person that is the other entity in the relationship.
* A connection is thus modelled through two contacts, stored in the database that the user belongs to (can be the same one for local connections). receiving means that the person is receiving posts from the user, given the person can see them (public or matching an aspect_membership).
* A connection is thus modeled through two contacts, stored in the database that the user belongs to (can be the same one for local connections). receiving means that the person is receiving posts from the user, given the person can see them (public or matching an aspect_membership).
* sharing is a pure indicator if the person is sharing with the user.
* sharing is a pure indicator if the person is sharing with the user.


Given we have userA with personA and userB with personB we can have the following situations.
Given we have userA with personA and userB with personB we can have the following situations.


* No contacts at all or contacts with receiving = 0 and sharing = 0: Users do not follow or share with each other.
* No contacts at all or contacts with receiving = false and sharing = false: Users do not follow or share with each other.
* contactAB with receiving = 1 and sharing = 0: Then we have contactBA with receiving = 0 and sharing = 1. userA is following personB, userB is not following personA.
* contactAB with receiving = true and sharing = false: Then we have contactBA with receiving = false and sharing = true. userA is following personB, userB is not following personA.
* contactBA with receiving = 1 and sharing = 0: Then we have contactAB with receiving = 0 and sharing = 1. userB is following personA, userA is not following personB.
* contactBA with receiving = true and sharing = false: Then we have contactAB with receiving = false and sharing = true. userB is following personA, userA is not following personB.
* contactAB with receiving = 1 and sharing = 1: Then we have contactBA with receiving = 1 and sharing = 1. A fully bi-directional relationship, both users are following each other.
* contactAB with receiving = true and sharing = true: Then we have contactBA with receiving = true and sharing = true. A fully bi-directional relationship, both users are following each other.


Following and sharing are synonym terms, their perspective is just a little bit different.
Following and sharing are synonym terms, their perspective is just a little bit different.


[[Category:Technical]]
[[Category:Technical]]

Latest revision as of 01:53, 30 August 2017

Out of dateOut of date:This page's accuracy may be compromised due to out-of-date information. Please help improve the page by updating it. There may be additional information on the talk page.
NoteNote:Is this page still useful? Only An introduction to the Diaspora source links here and this is the only model with further explanation. I feel like we should either explain all of them or none..(?) --waithamai talk 01:53, 30 August 2017 (UTC)

This is a proxy class for describing relationships between users and can best be understood through an example.

The columns are labeled in a confusing manner:

  • A contact has a user, that is you and the perspective we're using from now on.
  • A contact has a person that is the other entity in the relationship.
  • A connection is thus modeled through two contacts, stored in the database that the user belongs to (can be the same one for local connections). receiving means that the person is receiving posts from the user, given the person can see them (public or matching an aspect_membership).
  • sharing is a pure indicator if the person is sharing with the user.

Given we have userA with personA and userB with personB we can have the following situations.

  • No contacts at all or contacts with receiving = false and sharing = false: Users do not follow or share with each other.
  • contactAB with receiving = true and sharing = false: Then we have contactBA with receiving = false and sharing = true. userA is following personB, userB is not following personA.
  • contactBA with receiving = true and sharing = false: Then we have contactAB with receiving = false and sharing = true. userB is following personA, userA is not following personB.
  • contactAB with receiving = true and sharing = true: Then we have contactBA with receiving = true and sharing = true. A fully bi-directional relationship, both users are following each other.

Following and sharing are synonym terms, their perspective is just a little bit different.