活动图经常被忽略 —— 比流程图更像流程图。这篇覆盖从基本语法到分叉 / 合并 / 异常处理。
活动图 vs 流程图
维度
流程图
活动图
表达
数据 / 控制流向
业务活动 / 流程 / 角色协作
角色划分
不区分
支持 partition / swimlane
并发
弱
强(fork / join...
Activity diagrams are often overlooked — they’re more powerful than flowcharts. This covers everything from basics to fork/join/exception handling.
Activity vs Flowchart
Dimension
Flo...
State diagrams are the most underused PlantUML type. They precisely describe all legal states of a domain object (order, login session, approval flow), transitions, guards, and entry actions.
Wha...
状态图是 PlantUML 里被低估的一类图:能精确描绘复杂对象(订单、登录会话、提交流程)的所有可能状态、转换条件和进入动作。
状态图能解决什么问题业务里的订单生命周期经常这样:
待付款 → 已付款 → 发货中 → 已签收 → 已完成
已付款 → 申请退款 → 已退款
待付款 → 取消
已签收 → 申请售后 → 售后处理中 → 售后完成
代码实现时这些都是 if/else...
C4 is a methodology that gives architecture diagrams a fixed storyboard; PlantUML is its best carrier. Here’s the shortest path from zero to productive.
What is C4C4, from Simon Brown, splits arc...
C4 是一种给架构图「固定分镜」的方法论,PlantUML 是它的最佳载体。这篇是从入门到上手 C4-PlantUML 的最短路径。
什么是 C4C4 由 Simon Brown 提出,把架构图分成 4 层:
层级
视角
读者
Level 1 — System Context
系统对外提供什么价值
任何利益相关方
Level 2 — Container
系统内部由哪些「可...
“Our architecture diagram is out of date” is a universal team pain. Here’s how to use CI to bind diagrams to the codebase — auto-check, auto-rerender, staleness alerts, PR thumbnails.
The anti-pa...
「我们画的架构图过期了」是每个团队的痛。这篇讲怎么用 CI 让图永远跟得上代码 —— 自动检查、自动重渲染、过期提醒、PR 自动出图。
反模式:写一张图就忘123docs/architecture/ flow.png # 2023 年画的,没人维护README.md
半年后服务下线了、新服务上线了,这张 flow.png 还是 2023 年的样子。架构图活在真空里。
正...
这篇不是讲 PlantUML 怎么用,是讲 PlantUML 的 7 种「能跑,但是烂」写法。每条都是被同事代码评审 / 自己回看旧图踩过坑后总结的。
1. 一张图塞 200 行最常见的反模式之一。一张时序图想表达 12 个服务、40+ 步骤,评审者根本看不下去。
12345678910111213141516171819202122232425262728293031@sta...
This isn’t about how to use PlantUML. It’s about seven ways that “work, but suck” — pulled from real PR reviews and rewrites of my own old diagrams.
1. One diagram, 200 linesThe most common one. ...