Forums Register Login

Display method names in sequence diagram

+Pie Number of slices to send: Send
What approach has the examinees taken for sequence diagram?

1) Show names of the methods in a great detail. e.g., getItinerary()
2) Also show attributes in those methods. e.g. getItinerary(customer)
3) Only add notes, instead of showing method names. e.g., Get list of itineraries for a customer as a note.

Or, a combination there of?
+Pie Number of slices to send: Send
 

Originally posted by Sam Gehouse:
What approach has the examinees taken for sequence diagram?

1) Show names of the methods in a great detail. e.g., getItinerary()
2) Also show attributes in those methods. e.g. getItinerary(customer)
3) Only add notes, instead of showing method names. e.g., Get list of itineraries for a customer as a note.

Or, a combination there of?



I've chosen the first option, since I wanted to keep the sequence diagrams clean.
+Pie Number of slices to send: Send
I am following a pattern where I am not even displaying the parameters. Its just getThis or setThat. I am displaying notes to connect to other sequence diagrams or to elaborate on what a class is doing at that point of time
+Pie Number of slices to send: Send
I had shown method attributes only for some methods where they were relevant. But for most messages I had only method names.
+Pie Number of slices to send: Send
Sam,

The approach to be used depends of what kind of diagram you're about to define. In OOAD (Object Oriented Analysis and Design) there are two kinds of diagrams.

If you create a sequence diagram at the analysis level, you should take the option number three, which is, use a more detailed expression. If your diagram are in the design level, you should take take the option number two.

Regarding that architecture for the use case level, is related to design, so the answer is something clear at this point

Regards,
+Pie Number of slices to send: Send
Hi,

I have a question on this thread. I am planning to use option three and I am using StarUML for the sequence diagram. When I attach a name to the call it by default attaches method symbol i.e. (). However I can change the type of the actionKind property for the call to value send instead of call and removes the method symbol. But at this stage it does not show the life span of the call.

My question is is the diagram valid without life spans being not indicated while methods are represented as descriptions and not actual method names.

Sachin
+Pie Number of slices to send: Send
Hi Sachin,

If you change the value of call to "Send", it shows that it's an asynchronous call. And that's why it doesn't show you lifespan of call.
It's valid representation of asynchronous call. You should decide if your design need an asynchronous call.
Hope it helps,
It was the best of times. It was the worst of times. It was a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 704 times.
Similar Threads
Jude drawing
Sequence Diagram showing overloaded methods
HttpSession UML
Class diagrams from Sequence diagrams
Generating Sequence Diagrams for all methods?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:27:26.