Identifying Actors in Use Case Diagram for a mobile app

167 Views Asked by At

I have a system consisting of the following components:

  • A mobile app that is controllable by users. Users can log in, create accounts, and then connect to a mirror and after that they can modify module settings and save the modifications.

  • Firebase as the database and backend for the system.

  • A REST API that controls a magic mirror. When a user is associated with it, the API requests JSON parameters from Firebase and applies them to the mirror. If there is no user associated, the mirror displays a QR code.

I tried this design: enter image description here

I tried to make sense that the Main actor is the User and Firebase is the secondary one. But it looks complex, and i'm not really sure of it, because in the end, the user only cares about changing the state of the smart mirror. As I am new to UML I'd like to know if this is the way to go?

1

There are 1 best solutions below

2
Christophe On BEST ANSWER

According to the UML specifications:

UseCases define the offered Behaviors of the subject without reference to its internal structure. These Behaviors, involving interactions between the Actors and the subject, may result in changes to the state of the subject and communications with its environment.

This means that as soon as you analyse use cases or actors based on the internal design of your system, you're on a wrong path.

Your use case should focus on the value added for the user, not on the technical solution:

When a UseCase applies to a subject, it specifies a set of behaviors performed by that subject, which yields an observable result that is of value for Actors or other stakeholders of the subject.

Considering that actors can be system, how to check if FireBase is an actor?

  • The first question is, does it matter for the user. Is the end user of your app interested in this candidate secondary actor? Most probably, the end-user doesn't care.
  • The second question is, is the secondary actor independent, and does it have a business purpose on its own that your system is helping to fulfil?
  • The third question is, could the secondary actor be switched to another secondary actor?

Firebase doesn't tick any of these boxes. So it's probably a bad idea to go that way.