[ prog / sol / mona ]

prog


Who should own an interface?

1 2019-10-18 21:37

Assume an interface X which is used between two components A and B. Who should be the owner of X? I see three fundamental possibilities:

1. One of the components A or B, so one depends on the other.
2. A parent component, so A and B depend on the parent.
3. The user, so there must be an adapter to map between A and B.

Of course, the answer depends on the circumstances and tradeoffs but are there insights to help with it?

I would expect that it was already discussed heavily in the seventies between Fred Brooks, Alan Perlis, and Dijkstra. However, I don't know any such publication.

7


VIP:

do not edit these