wood burning stoves 2.0*
The moose likes OO, Patterns, UML and Refactoring and the fly likes question regarding OOAD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "question regarding OOAD" Watch "question regarding OOAD" New topic
Author

question regarding OOAD

madhu bharathula
Greenhorn

Joined: Oct 08, 2001
Posts: 15
Hi,
I have some domain objects and service objects. When drawing an interaction diagram, do we need to show service objects also or can we skip showing service objects in interaction diagram??
For ex, i have a service object called dboperations which provides interface to the required database and provides all the methods needed to interact with the database. I use this object whenever i wanted to make a connection to the database. Whenever a domain object receives a message to get some information, the domain object sends a corresponding message to service object.
Bye
Madhu
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
IMHO,
It's WAYYY clearer if you show all objects in an interaction diagram. Skipping objects leads you to a mess of trouble when you try to move to implementation...
However, one caveat -- you don't have to repeat the details of a method you've described in another diagram. If you've shown the complete flow for (for instance) obtaining a connection from a pool in one diagram, you can just use "getConnection" in other diagrams.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
[This message has been edited by Kyle Brown (edited October 17, 2001).]


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Paul Newton
Ranch Hand

Joined: Jul 17, 2001
Posts: 67
I accept the point that leaving out elements can cause problems later on. However, I still like to give designers some flexibility. It all depends on what you are trying to show, and who your audience is.
If you are showing a detailed UC realisation, that is mapped to code - then you will probably show all the nitty-gritty details.
However, if you are showing an architectural diagram - then it may be acceptable to leave out some information.
paul.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
I'll agree with Paul with one caveat -- your design should be layered well enough that it's kind of obvious where to "stop" with providing detail in the diagram. For isntance, I generally employ the Facade pattern quite a bit because it gives a good notion of where you can stop in providing detail at the highest level.
So, for instance, I'll often use a "database broker" facade that hides all of the details of O/R mapping for my objects, and I'll only show the presence of the facade (not any of the details) at the architectural level.
Likewise I'll usually do the same for UI (Showing lines on my diagrams coming in from a "controller" that is independent of the actual buttons and windows).
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
Paul Newton
Ranch Hand

Joined: Jul 17, 2001
Posts: 67
In My Humble/Honest Opinion...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: question regarding OOAD