Dead Component

Written by

in

Description

A component is no longer used (usually because it is now obsolete). Or you have generic or abstract elements that are not actually needed today. Such components often exists to support future behavior, which may or may not be necessary in the future.

Context

Derived from: “Dead Code”
Dead Code is software or lines of code that are no longer used or have become redundant but, for safety’s sake, remain in the code base.

Cause

When requirements have changed or corrections have been made, nobody had time to clean up the old structure. Sometimes components are created “just in case” to support anticipated future features that never get implemented.

Consequences

Unused elements increase the complexity which harms the readability and maintainability.

Detection

In ArchiMate, a dead component is a component that is not integrated into the model. We can detect the Dead Component EA Smell via KG query when a component has neither incoming nor outgoing edges. Search for isolated elements: The element respectively its cluster has no incoming or outgoing relations to other components (structural relations can be neglected).

Solution

Delete unused elements. Redistribute the functionality and aggregate components.

Example

A policy or programmatic relationship may require the purchase and usage of a particular piece of hardware or software. The consequences for managers and developers are that significant effort may have to be devoted to making the product work. After a significant investment of time and resources, the staff realizes that the product is useless in the current context, and abandons it for another approach. Eventually, the Boat Anchor is set aside and gathers dust in some corner (if it’s hardware).

Cypher query

MATCH p = (n) <br /> WHERE NOT ()--(n) <br /> RETURN p

Cypher count query

MATCH (n) WHERE NOT ()--(n) RETURN count (distinct n)

Diagram

Diagram for Dead Component

Aliases

dead Code, Boat Anchor

Tags

business, application, technology, The Dispensables, within elements, automatic detection

Related smells

All smells