PlantUML network, Archimate, Ditaa diagrams — three special architectural views
Beyond standard UML, PlantUML draws three special-purpose diagrams: network topologies, Archimate enterprise architecture, Ditaa ASCII-to-SVG. These three cover many scenarios that standard UML class/component diagrams can’t.
Network diagrams IT infrastructure topology: servers, routers, firewalls, switches, load balancers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 @startuml nwdiag { network DMZ { address = "10.0.0.0/24" router [address = "10.0.0.1"]; proxy [address = "10.0.0.2"]; web1 [address = "10.0.0.10"]; web2 [address = "10.0.0.11"]; api1 [address = "10.0.0.20"]; } network INTERNAL { address = "10.0.1.0/24" db1 [address = "10.0.1.10"]; cache1 [address = "10.0.1.20"]; queue1 [address = "10.0.1.30"]; } router -- proxy; proxy -- web1; proxy -- web2; web1 -- api1; web2 -- api1; api1 -- db1; api1 -- cache1; api1 -- queue1; } @enduml
Key syntax:
nwdiag { ... } starts a network diagram
network X { address = "..." } defines a subnet
node_name [address = "..."] declares a node
-- represents direct network link
Grouping nodes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 @startuml nwdiag { network dc1 { address = "10.0.0.0/16" router1 [address = "10.0.0.1"] rack01 [address = "10.0.0.10", title = "app-rack-01"] rack02 [address = "10.0.0.11", title = "app-rack-02"] } group application { color = "#FFE4B5" web01 [address = "10.0.0.100"]; web02 [address = "10.0.0.101"]; apiserver1 [address = "10.0.0.110"]; } router1 -- rack01 -- web01; router1 -- rack01 -- apiserver1; } @enduml
group clusters nodes with a shared color.
Archimate Enterprise architecture modeling. PlantUML supports the archimate keyword:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 @startuml title Business architecture archimate #Business "Customer" archimate #Business "Operations" archimate #Business "Order processing" archimate #Business "Payment processing" archimate #Application "Order system" archimate #Application "Payment gateway" archimate #Application "Risk control" archimate #Data "Order database" Customer --> Order processing Operations --> Order processing Order processing --> Payment processing Order processing -- Order system Payment processing -- Payment gateway Payment processing -- Risk control Order system -- Order database @enduml
Layers:
#Business — business processes, actors, roles
#Application — systems, services, components
#Data — databases, tables, files
#Technology — infrastructure
#Motivation — goals, principles
#Strategy — capabilities
Combined view:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 @startuml title TOGAF business capability map archimate #Business "Customer mgmt" archimate #Business "Order mgmt" archimate #Business "Payment mgmt" archimate #Business "Inventory mgmt" archimate #Application "Web frontend" archimate #Application "API gateway" archimate #Application "Order service" archimate #Application "Payment service" archimate #Application "Inventory service" archimate #Data "User DB" archimate #Data "Order DB" archimate #Data "Payment DB" archimate #Technology "AWS Cloud" archimate #Technology "PostgreSQL" archimate #Technology "Kafka" Customer mgmt -.-> Web frontend Order mgmt -.-> API gateway Payment mgmt -.-> API gateway API gateway -- Order service API gateway -- Payment service Order service -- Inventory service Order service -- Order DB Payment service -- Payment DB Order DB -. PostgreSQL Order DB -. AWS Cloud @enduml
-.-> is the “realization” relation (business realized by application).
Ditaa ASCII-to-SVG Ditaa converts ASCII drawings to SVG. PlantUML supports it:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 @startditaa +---------------+ | | | Client | | | +---------------+ | v +---------------+ | | | Server | | | +---------------+ | +----------+----------+ | | | v v v +--------+ +--------+ +--------+ | Redis | | MySQL | |KafkaMQ | +--------+ +--------+ +--------+ @endditaa
ASCII rules:
+ - | are box lines
:label: puts text on the box
Color tags cRED, cBLU, etc. fill backgrounds
{io}, {tr}, {di}, {ds} control alignment
Real: data-flow diagram 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 @startditaa +--------------+ +---------------+ | Browser | HTTPS | LoadBalancer | | Client +------->+ (ALB) | +--------------+ +-------+-------+ | +--------+--------+ | | +-------v------+ +-------v------+ | Web Server | | Web Server | | (nginx) | | (nginx) | +-------+------+ +-------+------+ | | +--------+--------+ | +--------v--------+ | App Server | | (Go service) | +---+------+------+ | | +-----------+ +-----------+ | | +-----v------+ +------v-----+ | PostgreSQL | | Redis | | (primary) | | (cache) | +------------+ +------------+ @endditaa
ASCII looks crude but the advantage is zero learning curve — every editor handles plain text, edit anywhere.
Color and alignment 1 2 3 4 5 6 +-------+ | cRED | {tr} | | | cBLU | {c} | | {tl} +-------+
Network vs Archimate vs Ditaa
Scenario
Pick
IT physical topology
network
Enterprise architecture / TOGAF / business capabilities
Archimate
Crude ASCII-style sketches
Ditaa
Microservice internals (fine-grained components)
component / deployment
Flow / state / sequence
sequence / activity / state
All three share the PlantUML output (SVG, diffable in git).
Real example: enterprise architecture landscape 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 @startuml title Full landscape ' Business archimate #Business "Customer" archimate #Business "Marketing" archimate #Business "Shopping" archimate #Business "Order" ' Application archimate #Application "Web frontend" archimate #Application "Order service" archimate #Application "Payment service" archimate #Application "Inventory service" archimate #Application "Recommendation" ' Data archimate #Data "Order DB" archimate #Data "User DB" archimate #Data "Product DB" ' Technology archimate #Technology "Kubernetes" archimate #Technology "PostgreSQL" archimate #Technology "Kafka" ' Business relations Marketing -. Shopping Shopping -. Order ' Business to Application Customer -- Web frontend Shopping -- Web frontend Web frontend -. Order service Web frontend -. Recommendation Order service -. Payment service Order service -. Inventory service ' Application to Data Order service -- Order DB Web frontend -- User DB Recommendation -- Product DB ' Application to Technology Order service -. Kubernetes Payment service -. Kubernetes Order DB -. PostgreSQL @enduml
Network example: small data center 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 @startuml nwdiag { network internet { address = "public" user [shape = "actor"] } network edge { address = "public IP block" firewall [address = "1.1.1.1"] } network dmz { address = "10.0.0.0/24" nginx [address = "10.0.0.10"] lb [address = "10.0.0.11"] } network cluster { address = "10.0.1.0/24" pod1 [address = "10.0.1.10"] pod2 [address = "10.0.1.11"] db1 [address = "10.0.1.100"] } user -- firewall; firewall -- nginx; nginx -- lb; lb -- pod1; lb -- pod2; pod1 -- db1; pod2 -- db1; } @enduml
Anti-patterns 1. Network — only one layer shown A real environment has at minimum five layers: CDN, firewall, load balancer, app, DB. One layer doesn’t convey enough.
2. Archimate — all nodes on one diagram Stacking business + application + data + technology in one image gets cluttered. Split into 2-3 diagrams, one per layer.
3. Ditaa — use it for everything Ditaa is simple but limited: boxes and lines. It can’t express actors, use cases, association arrows. Use PlantUML standard diagrams for richer logic.
Review checklist Network
Archimate
Ditaa