1

I am trying to model a use case diagram with two different front end applications. I have a web-based front end with different use cases than my front end for a tablet app. Some use case might have the same name but a different scenario.

My question is if it is a good way to use two system blocks in the diagram for each front end, or should I combine all uses cases in one system block? How can I model it in a UML correct and clear way?

David Buck
  • 3,752
  • 35
  • 31
  • 35
Luca
  • 13
  • 2
  • first remark : are you sure your UCs are valid ? I say that because UC say *what* the system have to do, and the fact the app runs through a web or on a tablet may change nothing at use case level and is only relevant at implementation level. For the rest if there is a real distinction at UC level difficult to answer without knowing how the UCs are close or far between the 2 cases. Make UCs and diagrams clear and simple is the main hint I can say – bruno Mar 23 '21 at 18:10
  • In my case, the front ends are not just exchangeable. For example, the web frontend is targeting the actor admin with a use case: create a product. On the other side, the tablet front end is targetting the user to buy a product but is not made for the admin. So I think there is a difference in the use case level. Sry for the unclear question. – Luca Mar 23 '21 at 18:31
  • It is also the case that the admin can also login into the tablet front end but has different functionality than on the web front end. – Luca Mar 23 '21 at 18:36

2 Answers2

1

UML use-cases and their boundaries

Setting the right boundaries is key to successful use-case modelling. According to the UML 2.5.1 specs:

A UseCase is a kind of BehavioredClassifier that represents a declaration of a set of offered Behaviors. Each UseCase specifies some behavior that a subject can perform in collaboration with one or more Actors. UseCases define the offered Behaviors of the subject without reference to its internal structure.

What matters is the system (i.e. the "subject" in use-case speak), the actors, and the behaviors that the subject offers to its actors (which, as QwertySO reminds us, supposed to provide value to the users, i.e. help to achieve the user's goal).

Use-cases focus on the users

From the point of view of your users, the expected functionality is independent of the from the front-endend. According to your comment, today:

the web frontend is targeting the actor admin with a use case: create a product. On the other side, the tablet front end is targeting the user to buy a product but is not made for the admin.

But tomorrow, your admins might want to use a PC, or a smartphone for the urgent tasks. And maybe some normal users would expect a voice interface rather than a tablet. The use-cases shall help us to focus on theses needs and not the way we are going to address them.

So, in principle, you should model your use-case independently of the front-end. You should not either show the split between front-end and back-end.

How to decompose the system

Use-cases are not meant to do functional nor structural decomposition. This kind of distinction is best performed in component diagrams that decompose your system into components and in deployment diagrams that map the components to the servers and devices.

If you have already a component decomposition in mind, and your component are independent, you could think of modelling the use-cases of a sub-system or a component. This is valid, since UML specs tell us:

A subject of a UseCase could be a system or any other element that may have behavior, such as a Component or Class. Each UseCase specifies a unit of useful functionality that the subject provides to its users You can even model use-cases for a component, the actors being then the external actors and the other

But would this be helpful? You could have a use-case diagram for the admin application, with admin actors, and a system actor fo the back-end. But I'd not advise to go into that direction unless the app is a rich app with its own added value. If the app is just a front-end you'd just end-up with very redundant use-case diagrams (i.e. front-end UC and back-end UC would show the same use-cases) with a loss of end-to end relation to the real actor (i.e. the back-end UC would be associated with system actors corresponding to the front-end app, but you'd loose the direct link to the real actors).

In the end you might lose the main strength of UC, the focus on users and their goals. In exchange you'd have the burden to keep all the redundant models in sync but I don't quite see the advantage here. If you want to have more arguments about each alternative, you may also have a look here.

Christophe
  • 68,716
  • 7
  • 72
  • 138
-1

No, that's not good. Use cases are meant to show the added value a system under consideration delivers to actors of it. You are looking at implementation details. That is how the interface would look like. But for the added value this is completely irrelevant. You can create different implementations for the use cases so your collaborations will show either the one or the other front end. That will be part of the class design controlled by a requirement User may interact with frontend A and B.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86