• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DTO and external system level detail

 
Aditya Kumar
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello people,

In your assignment, have you shown DTO level classes?

I think the DTO should be there in the component diagram as a separate component (or sub-component). What I am not sure is if it should be there in class or sequence diagrams.

Another thing is if we should show the external system (in my case there are few external data sources) in the class diagram.

Any suggestions? Please do reply.

Thanks
aditya
 
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
The class diagram should contain all of your classes. I split mine into multiple pages to make it easier to read.

The external system isn't one of your classes, so it shouldn't be in your class diagram. (It should be in higher level diagrams because you communicate with it.) By contrast, you should include a Facade or Adapter to the external system in your class diagram if you have one.
 
Amritendu De
author
Ranch Hand
Posts: 188
11
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First the flow: JSF->Managed Bean->Service(SLSB1)->DAO(SLSB2)->EntityManager

ManagedBean would call the service via a DTO. When the service calls the DAO, the DTO will need to be converted to an entity via a mapper. In other words, Service would call the DAO via an entity.

The DTO could be in the class diagram but fitting everything into the class and making it readable at the same time is a challenge and an art but possible. Some of the calls from MBean to Service may have a DTO as a parameter and needs to be there both in sequence and class diagrams.

As far as external system interaction goes, it is advisable to leave a package in the class diagram. Avoid going deep into the design of the external system classes and their dependencies. This is an assumption.
 
Aditya Kumar
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, Jeanne and Amritendu for your replies.

Is there any alternative to DTO? I ask this because for some reason I do not see much discussion in the forums (at least not in the same vain as DAOs or Entities). But I do understand what you are saying.

The external system is not as "external" as it may seem - well, they have just said that the system(s) is available via a web service interface. Following points about it from the class diagram:

1. I think I do not have to look into the implementation of that web service. I am showing the web service in the class diagram and adding a note that though this isn't a part of the implementation, it is shown for the sake of clarity (this is especially relevant in light of the fact that I will need to show the web service interaction in the sequence diagrams).

2. I have shown the DAO class and it's interface (as these both are a part of our implementation), to the Web Service (with "uses" notation) with a relevant Web Service operation which I assume to be there (since the assignment says that the data we want is available via a web service)

I hope this is ok!
Thanks,
Aditya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic