-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: What to pass from server when displaying tree in Rich Client
PostPosted: Thu Sep 07, 2006 7:14 am 
Newbie

Joined: Thu Sep 07, 2006 6:31 am
Posts: 1
I'm just starting out on my first rich client app (using Eclipse RCP client connecting to EJB3 and/or Spring and Hibernate back-end) and one of my first requirements is to display a tree view of an object hierarchy.

My top-level objects of type ClassA each contain a collection of objects of type ClassB, which in turn each contain a collection of objects of type ClassC, which in turn each contain a collection of objects of type ClassD, which in turn each contain a collection of objects of type ClassE. However, we are only likely to have a maximum combined total of perhaps one or two hundred objects.

My question is: What should I pass back to the client from the server? Do I want to pass back a complete object structure of Hibernate domain objects? Or would I be better off passing back an equivalent hierarchy structure of DTOs that just contain the ID and decription which I need in order to create the tree view?

It seems like extra work and unnecessary duplication to create a parallel hierarchy of DTO objects - but it seems inefficient to pass back the whole domain object hierarchy just to populate the tree...

If DTOs are the correct way to go, then would you also map these these in Hibernate? Is it ok to have DTOs (which are read-only) mapped to the same tables/entities as your domain objects? Or would you recommend not mapping the DTOs in hibernate and instead have them obtain the information they need from their matching Hibernate-mapped domain objects?

Any help here would be greatly appreciated!

Thanks in advance,

Lawrie


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.