C4 model introduce
how to use
install java
install graphviz
brew install graphvizinstall vscode plugin PlantUML
https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml
create diagram
https://github.com/plantuml-stdlib/C4-PlantUML
@startuml C4_Elements
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")
Rel(personAlias, containerAlias, "Label", "Optional Technology")
@enduml
μ΄λ° κ·Έλ¦Όμ΄ λμ¨λ€.
code snippet
https://github.com/plantuml-stdlib/C4-PlantUML/blob/master/.vscode/C4.code-snippets
μ΄κ±Έ λ€μ΄λ°μμ vscodeμ μ°κ²°ν΄μ€λ€.
λλ νμ¬ νλ‘μ νΈμλ§ μ¬μ©νλ €κ³ .vscode/C4.code-snippetsμ λ£μ΄μ£Όμλ€.

κ°λ
4κ°μ§ κ΄μ μ κ·Έλ¦Όμ΄ μλ€.
System Context
Container
Component
Code

Level
μλ‘ λ€λ₯Έ κ΄μ¬μ κ°μ§ λ€μ΄μ΄κ·Έλ¨ λ° λ¬Έμμ λν λ€μν μ²μ€μ΄ μμ΅λλ€.
μννΈμ¨μ΄ μν€ν μ² λ€μ΄μ΄κ·Έλ¨μ 그릴 λ μννΈμ¨μ΄ κ°λ°μμ²λΌ μκ°νμμμ€.
곡ν΅λ μΆμν μ§ν©μ΄ κ³΅ν΅ νκΈ°λ²λ³΄λ€ λ μ€μν©λλ€.
μννΈμ¨μ΄ μμ€ν μ νλ μ΄μμ μ½λ μμμ μν΄ μ°¨λ‘λ‘ κ΅¬νλλ νλ μ΄μμ κ΅¬μ± μμλ₯Ό κ°κ° ν¬ν¨νλ νλ μ΄μμ 컨ν μ΄λλ‘ κ΅¬μ±λ©λλ€.
Level 1: System Context Diagram
A System Context diagram provides a starting point, showing how the software system in scope fits into the world around it.
System Context diagramμ λ²μμ μννΈμ¨μ΄ μμ€ν μ΄ μ£Όλ³ μΈκ³μ μ΄λ»κ² λ§λμ§ λ³΄μ¬μ£Όλ μμμ μ μ 곡ν©λλ€.

Level 2: Container Diagram
A Container diagram zooms into the software system in scope, showing the high-level technical building blocks.
Container diagramμ λ²μ λ΄μμ μννΈμ¨μ΄ μμ€ν μ νλνμ¬ λμ μμ€μ κΈ°μ κ΅¬μ± μμλ₯Ό 보μ¬μ€λλ€.

Level 3: Component Diagram
A Component diagram zooms into an individual container, showing the components inside it.
Component diagramμ κ°λ³ 컨ν μ΄λλ₯Ό νλνμ¬ κ·Έ μμ κ΅¬μ± μμλ₯Ό νμν©λλ€.

Level 4: Code Diagram
A code (e.g. UML class) diagram can be used to zoom into an individual component, showing how that component is implemented.
code diagramμ μ¬μ©νμ¬ κ°λ³ κ΅¬μ± μμλ₯Ό νλνμ¬ ν΄λΉ κ΅¬μ± μμκ° κ΅¬νλλ λ°©λ²μ νμν μ μμ΅λλ€.
그리기λ₯Ό μΆμ²νμ§ μμΌλ©° μλμΌλ‘ μ½λμμ μμ±νλκ±Έ μΆμ²ν©λλ€.

misc
titles
short and meaningful, include the diagram type, numbered if diaram order is important; for example:
μ§§κ³ μλ―Έ μλ λ€μ΄μ΄κ·Έλ¨ μ νμ ν¬ν¨ μλ₯Ό λ€μ΄:
λ€μ΄μ΄κ·Έλ¨ μμκ° μ€μν κ²½μ° λ²νΈκ° 맀겨μ§λλ€.
layout
sticky notes and indexs card( e.g crc cards) make a great substitute for hand-drawn boxes, especially if you dont have a whiteboard
μ€ν°μ»€ λ©λͺ¨ λ° μμΈ μΉ΄λ(μ: crc μΉ΄λ)κ° μμΌλ‘ κ·Έλ¦° μμλ₯Ό λμ ν μ μμ΅λλ€.
visual consistency
try to be consistent with notation and element positioning across diagrams
λ€μ΄μ΄κ·Έλ¨ μ 체μμ νκΈ°λ² λ° μμ μμΉμ μΌκ΄μ±μ μ μ§νμμμ€.
acronyms(μ€μλ§)
λ§€μ° μ£Όμνμ.
be ware of using acronyms, especially those related to the business/domain that you work in
νΉν λΉμ μ΄ μΌνλ λΉμ¦λμ€/λλ©μΈκ³Ό κ΄λ ¨λ μ€μλ§μ μ¬μ©νμμμ. μλ‘ μ‘°μΈνλ μ¬λμ λ°λ‘ μ΄ν΄ν μ μμ΅λλ€.
element
start with simple boxes containing the element name, type, technology (if appropriate) and a description/responsibilities
μμ μ΄λ¦, μ ν, κΈ°μ (ν΄λΉλλ κ²½μ°) λ° μ€λͺ /μ± μμ΄ ν¬ν¨λ κ°λ¨ν μμλ‘ μμν©λλ€.
λ°μ€λ€ νμ

μΌμͺ½μ²λΌνμ§λ§κ³ μ€λ₯Έμͺ½μ²λΌ μμΈν λ΄μ©μ λ€μ΄μ΄κ·Έλ¨μ μ°μ.
lines
favour uni-directional lines showing the most important dependencies or data flow with an annotation to be explicit about the purpose of the lines and direction
κ°μ₯ μ€μν μ’ μμ± λλ λ°μ΄ν° νλ¦μ 보μ¬μ£Όλ λ¨λ°©ν₯ λΌμΈμ μ νΈνλ©° λΌμΈκ³Ό λ°©ν₯μ λͺ©μ μ λͺ μνλ μ£Όμμ μ¬μ©ν©λλ€.
summarise the intent of the relationship
κ΄κ³μ μλ μμ½

summarise, yet be specific
μμ½νλ ꡬ체μ μΌλ‘

show both directions when the intents are differnt
μλκ° λ€λ₯Έ κ²½μ° μλ°©ν₯ νμ

beware of hiding the true story

μ΄λ°κ·Έλ¦Όμ΄λ©΄ λ§λ λ΄μ©μ΄κΈ°λ νλ μ€μν λ΄μ©μ μ¨κΈΈμ μμ΅λλ€.

μ΄λ κ² κ·Έλ¦¬λ©΄ μ’λ λͺ νν΄μ§λλ€.
add more word to make the intent explicit
μμ½μ λ λ§μ λ¨μ΄λ‘ νννμμμ€.
key and legend
explain shapes, line styles, colours, borders, acronyms , etc even if you notations seems obvious
νκΈ°λ²μ΄ λΆλͺ ν΄ λ³΄μ΄λλΌλ λͺ¨μ, μ μ€νμΌ, μμ, ν λ리, μ½μ΄ λ±μ μ€λͺ νμμμ€.
λκΈ° μ€μ λΉλκΈ°λ μ μ λ±μΌλ‘ ν μ μμ΅λλ€. 컬λ¬λ μλ§Ήμ κ³ λ €νκΈ° λ°λλλ€.
use shape,colour and size to complement a diagram the already make sense
μ΄λ―Έ μλ―Έκ° μλ λ€μ΄μ΄κ·Έλ¨μ 보μνκΈ° μν΄ λͺ¨μ, μμ λ° ν¬κΈ°λ₯Ό μ¬μ©ν©λλ€.
icon
use icons to supplement text, not replace it
μμ΄μ½μ μ¬μ©νμ¬ ν μ€νΈλ₯Ό λ체νμ§ μκ³ λ³΄μΆ©νμμμ€.
increase the readability of software architecture diagrams, so they can stand alone
μννΈμ¨μ΄ μν€ν μ² λ€μ΄μ΄κ·Έλ¨μ κ°λ μ±μ λμ¬ λ 립μ μΌλ‘ μ¬μ©ν μ μμ΅λλ€.
μμ΄μ½μ μΆκ°νμ¬ μ΄ν΄λ₯Ό λμΈμ μμ΅λλ€.

any narrative should complement the diagram rather than explain it
μ΄λ€ 보좩 λ¬Έμλ λ€μ΄μ΄κ·Έλ¨μ μ€λͺ νκΈ°λ³΄λ€ λ³΄μν΄μΌ ν©λλ€.
notation check list
https://modeling.com/review/ μ¬κΈ°μ ν΄λ³Όμ μλ€. μλμμ μ€λͺ
abstractions first, notation second
첫 λ²μ§Έλ μΆμν
λ λ²μ§Έκ° νκΈ°λ²

ensure that your team has a ubiqutous language to describe software architecture
νμ΄ μννΈμ¨μ΄ μν€ν μ²λ₯Ό μ€λͺ νλ μ λΉμΏΌν°μ€ μΈμ΄λ₯Ό κ°μ§κ³ μλμ§ νμΈνμμμ€.
μ λΉμΏΌν°μ€ μ»΄ν¨ν μ΄λ '(μ μ)μ΄λμλ λ리 μ‘΄μ¬νλ€'λ λΌν΄μ΄ ubiquitariusμ μμ΄μ λ³ν 'Ubiquitous'μ μ»΄ν¨ν μ΄ κ²°ν©λ λ¨μ΄λ‘ 'μΈμ μ΄λμλ μ΄λ€ κΈ°κΈ°λ₯Ό ν΅ν΄μλ μ»΄ν¨ν ν μ μλ κ²'μ μλ―Ένλ€.
review
General
λνμ μ λͺ©μ΄ μμ΅λκΉ?
λ€μ΄μ΄κ·Έλ¨ μ νμ΄ λ¬΄μμΈμ§ μ΄ν΄ν©λκΉ?
λ€μ΄μ΄κ·Έλ¨ λ²μκ° λ¬΄μμΈμ§ μ΄ν΄ν©λκΉ?
λ€μ΄μ΄κ·Έλ¨μ ν€/λ²λ‘κ° μμ΅λκΉ?
Elements
λͺ¨λ μμμ μ΄λ¦μ΄ μμ΅λκΉ?
λͺ¨λ μμμ μ νμ μ΄ν΄ν©λκΉ? (μ: μΆμν μμ€, μ: μννΈμ¨μ΄ μμ€ν , 컨ν μ΄λ λ±)
λͺ¨λ μμκ° λ¬΄μμ νλμ§ μ΄ν΄ν©λκΉ?
ν΄λΉλλ κ²½μ° λͺ¨λ μμμ κ΄λ ¨λ κΈ°μ μ ν μ¬νμ μ΄ν΄νκ³ μμ΅λκΉ?
μ¬μ©λ λͺ¨λ μ½μ΄μ μ½μ΄μ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ?
μ¬μ©λ λͺ¨λ μμμ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ?
μ¬μ©λ λͺ¨λ λͺ¨μμ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ?
μ¬μ©λ λͺ¨λ μμ΄μ½μ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ?
μ¬μ©λ λͺ¨λ ν λ리 μ€νμΌμ μλ―Έλ₯Ό μ΄ν΄νκ³ μμ΅λκΉ? (μ: μ€μ , μ μ λ±)
μ¬μ©λ λͺ¨λ μμ ν¬κΈ°μ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ? (μ: μμ μμμ ν° μμ)
κ΄κ³
λͺ¨λ νμ ν΄λΉ κ΄κ³μ μλλ₯Ό μ€λͺ νλ λ μ΄λΈμ΄ μμ΅λκΉ?
ν΄λΉλλ κ²½μ° λͺ¨λ κ΄κ³μ κ΄λ ¨λ κΈ°μ μ νμ μ΄ν΄νκ³ μμ΅λκΉ? (μ: νλ‘μΈμ€ κ° ν΅μ μ μν νλ‘ν μ½)
μ¬μ©λ λͺ¨λ μ½μ΄μ μ½μ΄μ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ?
μ¬μ©λ λͺ¨λ μμμ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ?
μ¬μ©λ λͺ¨λ νμ΄μ΄μ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ?
μ¬μ©λ λͺ¨λ μ μ€νμΌμ μλ―Έλ₯Ό μ΄ν΄ν©λκΉ? (μ: μ€μ , μ μ λ±)
Last updated
