Northeast Scala Symposium
2023

Mark Canlas

Scala engineer and combinatorics enthusiast

Diagrams Over Time and the Lessons Within

Abstract - Architecture diagrams often describe too many things at once and also go stale. What if it were possible to generate multiple variants of one diagram and easily evolve them? With the `temporal-diagrams` meta-DSL, you can! This talk will cover the library and lessons learned during its creation.

Architecture diagrams often suffer from two problems: a) they try to serve multiple audiences using one overly dense diagram b) they often go stale. Diagram-as-code languages like PlantUML and Mermaid can help with more agile editing, but still doesn't address managing a mass of diagrams. Can we use functional programming techniques to generate diagram code at scale and manage its complexity? In this talk, we present a new library `temporal-diagrams` that helps users create their own DSLs for creating multiple variants of diagrams off of a single source of truth. This library uses functional programming patterns like encoders to target multiple diagram languages and provide flexibility in a principled way.