UML-数据流图心得总结

数据流图的定位:没有条件和循环
数据流图的本体不是“流程图”,而是“数据”。不是给“流程图”补上了数据信息,而应该是描述“数据”的流动和处理信息。如果更着重于表示“动作”,可以使用流程图。这一条在Wikipedia第一段就开宗明义:

A data-flow diagram (DFD) is a way of representing a flow of a data of a process or a system (usually an information system). The DFD also provides information about the outputs and inputs of each entity and the process itself.
A data-flow diagram has no control flow, there are no decision rules and no loops. Specific operations based on the data can be represented by a flowchart.[1]

Stack Overflow有一句话看起来很经典:

One must resist the temptation to add too much detail to DFDs.

如果将数据流图的每个process当做一个函数的话,那么即使函数内部有判断信息,但输入和输出一定是固定的,因此数据流图不需要条件判断。

以下是一些总结:

  1. 数据流图要素:
    三要素:实体(Entity),流程(Process)和数据(Data)
    在这里插入图片描述
    其中Note部分不是必须的。注意,所有的动作都在Process中,Note只是一些“名词”。比如上图,用户要下订单,“下订单”是Process完成的,Note上只需要写“order”,意为用户将order传给Process。

  2. 数据流图可以分层,从粗(level 0)到细(level n),不同层的输入输出一定要一致;

  3. 数据流图应该避免线段交叉,为此entity和process可以重复出现

  4. 数据流图的Process应当适当([1] 中建议7±2个)

  5. 其他

两个不错的教程,可以互为参证。
[1] 数据流图指南:https://www.visual-paradigm.com/cn/guide/data-flow-diagram/what-is-data-flow-diagram/
[2] 数据流图画法详解(不错的PPT教程):https://wenku.baidu.com/view/24fc4ec7d5bbfd0a7956733a.html
[3] UML-Tutorial:https://www.tutorialspoint.com/uml/uml_activity_diagram.htm

最后,你渴望最原始的力量吗?
UML-2.5.1官方文档

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值