0

I start to learn Use case diagram and i am very confused.I don't know which picture is better .Please help me , thanks.

enter image description here

enter image description here

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
BlackZero
  • 23
  • 3

2 Answers2

2

The second one, where you have numerous Use cases linked to the actor is definitely better (actually the only one that makes any sense here). Those are actual functions provided by the system. Login or even Choose subject provide no real business value.

Actually I would even remove them completely from the UC diagram and do this decomposition on Activity diagrams. But if you really want to show reusability of UC parts (where you actually use include), the second diagram is acceptable.

The first one throw away and never do your UC diagrams this way anymore ;-)

Ister
  • 5,958
  • 17
  • 26
  • Up-voted your answer. I just added some aspects in mine. – qwerty_so Oct 21 '17 at 20:55
  • 1
    We agree that Login does not add a high business value, but "usually" security is an important topic, and we need to be able to trace what a user does on the system, and anyway he can-t do anything if he is not connected. And "our" customer" want to see that the designed system is a secrured one and that a user needs to be connected. For all these reasons, usually we keep Login as a use case. – granier Oct 22 '17 at 09:54
0

None of them is correct since Login is no use case. It has no added value. And a use case shows exactly on added value the system under consideration will bring to one of its actors. Take the 2nd picture and throw away the Login and I'd say "OK".

You can show that a login is needed by attaching a constraint to a UC telling { actor must be logged on}. Or if all UCs need a login attach it to the actor like { all/UC x, y need a login}.

Further, the use of extend/include is taken wrong by most people. They use it to do functional decomposition which is plain wrong. The best is to just avoid them and stay with simple bubble-stick man associations.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86