Multifaceted Abstraction

Written by

in

Description

A good abstraction should only be responsible for one specific functionality, and when it encapsulates more than one responsibility, it signifies the the Multifaceted Abstraction Smell. The Multifaceted Abstraction Smell violates the single responsibility principle and has a low cohesion, which also violates the principle of modularization.

Context

Derived from: “Multifaceted Abstraction”
High cohesion is one of the most important design principles. Services should provide operations that are closely related to each other. Functionality that is likely to change together should be in the same service.

Cause

Often these divergent modifications are due to poor architectural structure or “cloning”.

Consequences

The Multifaceted Abstraction Smell violates the single responsibility principle, which also violates the principle of modularization. The maintainability of such a service may be reduced. It may be more difficult to analyze and grasp all provided service functionality. The business logic is not reusable, because it contains service-specific implementation. Low cohesion and possibly low availability with high response times.

Detection

We can transfer this Smell in the EA domain by examining an active structure performing or realizing more than one behavior. According to the ArchiMate specification, the Assignment Relationship links active structures to behaviors and states for responsibility, execution, and performing of a behavior. The Realization Relationship signifies that an element implements and supplies the abstract element.

Solution

Split up the behavior of the component. These components should dispatch requests to the underlying business logic.

Example

A business actor performing more than one business processes, or an application component realizing two different Services.

Cypher query

MATCH (m)-[r:AssignmentRelationship|RealizationRelationship]->(n)  <br /> WITH m, COUNT(r) AS rCount  <br /> MATCH p = (m)-[r:AssignmentRelationship|RealizationRelationship]->(n)  <br /> WHERE rCount>1  <br /> RETURN  p

Cypher count query

MATCH (m)-[r:AssignmentRelationship|RealizationRelationship]->(n) WITH m, COUNT(r) AS rCount MATCH p = (m)-[r:AssignmentRelationship|RealizationRelationship]->(n) WHERE rCount>1 RETURN count (distinct m)

Diagram

Diagram for Multifaceted Abstraction

Aliases

Divergent Change, Large Component, Low Cohesive Operations

Tags

microservices, soa, business, application, technology, The Change Preventers, between elements

Related smells

All smells