Member-only story
Understand Temporal Coupling in Code
We often talk about coupling, what exactly is coupling?
Generally, there are three types of component coupling.
- Afferent coupling: The task of the A component must depend on the implementation of B, C, and D.

2. Efferent coupling: After the task of the A component is completed, B, C, D must be executed.

3. Temporal coupling: After the task of the A component is completed, B and C must be executed. In addition, B is earlier than C.

The components mentioned here can be source code level, module level or even service level based on the granularity.
In this article we will dive into the temporal coupling in particular, because this is the most common and most overlooked pitfall. First we describe in Node.js as follows: