Benefits of Interfaces
By means of interfaces, the inheritance of implementations can be separated from the inheritance of interfaces
- frameworks especially are built on the basis of interfaces
-
A class can be seen as a set of roles
- each interface represents a role played by the class
- different clients use only those roles which are interesting for them
- by means of interfaces, different views on a class can be realized for different clients
- coupling is reduced, flexibility with respect to maintenance and extensibility is increased