1

Let's say I have objects that have relationship references. These relationships could be parent-child, siblings, actor-reactor, publisher-subscriber, etc. but I don't want to restrict the relationships to any particular type of relationship. I want to allow the user of the framework to provide any number of relationship references for whatever purpose (helpers, validation, event handling, etc.) they desire.

However, the issue I'm running into now is: What do I call the other member of the relationship? If I want to ask ObjectA for ObjectB via its relationship with ObjectB, what would I call it? ObjectA.getRelationshipMember(aliasOfObjectB)?

  • The more generically you model things, the more generic your names for things become. So getRelatedThingamabob is probably as good as it's going to get. – Becuzz Mar 15 '18 at 16:30
3

If I want to ask ObjectA for ObjectB via its relationship with ObjectB, what would I call it?

How about a relative? ObjectB is related to ObjectA, but you don't know exactly what the relationship is, so there's not much more you can say than that some relation exists.

  • 2
    This is exactly the word I was looking for. No idea why it's been eluding me for over a week. Thank you! – KOVIKO Mar 15 '18 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.