0

I want to create a diagram / visual representation of the different Android Activities I have. Each Activity consists of different components:

  1. A Java-Class like LoginActivity which might extends something like AppCompatActivity
  2. One or more Resource XML files
  3. Maybe Fragements

My first question would be: Which diagram is the best one to visualize these components? The UML component diagram?

In additon to that: If I also want to show a bit more from the functional perspective (for example the Login might have two Activities, one for the Login and another one for 2-factor-auth), what would you suggest?

Or will I end up with a simple self-made diagram (normal shapes)?

mcode
  • 534
  • 4
  • 18

1 Answers1

1

Use a class diagram to show the static structure of your classes (how they are associated and what attributes/operations they offer). A component diagram is good for showing how several classes are packaged in components. to show the behavior you should use a mix of sequence/activity diagrams. The first is more focused on technical and the second on business aspects. Also state diagrams are useful in many cases.

I could go on and opt for starting with use cases to bring light into the business view (what's the big advantage/USP of the system?). In any case, it always depends on who is your audience.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • Thanks Thomas. I agree, I think I would need to have a mix to show be able to show everything. But let me ask one thing: Class and / or component diagrams are goot for how different _classes_ are linked together (for example Fragments in an Activity). But what about resource files like the XML layouts. How would you add those to your static structure? – mcode Apr 18 '18 at 16:25
  • You can simply use `<>` elements and link them with `dependency` relations. – qwerty_so Apr 18 '18 at 16:57