用例图中的 CRUD? [英] CRUD in a use-case diagram?

查看:52
本文介绍了用例图中的 CRUD?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题很简单.将 CRUD 带入用例图中的最佳方法是什么?它应该是DRY.我知道,UML 有时是随意的,但你怎么看?

My question is quite simple. What is the best way to bring CRUD into a use-case diagram? It should be DRY. I know, UML is sometimes discretionary, but what do you think about it?

一些想法:

  • 如果有几个 CRUD 对象,就不是很 DRY.

  • 如果有几个 CRUD 对象,就不是很 DRY.

  • 我更喜欢这个.

更新

  • 在文档中描述时可能不需要注意?

推荐答案

在这些中,我会说 #3 实际上是最糟糕的,因为CRUD"本身根本不是用例;你总是 CRUD something.不要将用例 <<extend>> 与类继承混淆.

Out of these, I would say #3 is actually the worst, because "CRUD" on its own is not a use case at all; you always CRUD something. Don't confuse use case <<extend>> with class inheritance.

选项#2 也不是很好,因为运行管理用户"用例并不意味着您执行所有四个 CRUD 操作.

Option #2 is not very good either, because running through a "manage user" use case does not mean you perform all four CRUD actions.

如果你真的想在你的用例中如此明确,#1 有我的钱.但如果是我,我只会在那里放一个管理用户"用例.

If you really want to be this explicit in your use cases, #1 has my money. But if it were me, I would just put a single "Manage Users" use case in there.

由于用户(或其他东西)管理是一个易于理解的概念,管理用户"用例实际上是不言自明的,除非有特定原因,否则不需要详细说明几个用例(例如,如果您正在分析其需求的系统是一种身份验证机制).如果是这种情况,请使用 #1.

Since user (or something else) management is a well-understood concept, a "Manage Users" use case is actually pretty self-explanatory and doesn't need detailing into several use cases unless there are specific reasons to do so (for instance, if the system you're analyzing the requirements for is an authentication mechanism). If that is the case, use #1.

这篇关于用例图中的 CRUD?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆