4

是否允许在 DFD 中创建条件语句?制作 DFD 或仅显示数据流时是否需要显示验证和条件语句?

例如,在基于 Web 的应用程序中为登录页面创建 DFD 时,我是否要显示用户是否有效?

4

2 回答 2

1

我认为你问的是所谓的交易流。基本上,您使用一个事务来触发沿路径的数据流。罗杰。S. Pressman 用一个例子来定义它。

软件工程:从业者的方法。第 6 版第 10.6.2 章。

https://books.google.es/books?id=bL7QZHtWvaUC&lpg=PR13&ots=O6v89MxK8l&dq=pressman%2010.6.2&hl=es&pg=PA276#v=onepage&q=pressman%2010.6.2&f=false

于 2015-01-17T15:17:07.877 回答
1

In general DFDs do not show conditionals as such, neither do they show the location where a process is executed or the sequence of operations. You need to see DFDs like functions, which return something based on their input parameters.

A login screen would then most likely be a process which reads user credentials and returns a user-id or nothing in case the user is invalid. You may see two outgoing flows in cases you want to do something special in case the user is invalid. Or it may return a reason why a user is invalid (unknown user, wrong password, account expired). Clarifying these things is the purpose of DFD modelling, so the answers depend on your project.

In general one must resist the temptation to add too much detail to DFDs.

于 2013-04-29T15:42:00.760 回答