Architecture and design
도입됨
어휘
| English | 의미 |
|---|---|
| layers/ˈleɪəz/ | layers |
| dependency rule | dependency rule |
| coupling | coupling |
| cohesion/kəʊˈhiːʒn/ | cohesion |
English
Layers pointing inward
- BookShare in three layers: presentation (web app), domain (loans, members, catalog), storage (database). The dependency rule: dependencies point inward — the domain knows no framework, and that is what makes it testable.

{exercise:uni-cs1202-layers}
연습
The dependency rule points —
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Domain purity is what makes it testable without browser or database.
English
Coupling and cohesion, counted
- Cohesion keeps related change in one module; coupling spreads it. The loan-limit rule change: 1 module, 2 files (high cohesion, low coupling). The same rule smeared across presentation: 3 layers, 5 files. The count IS the design metric.
- The borrow sequence: presentation calls
domain.borrow(member, copy); the domain checks limit and status; storage records with dates; presentation confirms — four participants, five labelled messages.
{exercise:uni-cs1202-counting}
연습
The loan-rule change touches 1 module, 2 files. The smeared version touches —
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
3 layers, 5 files: the count IS the coupling metric.
English
The boundary payoff
- Reminder delivery is a strategy behind a
Notifierinterface: email today, push tomorrow — swapping costs one configuration line, zero domain edits. - The domain importing the web framework inverts the rule and becomes untestable; diagrams as decoration (unlabelled arrows) review nothing.
{exercise:uni-cs1202-boundary}
연습
Swapping the Notifier strategy costs —
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Behind an interface: the boundary buys the swap.