... | ... | @@ -14,7 +14,7 @@ There are four types of architectural smells supported by the toolbox. |
|
|
* **Hublike Dependency**
|
|
|
* **God Component** (Java only)
|
|
|
|
|
|
The first three types of smells are all based on the concept of dependency. By dependency we mean that an artefact `A' depends on `B' if it requires `B' to fulfill its functional requirements.
|
|
|
The first three types of smells are all based on the concept of dependency. By dependency we mean that an artefact `A` depends on `B` if it requires `B` to fulfill its functional requirements.
|
|
|
These three smells are therefore detected on the dependency network of the system.
|
|
|
God Component, on the other hand, is detected using the number of lines of code in a given package/component.
|
|
|
|
... | ... | @@ -30,13 +30,15 @@ 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.
|
|
|
|
|
|
\subsubsection{Hublike dependency (HL)}\label{sec:arch-smells-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 \cite{Fontana2016}. A hublike dependency can be detected both at the package and at the class level.
|
|
|
## Hublike Dependency
|
|
|
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.
|
|
|
|
|
|
The implications of this smell for development activities are once again concerning the probability of change and the ease of maintenance. Consider, for example, the case represented in Figure \ref{fig:hublike-dep}.
|
|
|
Making a change to any of the components that A depends upon may be very hard \cite{martin1994}, even though there is only one component depending on them.
|
|
|
![architectural-smells-hublike-dep](uploads/c36858b2b6cf936b3f22eaee75d041b3/architectural-smells-hublike-dep.png)
|
|
|
|
|
|
The implications of this smell for development activities are once again concerning the probability of change and the ease of maintenance. Consider, for example, the case represented in Figure above.
|
|
|
Making a change to any of the components that A depends upon may be very hard (according to R. Martin) because several component truly depend on it, even though there is only one component directly depending on them.
|
|
|
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.
|
|
|
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.
|
|
|
|
|
|
# Architectural smell characteristics
|
|
|
|
... | ... | |