简体   繁体   English

简单用例图 - UML

[英]Simple Use Case Diagram - UML

I have a web page with a graph made up of many nodes inside.我有一个 web 页面,里面有一个由许多节点组成的图表。 The user can obviously view the graph (use case: preview the graph ).用户显然可以查看图表(用例: preview the graph )。 It can also filter the nodes of the graph based on the argument and the difficulty and in that case the graph updates itself highlighting the nodes of interest (use case: filter nodes ).它还可以根据参数和难度过滤图形的节点,在这种情况下,图形会自行更新,突出显示感兴趣的节点(用例: filter nodes )。

My problem is: does it make sense to insert an «include» like the one in the figure?我的问题是:像图中那样插入一个«include»是否有意义? I think so, since when the graph is updated the user displays the preview of the graph that has been updated again.我认为是这样,因为当更新图表时,用户会显示再次更新的图表的预览。

在此处输入图像描述

EDIT: This is the graph;编辑:这是图表; on the right there is the FILTER panel to be able to filter by difficulty and topic.右侧有FILTER器面板,可以按难度和主题进行过滤。 在此处输入图像描述

UML semantics UML 语义

«include» means that a use-case is ALWAYS included in another. «include»意味着一个用例总是包含在另一个用例中。

We therefore understand from your diagram that Preview graph is an independent set of behaviors but that it can also be included in Filter node .因此,我们从您的图中了解到Preview graph是一组独立的行为,但它也可以包含在Filter node中。 In consequence filtering always implies previewing.结果过滤总是意味着预览。

It's formally correct and the meaning seems to match your narrative.它在形式上是正确的,意思似乎与你的叙述相符。 Moreover it highlights the reuse of set of behaviors.此外,它强调了行为集的重用。

Use-case logic用例逻辑

However, use-cases are in principle user goals, not features or functions that are decomposed in more an more details.然而,用例原则上是用户目标,而不是分解得更详细的特性或功能。 And your narrative seems to describe features and user-interface much more than goals.而且您的叙述似乎更多地描述了功能和用户界面,而不是目标。

Moreover, an «include» does not represent a sequence.此外, «include»不代表序列。 If Filter node includes Preview graph this does not mean that filtering leads to previewing, nor event that filtering happens before previewing.如果Filter node包含Preview graph ,这并不意味着过滤导致预览,也不意味着过滤发生在预览之前。

Take a User perspective站在用户的角度

While we could argue that previewing or filtering could be user goals, it is clear that previewing is not a subgoal of filtering.虽然我们可以争辩说预览或过滤可能是用户目标,但很明显预览不是过滤的子目标。

So what is the real goal for the user here?那么这里用户的真正目标是什么? Could it be to Navigate in the graph ?可能是Navigate in the graph吗? How it is done, is user-interface detail: do we just browse through a picture?它是如何完成的,是用户界面细节:我们只是浏览图片吗? do we offer filtering to facilitate the navigation?我们是否提供过滤功能以方便导航? do we use coloring to highlight some parts?我们是否使用着色来突出显示某些部分? do we zoom-in to see more?我们放大看更多吗? All these are (interesting) features but not independent use-cases.所有这些都是(有趣的)特性,但不是独立的用例。

Edit after your edit编辑后编辑

Your screenshot reinfocres what I said before: filtering is just a mean to navigate more easily in the preview.您的屏幕截图强化了我之前所说的内容:过滤只是在预览中更轻松地导航的一种方式。 I'd recommend not to consider it as a use-case.我建议不要将其视为用例。

If despite my advice you want to show the filtering on your diagram, then you should use <> to show that the filtering behavior may enrich the navigation behavior:如果尽管我的建议你想在你的图表上显示过滤,那么你应该使用 <> 来显示过滤行为可以丰富导航行为:

                                               <<extend>>
actor --------- Previsualize/Navigate graph <-------------- Filter interests   

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

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