Skip to main content

C4 Modeling

🔗 c4model.com

The C4 Model is ... are you kidding me? We said we do not repeat content that deprecates! If you need technical documentation of the C4 Model, head over here. There is also a great onboarding video that you will watch in Task C4 ExMan!

We use the C4 Model to find a scalable "mid-way" between costly UML and sketches - or worst case having no documentation at all.

It is important to note that the C4 Model is very well documented so you will not learn that in the face-to-face lecture. What we will learn is how to get from one layer to the next!

Note

We will write like 5% of Code level documentation, that is not related to documenting code itself. We will write clean, documented code and the absolutely most necessary parts we will describe with one or two Code level diagrams. The Code level diagrams tend to deprecate as they are created due to our agile, devops-ial and refactoring nature ♻️!

Tooling

The tool, sadly, has to be chosen first. Sadly, because often one regrets the choice not even one week later.

The DevOps culture embraces the YBIYRI You build it, you run it philosophy, so from a lecturer point of view I will not imply any choice of tool on you. You can generate the diagrams with anything you want. You can even draw them by hand if you see this future oriented and maintainable.

From an experience point of view I suggest you orient towards something that supports:

  • Versioning
  • Sharing
  • Collaboration

I personally as of 2021 opt for Diagrams As Code as you see them within these docs (e.g. above).

They maybe do not look so pretty but as long as they visualize using C4 notation I could not care less. Value goes over a tool or fancy notations! The same goes for your solutions.

Tools

This is in descending priority of my personal flavour. You can pick yours ⤵️

  1. PlantUML - or any of its alternatives described in the tools section
  2. draw.io - also used in subject WEG
  3. Violet UML Editor - also used in subjects ALG or OOP
  4. StarUML - also used in subject RME
  5. Gliffy - 💰 if you can get your hands on it
  6. Visio™️ - 💰 if you can get your hands on it
  7. Powerpoint™️
  8. Word™️ Diagrams

draw.io will become the preferred drawing tool for our NDS. It will be added to the recommended toolchain and used by all subjects starting summer semester 2022.

VSCode

For VS Code there is a plugin, which previews .puml files on the fly to the right!

Examples

We get to know the Model with the C4 Model task and deepen it in the C4 ExMan task.