UML: FAQ: May one draw an Association between Interfaces ?


This FAQ often generates a lot of heat, however in the end it just comes down to choice, intent and end-purpose.

In many UML tools Associations between Interfaces are supported, however it does not always directly match a target implementation language such as Java.

For domain analysis it can be useful to indeed show Associations between Interfaces to indicate Entity-Relationship modelling which also emphasising design by contract (or analysis by contract) and substitutability.

Whether this is compatible with a candidate forward-engineering solution depends on the technology you have chosen. For example EMF uses entity-like Classes which are then generated as Class/Interface pairs.

One solution I have employed for domain analysis is to use both and Interface (such as Thing) and a "default implementor" (by convention Thing_, with an InterfaceRealization to Thing, so that one can have the best of both worlds.

UML: FAQ: May one draw an Association between Interfaces ?