Building Dependency Webs in J2EE
Subject:   Transitive Dependencies
Date:   2003-02-03 09:06:07
From:   anonymous2
Consider interface ShapeFactory that refers to interface Shape that, in turn, refers to interface Point. Suppouse I compile all of these classes in Java and then remove Point interface before I run the code. What happens? Of course you will get ClassNotFoundException. ShapeFactory can not exist with Point because point is an essential ingredient of Shape.

Systems theory and Complexity Theory, agree that
Complex Systems are networks of interacting components. Moreover, these networks are nested. It is exactly this nested nature of these networks that gives rise to transitivity.

Complexity scientists agree that modeling complex systems as networks is an essential step towards understanding them. I would recommend you to read latest book by Duncan Watts, called Six Degrees.

The claims that we make are substantiated as follows. We compute average impact of change and stability metrics based on the Dependency Webs that we construct. We then correlated these metrics with incidences of undesirable structures such as cyclic dependencies, hubs, etc. Poorly written systems exhibit high average impact of change, low stability and large number of undesirable structures.

Your example:
ClassA implements B, and class C calls a method on B. Class C depends on class A behaving a certain way as prescribed by the interface, yet there is no reference in the source or class from C to A.

I think that I already clarified this above. This is a transitive dependency. If you remove Class A, Class C will not work.

The claims that we make are not far fetched. First of all we have data to back them up. Secondly, they are common sense. If you are careless about creating dependencies and pay little attention to the structure of your software you will soon end up with the system that is complete out of your control. Ask any good engineer.