Introduction
PlantUML allows the definition of diagrams using simple and human readable text description. Visualizations can then be generated in different image formats. So PlantUML diagrams are “Diagrams as Code” using the PlantUML syntax.
Benefits of PlantUML
- Syntax: text is more manageable than binaries
- Layout: Auto layout on generation
- Versioning: Track changes by a version control system (git with merge possible), keep UML source together with code or documentation (Wiki)
- Sharing, copy & paste, integrate with other systems
- Writing can be easier than drawing, for speed and ease. Almost like programming.
Maintaining (UML) documentation can be a tedious task. Separate diagramming tools are often separate from development tools. PlantUML can be an integral part of the tools we love and use
Source: PlantUML introduction (slideshare.net)
https://blog.anoff.io/2018-07-31-diagrams-with-plantuml/
Source: PlantUML introduction (slideshare.net)
https://blog.anoff.io/2018-07-31-diagrams-with-plantuml/
Getting Started
Sample
A sample for a PlantUML sequence diagram.
@startuml Hello World
Client -> Server: Request
Server --> Client: Response
Client -> Server: Another Request
Server <-- Client: Another Response
@enduml
Installation
- Install PlantUML and its dependencies with
choco install plantuml
. - Install PlantUML extension info Visual Studio Code.
Rendering Engine
There are different rendering engines available. In some cases it can be beneficial that no tool needs to be installed or sometimes it will also produce slightly different results and provide the benefit to choose the better fitting.
- GraphViz is a command line tool which needs to be installed
- jdot without an installation needed. Just add
!pragma graphviz_dot jdot
to the top of the diagram
Some additional information and a sample can be found at How to use PlantUML without Graphviz – Docs-as-Code (docs-as-co.de).
https://allthingscompute.dev/2020/04/14/plantuml-and-c4-modelling/
Further Resources
Information
- Welcome to The Hitchhiker’s Guide to PlantUML! | crashedmind.github.io
- PlantUML in a nutshell | plantuml.com
- PlantText planttext.com provides an online editor for PlantUML
Usage Documentation and Samples
- PlantUML | ogom.github.io
- Real World PlantUML | real-world-plantuml.com
Workflows
- Server-side image generation in Azure DevOps at [TODO: Link to Presentation, https://www.youtube.com/watch?v=Zt3Bj1HMJ8g]
- Client-side image generation approach at PlantUML in Azure DevOps Wiki.
Current
- PlantUML
- Introduction
- Sample
- Other Resources
- PlantUML Syntax Cheet Sheet
- Relationships
- PlantUML Syntax
- Plain vs. Extensions
- PlantUML Usage Experiences
- Getting Started
- Hello World
- Usage
- C4 PlantUML
- Azure PlantUML
- Further Resources
- Getting Started
- PlantUML Diagram Generation using Azure DevOps Pipelines
- –
- PlantUML Installation
- –
Draft
- PlantUML
- Introduction
- Getting Started
- Sample (Hello World)
- PlantUML – Cheat Sheet
- Common, UML PlantUML | DrawUML (ogom.github.io)
- PlantUML – Syntax
- Sequence Diagram
- Komponentendiagramm
- Klassendiagramm Syntax und Funktionen (plantuml.com)
- Style
- PlantUML – Best Practices
- PlantUML – Extensions (Libraries)
- C4 Plant UML
- Azure PlantUML
- PlantUML Diagram Generation
- Generating Diagrams using Azure DevOps Pipelines-
- PlantUML Installation (Setup einvironment)
- vscode extensions