I have a model where a User
represents the user using the application and each User
has friend
s and follower
s (identical to twitter relationship paradigm) which are just references to other 'User's with information like dateAdded
, userId
etc
I've found my friend
and follower
model classes have similar enough high level concepts to justify an abstract base, but I can't think of a name for one side of a friend relationship that is开发者_Go百科 specific to this friend model and isn't too general.
So far my best candidate I am considering is SocialGraphVertex
. Perhaps SocialGraphLeaf
is more accurate or RelationshipLeaf
is less of a mouthful. Any suggestions?
It's an edge in a graph, RelationshipEdge
is accurate.
I would go with something like RelatedPerson
.
The key concern when introducing names for such base classes is that whatever name you choose must be compliant with the is-a relations you introduce. For instance, the RelatedPerson
sort of works out sense a friend
is a RelatedPerson
and a follower
is a RelatedPerson
.
It would be easier to give a good suggestion if you included a few properties of the base class.
精彩评论