Spaghetti Code

Modularization


description

What is coupling?

Coupling serves to determine the independence of modules from each other. Dependence prevents simple configuration and portability of new modules without impacting other systems.

Types of couplings listed from strongest to weakest:

  • Data: Modules communicate through data parameters and use all the data.
  • Stamp: Modules communicate by passing data parameters and use some of the data.
  • Control: Modules connected if one explicitly controls the logic of another module (ex: flags).
  • Common: Modules have access to the same shared global data.
  • Content: Modules connected if one has direct reference to the content of another.