Search code examples
umluse-casevisual-paradigm

Similar Uses Case. How do the better solution?


For my project i need to do Uses Case Diagram. These are my uses cases but i think this solution isnt correct. Cliente use case

Search shop -> Cliente find all shop in the system

Search shop in your city -> Cliente find shop of his city

Search shop in by city by category -> Cliente find shop in a input city with an input category

Search shop by category -> Cliente find all shop with the input category

I was thinking of using an extension as they basically do the same thing but some with some different steps.

From mine definition: Alternative or optional behaviors of a use case set of use cases that extend the general use case

So i think like this

enter image description here

But i dont know if my solution is right or not because i'm not sure about <>

The client must be able to do these 4 searches.

Is it better the first or second solution? And why? Are there other better solutions?

EDIT: I'm trying a new solution.

Mine problem: Cliente can make different searches in the system.

enter image description here

enter image description here

Adding scenarios to mine UC could be better than other solution? I know that an UC can have various extensions of both success and failure. Could I solve my problems by opting for a solution like this?


Solution

  • I would like to express another viewpoint in addition to Bruno’s expert and comprehensive answer.

    While UML is agnostic of what a use-case should or should not express, there is a wide understanding that use-cases should correspond to actor goals.

    When I personally look for a shop, my primary goal is to find a shop. The criteria are just means to achieve this goal. Maybe a shop in my town, maybe the shop closest to my GPS coordinates, maybe I’m looking for a given category, or maybe I will refine my criteria interactively while search results are displayed.

    Specifying use-cases that are too detailed will lock you very early into a solution that might pre-define or constrain your user-interface without really having thought about the best and most comfortable way to achieve the goal for the user. The UML founders warned against this drawback and explicitly recommended not to use use-case models for designing a user interface.

    I’d therefore keep it simple and just have a use-case Search shop, and describe the more specific intents/expectations in the description associated to each UC (preferably using essential use-cases).