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

查看:2191
本文介绍了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的对象。


  • 不真干,如果有几个CRUD的对象。


  • I preFER这一点。

更新


  • 注意,也许不用,当它的文档中描述?

推荐答案

出的这些,我会说#3实际上是最惨的是,因为自己的CRUD不是一个用例在所有;你总是CRUD的的东西的。不要混淆的用例<<扩展和GT;方式> 与类继承

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.

由于用户(或别的东西)管理是一个很好理解的概念,一个管理用户用例实际上是pretty不言自明的,不需要详细到几个用例除非有特殊原因这样做(例如,如果你分析的要求进行系统的认证机制)。如果是这样的情况下,使用#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天全站免登陆