|
SemmleCode Professional comes with a wide range of pre-packaged analyses, from architectural properties and metrics, to statement-level checks for likely bugs and violations of best practice.
UI Accesses
This query shows how tightly each package is coupled with the UI stack. Red boxes represent packages that are
tightly coupled to the UI stack, green boxes represent packages that do not depend on it. Library packages are not shown.
How to Interpret the Query Results
Running this query on the Alfresco content management system yields the following result,
displayed as a tree map:
Every individual box represents a package. The size of
a box represents the code size of the corresponding package, and its colour the UI coupling ratio. Red boxes represent packages which have a
high percentage of outgoing dependencies on packages belonging to the UI stack. Green boxes
represent packages with a low ratio.
The coupling ratio value is displayed on mouse-over:
As we can see, many packages in Alfresco do not depend on the UI stack at all; they have a coupling ratio of 0.0 and show up as green boxes.
Dependencies on UI-related packages are localised in a small number of packages such as org.springframework.web.servlet.tags.form,
which has a UI stack coupling ratio of 2/3.
How to Address the Query Results
It is usually a good idea to localise dependencies on the UI stack in one or a handful of small packages, as it is done in Alfresco.
It is generally not a problem to have red boxes in the query result, as long as they are not too numerous and not too big.
Source Code
References
|