Before splitting code into separate components, the first step is to analyze the existing code structure. Are there any high-level domain concepts that stand on their own? For example, a banking application may involve account management, deposit/withdrawal, balance transfer, customer notification, and so on. Each of these domain concepts can potentially be split into separate components.
We must also understand how components interact with each other. Here, we will talk about two concepts that originated from object-oriented programming:
- Afferent coupling – number of external entities that depend on the current entity
- Efferent coupling – number of external entities that the current entity depends ...