"매 module 내부 의 element 의 strong relatedness (cohesion) + module 간 의 minimal dependency (coupling) 의 maximize". 매 Larry Constantine 의 1968 structured design 의 origin, 매 modern 의 SOLID, DDD bounded context, microservices 의 universal foundation — 매 changeability 의 single 의 most important predictor.
매 핵심
매 Cohesion 7 levels (Constantine, low → high)
Coincidental (random grouping).
Logical (similar category, e.g., "Utils").
Temporal (executed at same time).
Procedural (sequence of steps).
Communicational (act on same data).
Sequential (output of one → input of next).
Functional (single, well-defined task) — 매 target.
매 Coupling 6 levels (low → high)
Data (parameters of primitives) — 매 ideal.
Stamp (parameters of composite).
Control (flag-driven branching).
External (shared protocol).
Common (shared global).
Content (one module 의 internals 의 mutate) — 매 worst.
매 응용
Module boundary 의 design.
Microservice 의 split criteria (DDD bounded context).
classOrderService{constructor(privateinventory: InventoryService){}reserve(id: string){// 🚨 Reaches into private state
this.inventory['stock'].set(id,0);}}
언제: module 의 cohesion/coupling 의 review, refactor 의 direction 의 suggest, dep graph 의 hot-spot 의 highlight.
언제 X: 매 architectural boundary 의 final decision (domain expert + business context 필요).
❌ 안티패턴
God Module: low cohesion + high fan-in (모두 의 import).
Anemic Module: data 만, behavior 의 다른 module 의 own → procedural disguised as OOP.
Tight ORM coupling: domain entity 의 ORM annotation 의 saturation → infra 의 leak.
Premature abstraction: 매 single use-case 의 interface 의 introduce → 매 indirection 의 cost.
Shared library 의 god lib: 매 service 의 shared "common" 의 god — 매 deploy lockstep.
🧪 검증 / 중복
Verified (Constantine "Structured Design" 1979, Martin "Clean Architecture", Evans "DDD").
신뢰도 A.
🕓 Changelog
날짜
변경
2026-05-08
Phase 1
2026-05-10
Manual cleanup — cohesion/coupling principles 의 full content