aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Sequence diagram questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Sequence diagram questions" Watch "Sequence diagram questions" New topic
Author

Sequence diagram questions

Parag Doshi
Ranch Hand

Joined: Jun 29, 2004
Posts: 317
I had a few sequence diagram questions:

1. How are web containers and ejb containers shown in a sequence diagram? I wanted to show interception of message call by web/ejb containers in the seq diagrams. Do I attach a note or show it as an actor or is there a different way to show it?

2. If a DAO returns a VO, do we have to show the return through all the layers or just attach a note that the DAO operation returns a VO?
For example. if a FlightDAO returns a FlightVO, do I show the return of the VO to the Facade, then from Facade to the Delegate, from delegate to the Action etc or just attach a note stating that a VO is returned?

Parag
D. Rose
Ranch Hand

Joined: Apr 25, 2003
Posts: 215
My opinion is to make a generic sequence digram to show layers of your system. Keep only business specific classes in sequence diagram for ach of use cases.
Tomi Tuomainen
Ranch Hand

Joined: Jun 13, 2004
Posts: 86
Originally posted by Parag Doshi:
I had a few sequence diagram questions:

1. How are web containers and ejb containers shown in a sequence diagram? I wanted to show interception of message call by web/ejb containers in the seq diagrams. Do I attach a note or show it as an actor or is there a different way to show it?

From my point of view it's not necessary to show containers in a sequence diagram if a component diagram shows them. In a component diagram you can use a package, or preferrably outer container-component. In a sequence diagram you could use of course notes, but I don't know if there's any other reasonable way...?

2. If a DAO returns a VO, do we have to show the return through all the layers or just attach a note that the DAO operation returns a VO?
For example. if a FlightDAO returns a FlightVO, do I show the return of the VO to the Facade, then from Facade to the Delegate, from delegate to the Action etc or just attach a note stating that a VO is returned?

I would show that DAO creates VO object but not any return arrows or notes. Client could then call getData of this same VO object. (check Transfer Object pattern sequence diagram). In practise client's VO is not the same instance, but I don't think we should stress about that. Cade is not showing different copies of VO's in his example.

I hope my opinions help...

Tomi
Parag Doshi
Ranch Hand

Joined: Jun 29, 2004
Posts: 317

I would show that DAO creates VO object but not any return arrows or notes. Client could then call getData of this same VO object. (check Transfer Object pattern sequence diagram). In practise client's VO is not the same instance, but I don't think we should stress about that. Cade is not showing different copies of VO's in his example.



Thanks for your input Tomi. It definitely helped. I had a look at the Transfer Object pattern at the sun j2ee website here, they show the 'Return Value Object' to the client message. In our case, the client is 4-5 layers away . Anyway, I will show the create of ValueObject and just add a small note stating that this would be returned to the client.

As for the web container, I have a need to show the interaction between the client request coming in and the web container intercepting it (for container managed security), so was wondering how to show it. I could show an object and add the <<web container>> stereotype..thats one possibility..

any thoughts?

parag
Parag Doshi
Ranch Hand

Joined: Jun 29, 2004
Posts: 317
Originally posted by D. Rose:
My opinion is to make a generic sequence digram to show layers of your system. Keep only business specific classes in sequence diagram for ach of use cases.


Thanks for your input Rose. I was also going the same route, but had a need to show a possible interaction with the web container, hence the question.

Parag
Tomi Tuomainen
Ranch Hand

Joined: Jun 13, 2004
Posts: 86
Originally posted by Parag Doshi:

As for the web container, I have a need to show the interaction between the client request coming in and the web container intercepting it (for container managed security), so was wondering how to show it. I could show an object and add the <<web container>> stereotype..thats one possibility..

I just added an UML note with a text "container handles authentication" in suitable places. So I didn't actually model authentication or anything that happens after customer sends logIn message (until log in succeeds). I'm not sure if that's the best solution but I hope it's good enough for my examiner.

Tomi
Parag Doshi
Ranch Hand

Joined: Jun 29, 2004
Posts: 317
Originally posted by Tomi Tuomainen:

I just added an UML note with a text "container handles authentication" in suitable places. So I didn't actually model authentication or anything that happens after customer sends logIn message (until log in succeeds). I'm not sure if that's the best solution but I hope it's good enough for my examiner.

Tomi


Tomi,
Your approach also makes sense. It makes the diagram a lot cleaner and less complicated. The way I was thinking about the interaction in my head was that the client would request a protected resource and then the web container would interject and authenticate him. Then was planning to show 2 seperate flows, one if he is not authenticated, to proceed to Create User usecase and if authenticated, then business as usual. I might choose an approach depending on how lazy I am in creating the sequence diagram

My main grouse is that creating sequence diagram is a painful process and only 12 marks can be achieved from the entire effort ! Sounds pretty unfair
[ August 18, 2004: Message edited by: Parag Doshi ]
 
Don't get me started about those stupid light bulbs.
 
subject: Sequence diagram questions