简介 / IntroductionBulk exports, status polling, retrying a request — in a sequence diagram these all mean the same thing: a group of messages is executed repeatedly. PlantUML and Mermaid both d...
简介 / Introduction批量导出、轮询状态、重试请求——这些场景在时序图里都对应同一件事:一段消息被重复执行若干次。PlantUML 和 Mermaid 都用 loop 关键字来画这种”循环片段”(loop fragment),骨架几乎一样,但想表达”循环几次”或”满足条件才继续”时,两边的能力差别就显出来了。本文用同一个”批量导出报表”场景对比两者的写法。
PlantU...
简介 / IntroductionWhen one request triggers several independent sub-flows at the same time, a sequence diagram should not draw them as a chain of sequential arrows — it should use a parallel fr...
简介 / Introduction当一个请求需要同时触发多个互不依赖的子流程时,时序图里不该把它们画成一条条顺序执行的箭头,而应该用并行片段(parallel fragment)表达。PlantUML 用 par 关键字,Mermaid 同样用 par,但两者表达并行分支的语法并不一样——这是初学者最容易踩的坑。本文用同一个”查询商品信息”场景对比两者的写法。
PlantUML 版...
简介 / IntroductionThe little numbers you write at the end of an association line in a class diagram — 1, 0..1, * — are the multiplicity. They answer a very practical question: standing on side ...
简介 / Introduction类图里一条 association 连线两端写着 1、0..1、* 这样的数字,就是多重度(multiplicity)。它回答一个很实际的问题:站在 A 这一端看,B 这一端最多能挂几个实例?写 Customer "1" --> "0..*" Order 的意思是「一个客户可以下零到多张订单,而一张订单...
简介 / IntroductionWhen drawing a use case diagram, the tricky part is rarely the connections — it is where the boundary sits. The boundary decides which use cases belong to the system you are b...
简介 / Introduction画用例图时,最容易出错的地方不是连线,而是边界画在哪里。边界决定了哪些用例属于当前系统、哪些属于外部系统(外部系统在本图中表现为”参与者”)。边界画得太宽,需求会外溢;画得太窄,用例又会漏到别的系统里去。
本文用一个订单系统做例子:把「浏览商品、下单」放在边界内,把「支付」「发货」交给外部系统,并用 <<include>> ...
简介 / IntroductionState diagrams and activity diagrams both come from UML behavioural modelling, yet they answer different questions. A state diagram answers “which state is this object in, and...
简介 / Introduction做业务流程设计时,状态机图(State Diagram)和活动图(Activity Diagram)经常被混用。两者都来自 UML 行为建模,但回答的是不同问题:状态机回答”这个对象现在是什么状态、怎么变成另一个状态”,活动图回答”整个流程按什么步骤走、分叉和循环在哪里”。
一个典型的混淆场景是订单系统:把”待支付→已支付→已发货→已完成”画成状态...