c4 model
src: C4 model, la solution pour standardiser mes schémas d'architecture ? - 2024-05-03
Abstract
C4 model is not new, but suggests a way to structure diagrams without the UML bagage. It’s split into a set of hierarchical abstractions, from bigger to smaller view:
- Context
- Containers
- Components
- Code
Most will only need to first 2 levels. There is also a tool that can be used to build “diagram as code”: structurizr.
Reviews
Why did I want to read/watch this? I’m often in situation where I need to draw some diagrams to convey some technical principle, architecture, etc… For now, I’m only relying on easy to use tools like Excalidraw. However, once we want to collaborate, and especially if we want to version the diagram, such tool have their limits.
What did I get out of it? C4 model can be used to write the diagram as code and have it reviewed by my peers directly, which is nice. There are other tools that can be used for diagramming as code, like Mermaid, PlantUML, etc…