• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scea Part 2, general questions about UML class diagram

 
Vadym Ba
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 abstract questions concerning class diagrams

1) If I inject EJB to some class as a private filed, is it ok to show it in the class diagram like way

-@ejbObjectName EJBClassName

?

2) Should I show all the dependencies between class with dependency arrow and comments like (uses , have and so on) ?

It makes class diagram harder to read because of too many dependencies and arrows.

What is the best solution for that?

Thanks a lot


 
Yegor Bugayenko
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) I don't think that such dependency is really an "attribute" of a class (in terms of UML). I would show it as an "aggregation".

2) The purpose of any UML diagram is not show "everything you can show". The purpose is to inform the reader about your architectural decision, at some certain level of abstraction. If all your dependencies belong to the same level of abstraction and you can't place them all into an easy-to-read UML diagram - it's a sign of poor design. Re-design your architecture for better cohesion and less coupling.
 
Vadym Ba
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've found recently such discussion here

http://www.coderanch.com/t/529769/java-Architect-SCEA/certification/Annotations-class-diagram

so I think many approaches are correct
I will decide
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic