Why does the use of interface-based programming appear to be limited to behaviour?
Posted
by
Carnotaurus
on Programmers
See other posts from Programmers
or by Carnotaurus
Published on 2011-02-27T11:23:31Z
Indexed on
2011/02/27
15:31 UTC
Read the original article
Hit count: 208
oop
|inheritance
I have been doing a little thinking about inheritance vs. realization vs. composition. I am not about to post the whole detail here. So I was wondering, when are not talking about supporting unit testing: Why does interface-based programming seem to focus upon the grouping of common behaviour, e.g., IPettable (for an animal), IEditable (for a user control), ISubmitable (for a form), etc. Why does the use of interface-based programming appear to be limited to behaviour when we could pragmatically group not so much on behaviour but on commonsense physical similarities which could have nothing to do with behaviour? It is not that there is some limiting feature within OOP; so how come?
© Programmers or respective owner