Plantuml Cheat Sheet



PlantUML online demo client.

Unified Modeling Language - Wikiwand
Business Process Model and Notation (BPMN) is very similar to activity diagram.
YANG Central

  • PlantUML Language specification Sequence Diagram. Donate 258 Patreon 127. Sequence Diagram. Basic examples The sequence - is used to draw a message between two participants. Participants do not have to be explicitly declared. To have a dotted arrow, you use - It is also possible to use.
  • EMOJI CHEAT SHEET; boolean. Default: true; Configuration options markdown-pdf.executablePath. For example, to run Plantuml Server locally #139: docker run -d -p 8080:8080 plantuml/plantuml-server:jetty plantuml/plantuml-server - Docker Hub; markdown-it-include options.
  • PlantUML is a component that allows to quickly write. This is cheat sheet of PlantUML to use frequently.
  • A UML Class Diagram showing cheat sheet. You can edit this UML Class Diagram using Creately diagramming tool and include in your. This reference covers the notation described in the OMG UML version standard, found Generally needed when entire static-model won't fit on one sheet. As in a class diagram, the arrow points from the extension to the base use case.

Allen Holub's UML Quick Reference
UML Diagram Types With Examples for Each Type of UML Diagrams
Practical UML: A Hands-On Introduction for Developers

Voxxed Athens 2017 :: Opening Ceremony + Keynote Software Architecture Diagramming - YouTube
The Art of Visualising Software Architecture - Coding the Architecture

Text based tools

I used to use the GUI tool Dia. But it was very buggy and no longer updated. I then went on to look for alternatives.

I am frustrated with the UI diagram apps:

  • layout of components takes time
  • it is difficult to modify the diagrams in UI (especially for batch operations, e.g. rename, grouping)
  • application lock-in because of the binary file format
  • binary file is not trackable by VCS
  • hard to integrate to other system

So I focused on tools that provides a DSL for drawing UML from plain text.
Candidates are (ranked according to the criteria below):

ToolLanguageDiagramsRemark
PlantUMLJavaActivity, State, Sequence, Component, Class, Object, Use Case, etclive, Language Reference
blockdiagPythonBlock, Activity, Sequence, Network, Rack, Packetlive
mermaidJavaScriptFlowchart (Activity), Sequence, Ganttlive, Schachte/Mermrender
JUMLYJavaScriptSequence, Activitylive
js-sequence-diagramsJavaScriptSequencelive
flowchart.jsJavaScriptFlowchartlive
UMLGraphJavaSequence, Class
ckwnc?Sequencelive only, C-like syntax
GraphvizCDigraphlayout/rendering layer for PlantUML and UMLGraph, with browser port viz.js, dagre, dagre-d3

I ended up choosing PlantUML because:

  • the syntax is more familiar and flexible
  • active development
  • generates beautiful diagrams
  • style-able
  • supports more diagram types
  • easy to setup
  • bindings to more projects indicates widespread usage

BTW, blockdiag would be the first runner up. It also features several unique diagram types.

PlantUML

General and common command to handle graphic layout in diagrams.
Language specification pages
Changing colors and fonts

The automatic layout of PlantUML (with GraphViz) is a curse and a blessing.
On one hand you are free of the hassle of arranging the elements, on the other hand you have little control over the position of how your elements.
Hackery like horizontalLineBetweenDifferentPackageAllowed and hidden links (-[hidden]-) are needed to tame the layout engine.

PlantUML also embed other tools besides UML:
DITAA, Salt, JCCKit, Sudoku, XEarth

Drawing UML with plantuml
PlantUML | DrawUML cheat sheet
PlantUML Pleasantness -Messages from mrhaki

Live Editor:
PlantUML Web Server
PlantUML Editor
PlantText

PlantUML Viewer - Chrome Web Store
UML Diagram Editor - Chrome Web Store
PlantUML QEditor | SourceForge.net
nrekretep/pikturr: Simple tool to turn a swagger api spec into a uml class diagram.

Graphviz | UX Design and Development course
dot - man page
Drawing graphs with dot PDF

Samples

Real World PlantUML gallery
ui-cs383/Class-Diagrams
hnakamur/asciidoctor-ditaa-graphviz-plantuml-example
jmbruel/basics: Basic UML concepts and diagrams in plantUML for easy modification/translation
BracketsUML/diagrams at master · KyleKorndoerfer/BracketsUML
Examples Gallery — PlantUML Client in Python 1.0.0 documentation

styling:
hackebrot/plantuml-snippets: Code snippets for drawing diagrams with PlantUML
mmmpa/colors_for_plantUML
templates/plantuml at master - mark.george/templates

GaaS (graph as a service)

With an HTTP client and scraping code, any DSL with web editor could be made as a service. This is especially easy if the DSL is provided as a library of course.

PlantUML's service mode, seejQuery and JavaScript async and sync integration.

GUI Tools

PlantUML's weakness (and strength, sort of) is the user cannot (and need not) specify location of the nodes. This became an issue for component diagrams where we need more control on node position and edge routing, which are crucial for component diagram for a better look and feel of the diagram.

UML Diagramming Tools | Diagramming.org
Our list of online modeling tools

yEd - Graph Editor
Astah Community - Free UML Modeling tool | Astah.net
Gaphor UML Modelling (Python)
Modelio Open Source Community
ArgoUML the UI is bad
UMLet - Free UML Tool for Fast UML Diagrams
Violet UML Editor : easy to use, completely free

yEd

After trying out several GUI tools, yEd comes to my liking.

  • decent and non-buggy UI
  • better community support
  • can save as XML (graphml) format that can be edited manually or programmatically
  • provides (limited) transform with Properties Mapper

see yed.md

Chrome Apps

Draw.io Desktop - Chrome Web Store: the diagram is saved as XML with unknown encoding
Gliffy Diagrams - Chrome Web Store: the diagram is saved as JSON
Lucidchart Diagrams - Desktop - Chrome Web Store
Sketchboard.io - Chrome Web Store

Code Generation

Comments

Please enable JavaScript to view the comments powered by Disqus.

PlantUML is a component that allows to quickly write.This is cheat sheet of PlantUML to use frequently.

Common

Notes and Comments.

keywordusageimage
titleTitle
note left :Notes Left
note right :Notes Right
' Single-line Comment
/' '/Block Comment

Code

Draw

Participant

Participant actors.

Plantuml Foreach

keywordusageimage
actorActor
boundaryBoundary
controlControl
entityEntity
databaseDatabase

Code

Cheat

Draw

Arrow

Arrow direction.

keywordusageimage
-up->Up
-down->Down
-left->Left
-right->Right

Code

Draw

Use Case

Represent the required functions.

keywordusageimage
( )Use Case
->Use
.>Extend, Include

Code

Draw

Activity

Represent the state of the process.

keywordusageimage
' 'Activity
(*) ->Initial
-> (*)Final
Sheet

Code

Draw

State

Represent the state of the objects.

keywordusageimage
[*] ->Initial
-> [*]Final

Code

Draw

Sequence

Represent the messages and orders of the interacts.

keywordusageimage
->Message
<--Return

Code

Draw

Object

Represent the logical view of the object.

Plantuml cheat sheet 2020
keywordusageimage
objectObject
<|-Extension
*-Composition
o-Agregation

Code

Draw

Class

Represent the logical view of the class.

keywordusageimage
classClass
+Public
-Private
#Protected
~Package

Code

Draw

Component

Represent the dependency of the components.

keywordusageimage
[ ]Component
packagePackage
frameFrame
folderFolder
databaseDatabase
nodeNode
cloudCloud

Code

Draw

Colors

We can add colors to Arrows, Icons, Sprites, Components, Packages, etc.PlantUML support Hexadecimal colors or colors that are already defined.

Site Reference: http://plantuml.com/skinparam

Code

Draw

Legends

Legend can contain only text, or some tables.This example contain a table with some HTML inside and OpenIconic.

OpenIconic Reference: http://plantuml.com/openiconic

Plantuml Cheat Sheet Pdf

Code

Draw

Constants

It’s possible to declare constants that will help us for example to include files or other *.puml

PS: when you use it remove ${}, thats only there for the example

Code

Sprites & Includes

Plantuml Note

There are a lot of useful sprites and images that we can use.In the next example you have all the ways to implement components using this open source library.

Plantuml Comment Syntax

Code

Plantuml Table

Draw