liveBook · Manning

Intrusive coupling

As explained in Architecture Modernization: Socio-technical alignment of software, strategy, and structure

Intrusive coupling is a strong dependency in which one software component knows potentially everything about another component, including its private implementation or persisted state.

Intrusive coupling is the strongest form of dependency between software components. One component knows potentially everything about another: its public interface, private methods, shared code, or persisted state. Because changes can break hidden assumptions, stronger coupling increases the likelihood and risk of cascading changes. A component may be a function, class, module, microservice, or entire system, depending on the level of analysis. section 12.1

Typical manifestations include:

  • Accessing another component’s private methods through reflection. section 12.1
  • Reading or modifying another component’s persisted state directly, including reliance on its storage format. section 12.1
  • Sharing code through a large god class that combines tightly coupled logic from different subdomains. section 12.1
  • Changing a subsystem’s persistence format without realizing that other subsystems depend on it. section 12.1

A hidden persistence dependency

A subsystem changes the format in which its state is persisted. Other subsystems that directly depend on that format can break even though no visible API connection changed. The hidden knowledge between components makes the change risky. section 12.1

Figure 12.3 Intrusive coupling increases the risk of change.

Use the figure to inspect how intrusive coupling increases the risk of change. section 12.1

Reveal intrusive coupling by modeling flows and processes, then challenging message types, names, boundaries, and decision ownership. Domain Message Flow Modeling can map interactions between subdomains and subsystems; EventStorming can provide reference scenarios. Prefer contract coupling where possible, while checking that smaller subsystems do not create excessive global complexity. section 12.6

How Architecture Modernization: Socio-technical alignment of software, strategy, and structure covers it

How deep it goes
Defines the metaphor, identifies concrete forms, and explains cascading risk; stops short of implementation-specific refactoring.
Examples
Uses reflection into private methods, direct persisted-state access, shared code, god classes, and unencapsulated persistence.
What it assumes
Assumes the ability to identify software components while defining components broadly from functions to entire systems.
What you can do after
Diagnose hidden dependencies with flow models and evaluate safer contract coupling.
How it connects
Connects intrusive coupling to model coupling, functional coupling, contract coupling, persisted state, and flow modeling.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecture Modernization: Socio-technical alignment of software, strategy, and structure. The section links point to the parts of the book it draws on.