liveBook · Manning

Diagrams as code

As explained in Collaborative Software Design: How to facilitate domain modeling decisions

A technique for generating visual diagrams from textual descriptions written in a diagramming language.

Diagrams as code generates visual diagrams from textual descriptions written in a diagramming language. Teams can store those descriptions in a repository, where people critique, modify, and comment on them asynchronously. section 11.2.1

Use the technique to make diagrams easier to:

  • Communicate architecture at different abstraction levels, such as with a C4 diagram. section 11.2.1
  • Connect diagrams to ticketing systems so diagram work can be discussed before formal planning. section 11.2.1
  • Keep representations open to feedback while recognizing that diagrams can still invite misinterpretation. section 11.2.1

A repository-based architecture discussion

Describe a proposed architecture in Mermaid JS, PlantUML, or Structurizr, commit the textual diagram to a repository, and invite teammates to comment on the representation and its assumptions. section 11.2.1

Figure 11.6 C4 Container diagram explaining how the architecture might look in the new design

Use the C4 container diagram to inspect how a proposed architecture communicates its new design. section 11.2.1

How Collaborative Software Design: How to facilitate domain modeling decisions covers it

How deep it goes
Explains textual generation, repository collaboration, and tool distinctions without detailing diagram-language internals.
Examples
Uses Mermaid JS, PlantUML, Structurizr, repository comments, and a C4 container diagram.
What you can do after
Apply it via Mermaid JS, PlantUML, or Structurizr to generate and review architecture diagrams collaboratively.
How it connects
Connects C4 models, architecture decisions, repositories, ticketing systems, and asynchronous feedback.

This explainer was generated by Manning's knowledge graph from the text of Collaborative Software Design: How to facilitate domain modeling decisions. The section links point to the parts of the book it draws on.