简体   繁体   English

如何定义有效的用例?

[英]How to define effective use case?

I'm trying to define use cases for my project. 我正在尝试为我的项目定义用例。 The problem is I'm not sure how to effectively define a use case, and it looks very messy. 问题是我不确定如何有效定义用例,而且看起来很乱。

For example like my use case below. 例如下面的用例。 I feel like 'View profile', 'View Club' 'View Workshop' is necessary to include because of 'common sense' for user to click on certain profile to view it. 我觉得“查看个人资料”,“查看俱乐部”,“查看工作室”是必须包含的内容,因为“常识”要求用户单击某些个人资料进行查看。 So do I really need to define such use cases? 那么,我真的需要定义此类用例吗?

Car Club Use Case 汽车俱乐部用例

Yes, synthesizing use cases is difficult. 是的,很难合成用例。 And often people try to depict functional parts using lots of include/extend to show the system under consideration. 人们经常尝试使用大量包含/扩展来描绘功能部件,以展示所考虑的系统。 But actually use cases are not about functionality. 但是实际上用例与功能无关。 They are about added value. 它们是关于增值。 So if you sit down a moment and think which of those bubbles really represent added value, you will find that Request repair service , Make appointment and Manage club are real candidates while most of the others are just technical paraphernalia. 因此,如果您坐下来片刻,以为那些气泡中的哪一个真正代表了增值,您会发现Request repair serviceMake appointmentManage club是真正的候选人,而其他大多数只是技术用具。 Manage <x> is a bit of a borderline. Manage <x>有点界限。 I'd eventually use CRUD here, that's 4 use cases, since they are used in different contexts and often different actors. 我最终将在这里使用CRUD,这是4个用例,因为它们用在不同的上下文中并且通常是不同的参与者。 When you synthesize use cases just ask yourself: does it add value. 当您综合用例时,只需问问自己:它会增加价值吗? Only if the answer is yes, add this as use case. 仅当答案为是时,将此添加为用例。 Else you have some technical sequence of actions or even simpler a constraint (like for Login ). 否则,您将有一些技术上的动作顺序,甚至是一个更简单的约束(例如Login )。

You need to define all the cases necessary to achieve your goal. 您需要定义实现目标所需的所有情况。 Generally speaking if there is something important in 'View Workshop' to have it on paper or to pass it to someone - you have to write it. 一般来说,如果在“ View Workshop”中有重要的东西要在纸上写或传递给别人-您必须写它。

Ihsan Ramli, while your problem is "I'm not sure how to effectively do %something%" and assuming that you can't give the task to someone else - why not to learn more about it? 伊桑·拉姆利(Ihsan Ramli),尽管您的问题是“我不确定如何有效地完成某件事”,并假设您无法将任务交给其他人-为什么不进一步了解它呢? You can start from couple of widely recommended books, for example Writing Effective Use Cases by Alistair Cockburn. 您可以从几本广受推荐的书籍开始,例如Alistair Cockburn 撰写的《撰写有效的用例》

Sentences like "because... for user to click on certain profile to view it" immediately light a red bulb since use cases represent behaviour requirements and are detached from implementation and design (but can and should refer to them when necessary). 诸如“因为...供用户单击某些配置文件以查看它”之类的句子立即亮起红色灯泡,因为用例代表了行为要求,与实现和设计无关(但可以并且在必要时可以引用它们)。

Some comments about your diagram: 关于图表的一些评论:

  1. 'Create club' (along with 'Delete club', 'Change club name') would look better as a use case one goal level lower and triggered from summary scenario 'Manage club'. “创建俱乐部”(以及“删除俱乐部”,“更改俱乐部名称”)看起来会更好,因为用例要比目标场景低一个目标级别,并且是由“管理俱乐部”的概要场景触发的。
  2. 'Manage workshop' is probably missing for its owner. 所有者可能缺少“管理车间”。
  3. Name 'Update item' tells nothing to reader. 名称“更新项目”对读者没有任何帮助。
  4. 'Join club' would probably look more reasonably triggered from 'View club'. “查看俱乐部”可能会更合理地触发“加入俱乐部”。
  5. I don't believe that appointments for workshop and repair have a lot in common to be the same scenario. 我不认为在相同的情况下预约维修和修理工作有很多共同点。

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

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