• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help for Sequence diagram

 
Jacky Doner
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi folks,
As far as sequence diagram is concerned,I don't know how detail I should depict.For example:
1.Whether the flow words should be depicted on the left side of sequence diagram?
2.whether the arguments of method as message should be depicted on sequence diagram?
3.whether the information such as ***VO on return path should be depicted on sequence diagram?
Thanks a lot.
 
Sridhar Raman
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jacky,
Take a look at the sequence diagrams for the design patterns from Sun. It gives a good idea.
http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html
Sridhar-
 
Dhanush Dharsh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jacky,
I have read comments from people who have passed Part 2 that they have just depicted their use case text in sequence diagrams. And it is always adviced to keep the diagram simple by avoiding additional details. As such you are tested for your architectural skills and not programming skills. Just ensure that your diagrams are logically consistent.
Dhanush.
 
Jacky Doner
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
Thanks for your valuable advices.But I still have a few questions to consult you.
1.I take a careful look on the design patterns from Sun.I notice that in sequence diagrams there are digital numbers on them,I'm quite confused,I think the digital numbers should be marked on collaboration diagram rather than sequence diagrams.
2.And on sequence diagrams,the communication messages are short phrases rather than method name in object/class.I don't hnow which contents should be adopted.
3.If put method name on sequence diagrams,whether the arguments of them should be included.
4.And I haven't yet gotten the idea whether the flow words should be depicted on the left side of sequence diagram or need not to.
Hope for your reply.
 
Sridhar Raman
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jacky,
>> 1.I take a careful look on the design patterns from Sun.I notice that in sequence diagrams there are digital numbers on them,I'm quite confused,I think the digital numbers should be marked on collaboration diagram rather than sequence diagrams.
In Sequence Diagrams, where you are depicting a simple flow stemming from a single user request, you can afford to omit the message numbering, as the messages are always sequential and are ordered from top to down.
Eg: 1. User sends request 2. System displays a web page 3. User logs off
You could omit the message numbers for the above case.
For a more complex process, spanning multiple requests from the user, it would be a good idea to denote each separate request by using a numbering scheme.
Eg: 1.0 User sends request 1.1 Page is displayed
2.0 User fills in form and sends another request 2.1 System validates the inputs 2.2 System displays errors
3.0 User corrects errors and re-submits 3.1 System accepts inputs.
I guess you get the point. Check out the Participants and Responsibilities section under the FrontController pattern.

>>> 2.And on sequence diagrams,the communication messages are short phrases rather than method name in object/class.I don't hnow which contents should be adopted.
Both approaches are right. In the architecture and high level design phase, you may not know the exact names of the methods or the order and types of method parameters. For example, you would label a web request as "SendRequest" instead of something like doGet("HttpServletRequest, HttpServletResponse). It keeps things simple, readable and hides the unnecessary developer level details.

>> 3.If put method name on sequence diagrams,whether the arguments of them should be included.
It is not mandatory to show the method arguments.
>> 4.And I haven't yet gotten the idea whether the flow words should be depicted on the left side of sequence diagram or need not to.
I am not really clear by what you mean by the phrase "flow words".
Regards
Sridhar
 
Harvey
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.Whether the flow words should be depicted on the left side of sequence diagram?

I think it's a good idea to depict the detailed use-case text on the left side of the sequence diagram. that way your sequence diagram is more convincing and self-explanatory. However, this is not compulsory, so it's up to you.
 
Jacky Doner
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sridhar,
Thanks for your quick reply.And I feel sorry for the phrase "flow words" I expressed made you unclear.In fact what I meant was whether you depicted the use case text on the left side of sequence diagram?
Further,As you talked,In your sequence diagram,you depicted almost all J2EE patterns in them.So I think that your sequence diagram must be quite large and with the help of scrolling bar,the person who marked your assignment could browse whole image.so I want to know whether you sized down your sequence diagram image?And whether you would get fewer marks if the size of image is quite larger?
Did you split the sequence diagrams into several small sequence diagrams by each use case,for example prepare usecase.
In your sequence diagrams ,did you put <<stereotype>>on the objects?For example,<<view>>,<<Bussiness Delegate>>.if yes,how to depict frontcontroller,<<servlet>>or<<frontcontroller>>provided object name is ItineraryController.
Thanks again.
Regards
Jacky
 
Sridhar Raman
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jacky,

>>>I meant was whether you depicted the use case text on the left side of sequence diagram?
No, I didn't do that. I simply included a UML note, which mentioned the Use Case that was being realized.
The common practice is to insert a link to the Use Case Model or the Use Case Diagram.
>>> Further,As you talked,In your sequence diagram,you depicted almost all J2EE patterns in them.So I think that your sequence diagram must be quite large and with the help of scrolling bar,the person who marked your assignment could browse whole image.so I want to know whether you sized down your sequence diagram image?And whether you would get fewer marks if the size of image is quite larger?
I had the same question and had posed it in the forum. I didn't shrink my diagrams and submitted them as they were. Size didn't seem to matter. (No pun intended!)
>>> Did you split the sequence diagrams into several small sequence diagrams by each use case,for example prepare usecase.
I did split my collaboration diagrams to make them smaller and more readable. It was a bit tricky and time-cosuming.
>>>In your sequence diagrams ,did you put <<stereotype>>on the objects?For example,<<view>>,<<Bussiness Delegate>>.if yes,how to depict frontcontroller,<<servlet>>or<<frontcontroller>>

It is totally upto you. You could use <<Model>>, <<View>>, <<Controller>> on the objects to clearly show which tier they belong to. You could get a bit more specific and use stereotypes like <<EJB>>, <<JSP>>, <<HTML>>, <<CGI-BIN>>, etc. You could also use your J2EE and GOF pattern names such as <<AbstractFactory>>, <<Controller>>, <<InterceptingFilter>>.
UML also allows you to show multiple stereotypes on a single element, though some tools may not support this.

Sridhar-
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic