• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DTO and external system level detail

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 188
11
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic