

To create these maps of your code, you first need a common set of abstractions to create a ubiquitous language to use to describe the static structure of a software system.

Think of it as Google Maps for your code. C4 stands for context, containers, components, and code - a set of hierarchical diagrams that you can use to describe your software architecture at different zoom levels, each useful for different audiences. After years of building software myself and working with teams around the world, I've created something I call the "C4 model". In our industry, we really should be striving to create better software architecture diagrams. Ionut Balosin last year wrote " The Art of Crafting Architectural Diagrams", which describes a number of common problems with doing this, related to incomprehensible notations and unclear semantics.Īmbiguous software architecture diagrams lead to misunderstanding, which can slow a good team down. These same teams now tend to rely on ad hoc diagrams that they draw on a whiteboard or put together using general-purpose diagramming tools such as Microsoft Visio.

An unfortunate and unintended side effect of the Manifesto for Agile Software Development is that many teams have stopped or scaled back their diagramming and documentation efforts, including the use of UML. However, it's very likely that the majority of the software architecture diagrams you've seen are a confused mess of boxes and lines. Software architecture diagrams are a fantastic way to communicate how you are planning to build a software system (up-front design) or how an existing software system works (retrospective documentation, knowledge sharing, and learning).
