Question

Complexity of the interface is another factor affecting coupling. The more complex each interface is, the higher will be the degree of coupling

The above quoted sentence is from A concise introduction to Software Engineering ,Chapter 6: Design

I don't know how the interface can be used in communication between modules of component diagram ?

Was it helpful?

Solution

Interfaces are implemented (exposed) by the components.

Other components reference this interfaces and use them to create objects, invoke methods, etc. This relationship between a component and the interface it uses is called dependency.

The more interfaces you have in your system, the complexer your system is.

Actually, the factor that influences the complexity much more than pure interface count is the nature and the structure of just mentioned dependencies. A solid system architecture has low number of dependencies, organized in a clear, clean and simple manner.

Especially dangerous are so called circular dependencies. They should be fully avoided.

A simple example: enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top