Object diagram (PlantUML)

An object diagram is a class diagram made concrete. It is unusually good at explaining a structure people have not understood in the abstract.


#What this example shows

  • Objects named instance : Type.

  • Attribute values rather than attribute types.

  • Links between objects, which are instances of associations.


#A worked example

Open it, edit it, or copy the source below.

Object diagram (PlantUML)

The source, which you can paste into a new diagram and edit:

@startuml
object "order42 : Order" as O {
  id = 4c1e-88fa-2b13
  status = AWAITING_PAYMENT
  total = 148.50
  placedAt = 2026-09-01T14:22Z
}

object "line1 : OrderItem" as I1 {
  sku = KB-104
  quantity = 1
  unitPrice = 129.00
}

object "line2 : OrderItem" as I2 {
  sku = CB-USB-2M
  quantity = 2
  unitPrice = 9.75
}

object "alice : Customer" as C {
  email = alice@example.com
  tier = STANDARD
}

object "attempt1 : CardPayment" as P {
  last4 = 4242
  status = DECLINED
}

C -- O : places
O *-- I1
O *-- I2
O -- P : attempted
@enduml

#Making it your own

  • Use plausible values. Foo and bar defeat the purpose entirely.

  • It is a snapshot; say which moment it represents if that matters.

  • Pair it with the class diagram rather than replacing it.



Verbose, stable, and it draws almost everything.