“Big design up front is dumb, but doing no design up front is even dumber.” Dave Thomas
The C4 Model is a lightweight software architecture description method. It consists of a set of 4 diagrams that describe the static structure of a software system.
Overall, it strives for clarity and communication of the story, and follows Shneiderman's mantra:
Overview first, zoom and filter, then details-on-demand
It is not formal UML e.g. the UML actor stickman is deliberately not used as it causes confusion between a person or a system.
The 4C's are:
The CheatSheet gives a good summary of the C4 model and diagrams.
See youtube video from NDC2017 conference by Simon Brown on C4 for visualisation.
There are a number of related models and templates:
C4 is inpsired by the 4+1 model for software architecture
C4 can be combined with arc42 documentation template. The diagrams map as follows:
Arc42 | C4 |
---|---|
Context and Scope | System Context diagram |
Building Block View (level 1) | Container diagram |
Building Block View (level 2) | Component diagram |
Building Block View (level 3) | Class diagram |
Data-flow diagrams (DFD) (to desribe data activity) use a similar hierachical approach starting with the contextual DFD0. They use a multi-level numbering scheme
These books, written by @simonbrown, are available to buy from https://leanpub.com/visualising-software-architecture.
C4-PlantUML combines the benefits of PlantUML (an open source project that allows you to create UML diagrams automatically from a text description), and the C4 model for providing a simple way of describing and communicate software architectures. It also supports C4 PlantUML Snippets for Visual Studio Code