liveBook · Manning

Coupling

As explained in Building User-Friendly DSLs

A dependency relationship in which changes to one software component can require corresponding changes to another component.

Coupling is the dependency between software components: changing one component can require corresponding changes in others. It resists change by forcing coupled components to evolve in sync, increasing effort and complexity, while remaining unavoidable in a DSL-based approach. section 10.2

Analyze coupling by separating component code and charting how changes propagate:

  • Classify code as DSL-specific, DSL-generic, or DSL-aspecific. DSL-specific code implements a particular DSL’s key aspects; DSL-generic code supports multiple DSLs; DSL-aspecific code is remaining boilerplate. section 10.4
  • Draw arrows from the component causing a change to the affected component. Arrow direction shows cause and effect; thickness represents coupling strength. section 10.2
  • Relate components to the DSL’s key aspects, especially its structure. Most DSL-specific code depends on the DSL structure. section 10.2 section 10.4
  • Test structural changes such as adding, removing, renaming, or changing properties and concepts, including coordinated changes made in lockstep. section 10.4
  • Manage incompatible DSL content with version identifiers and migration actions when the Domain IDE loads content. section 10.4
Figure 10.9 A chart of coupling between the DSL’s key aspects and the DSL-specific parts of components
figure

Use the coupling chart to trace dependencies between the DSL’s key aspects and DSL-specific component code. section 10.2

How Building User-Friendly DSLs covers it

How deep it goes
Explains dependency categories, directional strength, structural change types, version checks, and migration, but does not provide implementation code.
Examples
Uses DSL component diagrams, coupling arrows, generic AST structures, Domain IDE parts, and categorized DSL structural changes.
What it assumes
Assumes familiarity with software components and DSLs while defining coupling, code categories, change propagation, and structural change types.
What you can do after
Evaluate change impact by classifying code, charting dependencies, checking versions, and selecting migration actions.
How it connects
Connects coupling with domain-specific languages, abstract syntax trees, versioning, migration, projectional editing, and collaborative editing.

Also explained in

Compare how 17 books explain coupling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building User-Friendly DSLs. The section links point to the parts of the book it draws on.