This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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).]
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.
Joined: Aug 10, 2001
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.