• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sequence diagrams should only show classes found in class diagram

 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We should only show classes in the sequence diagrams which exist in the Class diagram. Is this statement correct?

If so, Cade's class diagram doesn't show the EntityManager yet he uses it in the sequence diagram. Any thoughts?
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1103
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yah, you can just add 'EntityManager' in the class diagram...
 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ranganathan.
 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another one of Cade's sequence diagrams shows a call to :Email Server. This isn't depicted in his class diagram.

Would this be shown as EmailDAO in the class diagram? What about the rest of the DAOs (UserDAO, InventoryDAO, etc), which are shown in his component diagram?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EntityManager is a built in JEE class so it doesn't need to be in the class diagram. All of your custom classes should be in the class diagram.
 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne. So there is no rule that if I use an EntityManager in the sequence diagram (or any other JEE component), that it has to be included in the Class diagram?
I'm assuming then that this only includes custom classes. So if I call a DAO within the sequnce diagrams, this should be shown in the class diagram. Correct?

Cade shows an Email Server in his sequence diagram. Would this actually be an EmailDAO, which should be shown in class diagram?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marcelo Ortega wrote:TSo there is no rule that if I use an EntityManager in the sequence diagram (or any other JEE component), that it has to be included in the Class diagram?
I'm assuming then that this only includes custom classes. So if I call a DAO within the sequnce diagrams, this should be shown in the class diagram. Correct?

Correct. Any classes you make up should be in the class diagram.

Marcelo Ortega wrote:Cade shows an Email Server in his sequence diagram. Would this actually be an EmailDAO, which should be shown in class diagram?

It's just a class name. I don't generally think of email as a dao, but it could be.
 
Marcelo Ortega
Ranch Hand
Posts: 528
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne, I appreciate your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic