简体   繁体   English

具有参与者和用例之间关系的UML用例图问题

[英]UML use case diagram problem with relations between actors and use cases

i've been created the following diagram for forums system but i'm not sure if the relation between use cases and actors is correct. 我已经为论坛系统创建了以下图表,但是我不确定用例和参与者之间的关系是否正确。

so i want to know if my diagram is correct or if i've added too much complexity to my diagram. 所以我想知道我的图是正确的还是我的图增加了太多的复杂性。 did i got my use cases relation with the actors correctly? 我是否与演员正确建立了用例关系? well to better say, is it correct at all? 更好地说,这是真的吗?

在此处输入图片说明

any help is really appreciated. 任何帮助都非常感谢。

Not a bad effort for a first attempt, but I'd say it is a bit over complex. 第一次尝试并不是一件坏事,但我会说这有点复杂。 When you do analysis, using use cases or some other method, you really do want to keep it simple and avoid going into design mode, which is when you start thinking about relationships between things. 当使用用例或其他方法进行分析时,您确实想保持简单并避免进入设计模式,这是您开始考虑事物之间的关系的时候。

In my opinion, your actors should not be generalizations of one another. 我认为,您的演员不应是彼此的概括。 A "person who posts" on a forum is not aa more specific type of a "person who reads posts": they are different roles which the same person might take on at different times, not expansions on one another. 论坛上的“发帖人”不是“发帖人”的一种更具体的类型:它们是同一个人在不同时间可能扮演的不同角色,而不是彼此扩展。 So I'd advise you to drop those generalizations. 因此,我建议您放弃这些概括。

The same goes for the use cases themselves. 用例本身也是如此。 Normally, use cases relate to one another by way of either the <<extend>> or <<include>> relationship, but generalizations or not normally used. 通常,用例通过<<extend>><<include>>关系相互关联,但是一般化或不常用。 Use cases aren't like classes and don't really have the option of being abstract, so the "manage" use cases need to make sense on their own, and they don't really do that. 用例与类不同,并且实际上没有抽象的选项,因此“管理”用例需要自己理解,而实际上并没有这样做。 Your "concrete" use cases, on the other hand, make perfect sense. 另一方面,您的“具体”用例非常合理。

In order to group related use cases together, it's a better idea to use separate diagrams and / or gather the use cases into packages called "post management", "site administration", etc. There is nothing which says you have to put all your use cases into a single diagram. 为了将相关用例分组在一起,最好使用单独的图和/或将用例收集到称为“后期管理”,“站点管理”等的程序包中。没有什么说明您必须将所有用例合并为一个图表。

I support your method of use case diagrams. 我支持您的用例图方法。 I struggled with this very issue a while back. 前一段时间我在这个问题上苦苦挣扎。 To show each association from one use case to each of the actors was getting messy. 要显示从一个用例到每个参与者的每种关联正变得混乱。 By generalizing the actors, it consolidated the associations into a nice, easily readable format. 通过对参与者进行归纳,它将关联合并为一种美观且易于阅读的格式。 Thus, the information is easier for others to consume. 因此,该信息更易于他人使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM