Content deleted Content added
No edit summary |
Reverting edit(s) by 91.186.248.86 (talk) to rev. 1286487971 by JustMakeTheAccount: non-constructive (RW 16.1) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 82:
Low coupling refers to a relationship in which one module interacts with another module through a simple and stable interface and does not need to be concerned with the other module's internal implementation (see [[Information Hiding]]).
Systems such as [[CORBA]] or [[Component Object Model|COM]] allow objects to communicate with each other without having to know anything about the other object's implementation. Both of these systems even allow for objects to communicate with objects written in other languages.
== Coupling vs Connascence ==
Coupling describes the degree and nature of dependency between software components, focusing on
[[Connascence]], introduced by Meilir Page-Jones, provides a
Each coupling flavor can exhibit multiple types of connascence, a specific type, or, in rare cases, none at all, depending on how the dependency is implemented. Common types of connascence include connascence of name, type, position, and meaning. Certain coupling types naturally align with specific connascence types; for example, data coupling often involves connascence of name or type. However, not every combination of coupling and connascence is practically meaningful. Dependencies relying on parameter order in a method signature demonstrate connascence of position, which is fragile and difficult to refactor because reordering parameters breaks the interface. In contrast, connascence of name, which relies on field or parameter names, is generally more resilient to change. Connascence types themselves exhibit a natural hierarchy of strength, with connascence of name typically considered weaker than connascence of meaning. <ref name=":03" /><ref name=":12" /><ref name=":2" />
Dependencies spanning module boundaries or distributed systems typically have higher coordination costs, increasing the difficulty of refactoring and propagating changes across distant boundaries. Modern practices, such as dependency injection and interface-based programming, are often employed to reduce coupling strength and improve the maintainability of dependencies. <ref name=":03" /><ref name=":12" /><ref name=":2" />
While coupling identifies what is shared between components, connascence evaluates how those dependencies behave, how changes propagate, and how difficult they are to refactor. Strength, locality, and degree are interrelated; dependencies with high strength, wide scope, and spanning distant boundaries are significantly harder to refactor and maintain. Together, coupling provides a high-level overview of dependency relationships, while connascence offers a granular framework for analyzing dependency strength, locality, degree, and resilience to change, supporting the design of maintainable and robust systems. <ref name=":03" /><ref name=":12" /><ref name=":2" />
== Coupling versus cohesion ==
Line 131 ⟶ 130:
==See also==
* [[Connascence (computer science)]]
* [[Coupling (physics)]]
|