Architecture smells detection

The quality of your architecture decides vital quality parameters of your software product. Designite detects various architecture smells in your code to help you improve the agility of your software.

  • Cyclic Dependency: This smell arises when two or more architecture components depend on each other directly or indirectly.

  • Unstable Dependency: This smell arises when a component depends on other components that are less stable than itself.

  • Ambiguous Interface: This smell arises when a component offers only a single, general entry-point into the component.

  • God Component: This smell occurs when a component is excessively large either in the terms of LOC or number of classes.

  • Feature Concentration: This smell occurs when a component realizes more than one architectural concern/feature.

  • Scattered Functionality: This smell arises when multiple components are responsible for realizing the same high-level concern.

  • Dense Structure: This smell arises when components have excessive and dense dependencies without any particular structure.


Design smells detection

Design smells are certain structures in the design that indicate violation of fundamental design principles and negatively impact design quality.” (from Refactoring for Software Design Smells: Managing Technical Debt)

Designite identifies design smells and presents them in a view that classifies them based on the fundamental principle they violate. In addition, Designite also points out the cause of the smell and therefore provides a clue towards refactoring of the smell.

The following design smells are detectable by Designite:

  • Abstraction Design Smells: Imperative Abstraction, Unnecessary Abstraction, Multifaceted Abstraction, Unutilized Abstraction, Duplicate Abstraction, Feature Envy.

  • Encapsulation Design Smells: Deficient Encapsulation, Unexploited Encapsulation.

  • Modularization Design Smells: Broken Modularization, Insufficient Modularization, Hub-like Modularization, Cyclically-dependent Modularization.

  • Hierarchy Design Smells: Wide Hierarchy, Deep Hierarchy, Multipath Hierarchy, Cyclic Hierarchy, Unfactored Hierarchy, Rebellious Hierarchy, Missing Hierarchy, Broken Hierarchy.


Detect implementation smells

Designite supports variety of smells that may occur at implementation level as well. Refactoring these smells lead to better code quality. Designite supports detection of the following implementation smells:

  • Abstract Function Call From Constructor

  • Complex Conditional

  • Complex Method

  • Empty catch clause

  • Long Identifier

  • Long Method

  • Long Parameter List

  • Long Statement

  • Magic Number

  • Missing default

  • Duplicate Code

Compute object-oriented metrics

Designite computes object-oriented design metrics that are helpful to gauge the structural health of the software project. A list of supported metrics by Designite is presented below.

  • LOC (Lines Of Code - at method and class granularity)

  • CC (Cyclomatic Complexity - Method)

  • PC (Parameter Count - Method)

  • NOF (Number of Fields - Class)

  • NOPF (Number of Public Fields - Class)

  • NOM (Number of Methods - Class)

  • NOPM (Number of Public Methods - Class)

  • WMC (Weighted Methods per Class - Class)

  • NC (Number of Children - Class)

  • DIT (Depth of Inheritance Tree - Class)

  • LCOM (Lack of Cohesion in Methods - Class)

  • FANIN (Fan-in - Class)

  • FANOUT (Fan-out - Class)


Apart from showing a distribution of classes that falls in each pie, the pie chart can also be used as a navigation and filtering mechanism. For instance, if one clicks on the red pie, classes dangerously above the metric threshold will only be shown in the grid below the pie chart. One can see other associated metrics for the filtered classes and may target these classes first for refactoring. Further, one can change the thresholds (green, yellow, and orange) to customize the analysis.

Trend analysis

Trend analysis reveals the smells-trend for the analyzed software. Specifically, the trend shows how many smells have been introduced, remained, and removed from one version to another. It is helpful in many cases, including when the development team wants to observe the quality of the software after a refactoring cycle.


Distribution of smells using Treemap

Designite offers treemap visualization of your code base. Treemap shows two aspects – “size” and “smell density” of a component/class. Designite analyzes the selected code base and computes each class’s size and smell density. Each rectangle with a dark-red color outline in the treemap represents a namespace in the analyzed code base. The size of the rectangle depends on the size of the namespace relative to the analyzed code base. Such rectangles have many smaller filled rectangles (representing classes). Again, the size of a filled rectangle depends on the relative size of the class. The color filled in the rectangle shows the smell density. A class with low smell density is shown by green color; the temperature of the rectangle increases with the smell density, i.e., a class with very high smell density is shown by dark red color.


Action Hub

Designite offers “Action Hub” for easier tracking, managing, and planning identified smells in a project. When you analyze a project, Designite keeps the analysis report for later use by Action Hub. You may launch Action Hub within Designite to see all the identified smells. You may also filter the smells based on various factors such as smell types, smell status (identified, drop, wrong, or refactor), or belonging to a source code element (such as project or namespace).


Dependency Structure Matrix

The Dependency Structure Matrix (DSM) is a compact and visual representation of dependencies (with corresponding strength) among software system entities (such as Type, Namespace, or Project) in the form of a square matrix. Designite offers an interactive and simple yet effective implementation of DSM.