Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does package tangle index data indicate in Sonar?

Tags:

I have the following data on one of the 7 axes (See the second picture) after running a Sonar analysis on my project. What information can be decoded from this data? Also which of the axes in the diagram below does this data pertain to?

enter image description here

enter image description here

like image 624
Inquisitive Avatar asked Mar 10 '13 11:03

Inquisitive


1 Answers

It means that there are cyclical dependencies between packages and files.

Ideally, you want dependencies to flow in one direction - this allows you to make changes and predict their impact. For instance, if your "user interface" package depends on the "business logic" package, but nothing depends on the "user interface" package, you should be able to make changes to the user interface without breaking anything outside that package. A cyclical dependency means (for instance) the user interface package depends on the business logic package, but the business logic package also depends on the user interface package. Now if you change the user interface, you might break the business logic layer - which in turn might affect something totally unrelated in the user interface.

The idea of "layering" software, and having dependencies flow in a single direction between layers is designed to remove this tangle.

You can very often reduce this tangling by moving classes from one package to another.

Tangling is usually an architecture/design problem.

like image 169
Neville Kuyt Avatar answered Sep 30 '22 16:09

Neville Kuyt