IPA: [ˈkʰɔplʊŋ]
die Kopplung (pl. -en) – coupling
Coupling describes the relationship between two (or more) classes or modules in a system.
Classes that have low coupling (or loose coupling, Lose Kopplung) in relation to one another have few dependencies on each other. This is desirable, as changing one class means that minimal changes need to be made to the other classes that depend on it. Usually these changes that affect other classes are major changes.
High coupling, on the other hand, makes maintaining the code a nightmare. The classes are so tightly knit that a small change in one class can bring about changes in almost every part of the system.
There are different kinds of coupling, including subclass coupling. A subclass inheriting from another class is also a type of coupling relationship. The child class is coupled to the parent, but the parent is not coupled to the child.
Coupling is usually mentioned in conjunction with cohesion, which will the word for next week. A good system has both low coupling and strong cohesion.
Etymology
Kopplung comes from the verb koppeln + suffix -ung.[1]
Koppeln comes from Middle High German kupplen.[2]
Leave a Reply