Are there any real benefits of using interfaces over abstract classes in a domain model? Does anyone have any experience using interfaces in a domain model in a real project?
From a technical perspective, DDD defines stereotypes like aggregate, value, repository, etc. Repositories then, for example, can be defined as interfaces like ICustomerRepository
which are then implemented by the infrastructure. Now that's a valid use case for an interface, since there can be multiple implementations of the repository (mocks, fakes etc.). However that is an entirely technical reason for using it: here the interface is only used to separate domain-specific repository from its technical implementation.
But what about purely domain-specific interfaces? Has anyone ever encountered a situation in which both the interface and its realization were non-technical? In particular, what reasons could speak for choosing an interface over an abstract class when implementing a domain-specific type? Maybe when multiple inheritance is involved it would be required, but how probable is it and could it be considered a good design then?