firebaseumluse-caseuse-case-diagrammagic-mirror

Identifying Actors in Use Case Diagram for a mobile app


I have a system consisting of the following components:

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?


Solution

  • 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?

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