Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which UML diagram should I start with?

Tags:

uml

top-down

Extends

Say you're looking at the 6 basic types of UML diagram (from this The Elements Of UML 2.0 Style)

  1. Class diagrams
  2. Use case diagrams
  3. State machine diagrams
  4. Activity diagram
  5. Sequence diagram
  6. Physical diagram

Pretend you're insane and you feel like drawing up all 6 diagrams for your system.

Which would you start with? Then which would you go to? What's the best order to visit each diagram if you have a pretty clear idea of what you want your system to do?

I think you should start with the physical diagram and work your way to class diagram. Top down, I always say..? Am I wrong?

like image 368
bobobobo Avatar asked Mar 11 '10 03:03

bobobobo


People also ask

Which UML diagram is first?

You should first decide your application flow,means you should first draw a sequence diagram. It will show the flow of your application after this you should go for class diagram.

Which UML diagram is most important to start the coding of any software?

Use Case Diagram It's a great starting point for any project discussion because you can easily identify the main actors involved and the main processes of the system. You can create use case diagrams using our tool and/or get started instantly using our use case templates.

What is the order of UML diagrams?

The current UML standards call for 13 different types of diagrams: class, activity, object, use case, sequence, package, state, component, communication, composite structure, interaction overview, timing, and deployment.


1 Answers

Use cases are the main ones that define "what" your system does, possibly followed by state machines and activity diagrams (which could be seen either way -- normally the activity diagrams are more about the "what" and the state machines more about the "how", but I've seen counterexamples to each); class and sequence diagrams, and even more so component and deployment ones (collectively the "physical"), are more and more about how your system does what it does. I'd definitely go from the "what" towards the "how" as the reverse sequence makes little sense -- how can "how" make sense if you haven't defined the "what"?

So, summarizing, roughly: use cases, activity, state machine, class, sequence, component, deployment. This order makes sense because it gets deeper towards the implementation aspects and away from the analysis aspects, so e.g. somebody interested in understanding exactly what use cases you'll cater to and what business rules you'll apply (activity diagrams) may stop "reading" earlier than somebody who needs to understand the full detailed logic of your deployment strategy.

like image 168
Alex Martelli Avatar answered Oct 05 '22 09:10

Alex Martelli