Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I need to make a sequence diagram and I'm not sure how to represent user input. Is it correct to have a message be sent from an object to the user asking for user input or should all objects be passive and only be operated by the user?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

from UML Basics

The sequence diagram is used primarily to show the interactions between objects in the sequential order that those interactions occur...

so yes, it is perfectly valid to represent the sequence step 'ask the user for something'; each arrow does not necessarily correspond to one specific message

share|improve this answer
add comment

What kind of system behavior are you trying to model?

In the system you are trying to model, do you intend that the system be able to pop up a dialog box (for example) whenever the Cyber Spirit moves it, requiring the user to break state and deal with the system's demand? If so, then it would seem to me that adding a "User Interface" object to the sequence diagram, and then sending messages to that object (and expecting replies from it) would be a perfectly valid way to model it.

It also has the advantage of making the user interface visible in the model, telling whatever sucker in Bangalore takes over after you get downsized out that there is a user interface development task and here are all the messages and replies it must handle.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.