MDG Technology for C4
Introduction
Many architecture definition languages have been developed that can be used to formally define the architecture of a system. However, for some, getting started with modeling and sticking strictly to a modeling language is more challenging than expected when they have little or no experience with modeling.
The reasons for this are diverse and range from the typical time and budget issues in practice to the lack of benefit of a formal description of a system that does not necessarily reflect or is linked to the source code.
Well-known notations such as UML, SysML or ArchiMate pose a similar challenge. They are powerful and fulfil all relevant aspects of software, systems or IT infrastructure, but teams often do not know these notations well enough and therefore consider them too complicated or incompatible with agile approaches… and they may not have the necessary tools.
The C4 Model
The C4 model is a lightweight approach developed by Simon Brown to help software development teams describe and communicate software architecture, both during upfront design sessions and when documenting an existing code base after the fact. It’s a way to create maps of your code at different levels of detail, just as you would use something like Google Maps to zoom in or out of an area you’re interested in.
To create these maps of your code, we first need a common set of abstractions to create a language that we can use to describe the static structure of a software system.
C4 Diagrams
The C4 model considers the static structures of a software system in the form of containers, components and classes (or code). This abstraction hierarchy is visualised by creating a collection of core diagrams, namely Context, Container, Component and optionally Class. This is where the C4 model gets its name from. In addition, you can supplement the C4 core diagrams with other diagrams to visualise other aspects as well.
LieberLieber’s approach combines the advantages of modelling in Enterprise Architect with the simply elegant concept of the C4 model. The power of a model comes into play when you need to rename the software system. You only have to rename it in the model and all occurrences of the software system in all diagrams are also renamed.
Main characteristics of the MDG Technology for C4
Predefined model structure
Simple notation
C4 diagrams with corresponding toolboxes
Different approaches for traceability dependencies
LieberLieber MDG Technology for C4 is based on C4 and offers a predefined model structure with core and supplementary C4 diagrams and relevant elements. This allows you to create diagrams at different levels of abstraction to visualise the static structure and behaviour of your system.
C4 and other models
Good news for anyone who wants to combine their C4 model with modelling standards such as UML. By activating a specific MDG technology in Enterprise Architect, it is possible to link different model types together, creating a comprehensive traceability that allows you to track the relationships and dependencies between C4 models and other modelling languages.
Specific diagram types
When adding diagrams to your models in the project via the ‘New diagram’ button in the toolbar or the ‘Add -> Add diagram …’ context menu item, you will be taken to the ‘New diagram’ dialogue box, which now contains a new type ‘C4’.
C4 Structural diagrams
A context diagram helps you to answer the following questions. What is the software system we are building (or have built)? Who will use it? How does it fit into the existing environment?
A container diagram shows the structure of the software architecture and the distribution of responsibilities. It also shows the most important technologies, how they are used and how the containers communicate with each other.
A component diagram shows the components that are located in each of the containers defined in the container diagram.
A class diagram shows the internals of a single component defined in the component diagram.
C4 Context
C4 Container
C4 Component
C4 Class
C4 model is compatible with arc42
The C4 model is compatible with the arc42 documentation template as follows:
– Context and scope => System context diagram
– Modular view (level 1) => Container diagram
– Building block view (level 2) => Component diagram
– Building block view (level 3) => Class diagram