数据流程图中的条件语句?
DFD中是否允许创建条件语句?制作 DFD 时是否需要显示验证和条件语句,或者仅显示数据流?
例如,当为基于 Web 的应用程序中的登录页面创建 DFD 时,我是否要显示用户是否有效?
Is it allowed to create a conditional statement in DFD? Is there a need to show validation and conditional statements when making a DFD or its just the flow of data?
Like for example, when creating a DFD for a login page in a web-based application, am I going to show if the user is valid or not?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
一般来说,DFD 本身不显示条件,也不显示流程执行的位置或操作的顺序。您需要查看类似于函数的 DFD,它们根据输入参数返回一些内容。
登录屏幕很可能是一个读取用户凭据并返回用户 ID 的过程,或者在用户无效的情况下不返回任何内容。如果您想在用户无效的情况下执行一些特殊操作,您可能会看到两个传出流。或者它可能返回用户无效的原因(未知用户、密码错误、帐户过期)。澄清这些事情是 DFD 建模的目的,因此答案取决于您的项目。
一般来说,我们必须抵制向 DFD 添加过多细节的诱惑。
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.
我认为你问的是所谓的交易流程。基本上,您使用一个事务来触发沿路径的数据流。罗杰. 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
I think that what you asking is called Transaction Flow. Basically, you use a transaction that triggers the data flow along a path. Roger. S. Pressman defines it with an example.
Software Engineering: A Practitioner's Approach.6th edition Chapter 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