... | ... | @@ -20,7 +20,7 @@ God Component, on the other hand, is detected using the number of lines of code |
|
|
|
|
|
Further details on each smell are provided in the subsections below.
|
|
|
|
|
|
## Unstable Dependency
|
|
|
## Unstable Dependency (UD)
|
|
|
This smell represents a component (by *components* we refer to both classes and packages, but in the case of UD, we only mean packages/folders.} that depends upon a significant number of components that are less stable than itself.
|
|
|
The stability of a component is measured using Martin's [instability metric](https://en.wikipedia.org/wiki/Software_package_metrics), which measures the degree to which a component (e.g. a package) is susceptible to change based on the classes it depends upon and on the classes depending on it.
|
|
|
The smell thus arises when a component has a significant number of components -- the tool Arcan uses a 30% threshold -- it depends upon with an instability value higher than its own.
|
... | ... | @@ -30,7 +30,7 @@ A UD smell is detectable on Java package-like (or folders for C/C++ systems) ele |
|
|
|
|
|
The main problem caused by UD is that the probability to change the main component grows higher as the number of unstable components it depends upon grows accordingly. This increases the likelihood that the components that depend upon it (not shown in the figure for simplicity) change as well when it is changed (ripple effect), thus inflating future maintenance efforts.
|
|
|
|
|
|
## Hublike Dependency
|
|
|
## Hublike Dependency (HL)
|
|
|
This smell represents a component where the number of ingoing and outgoing dependencies is higher than the median in the system and the absolute difference between these ingoing and outgoing dependencies is less than a quarter of the total number of dependencies of the component. A hublike dependency can be detected both at the package/folder and at the class/file level.
|
|
|
|
|
|
![architectural-smells-hublike-dep](uploads/c36858b2b6cf936b3f22eaee75d041b3/architectural-smells-hublike-dep.png)
|
... | ... | @@ -40,6 +40,16 @@ Making a change to any of the components that A depends upon may be very hard (a |
|
|
Additionally, the central component is also overloaded with responsibility and has a high coupling.
|
|
|
This structure is thus not desirable, as it increases the potential effort necessary to make changes to all of the elements involved in the smell as well as easing the ripple effect of changes.
|
|
|
|
|
|
## Cyclic dependency (CD)
|
|
|
This smell represents a cycle among a number of components; there are several software design principles (enunciated by Lippert and Martin) that suggest avoiding creating such cycles.
|
|
|
Cycles may have different topological shapes. Al-Mutawa et al. have identified 7 of them; the ones detected by Arcan are shown the Figure below.
|
|
|
|
|
|
![cycle-shapes](uploads/976895eda949408cfa528c1b47d8544b/cycle-shapes.png)
|
|
|
|
|
|
Usually, the circle shape is intuitively perceived as the typical CD, but it is certainly not the only possible type of CD. In fact, there is empirical evidence that tiny and multi-hub shapes (two stars attached together that are missing some edges) are more common than circle.
|
|
|
|
|
|
Besides affecting complexity, their presence also has an impact on compiling (causing the recompilation of big parts of the system), testing (forcing to execute unrelated parts of the system, increasing testing complexity), or deploying (forcing developers to re-deploy unchanged components).
|
|
|
|
|
|
# Architectural smell characteristics
|
|
|
|
|
|
# Tooling |
|
|
\ No newline at end of file |