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.  [ 2 posts ] 
Author Message
 Post subject: How are you mapping your DTOs
PostPosted: Mon Mar 05, 2007 7:50 am 
Beginner
Beginner

Joined: Wed Nov 29, 2006 12:23 pm
Posts: 42
While not directly related to NHibernate, this question is related to architectures/applications within which NHibernate is used. I am working on a system where an NHibernate DAL is exposed via a web service to be used by a web application, and am wondering what the best approach is for implementing DTOMapping functionality. I would like to avoid having to write (or generate) repetitive "Map DTO to entity"/"map entity to DTO" code, but am wondering if this would be possible with Reflection, and whether the time saved in development would be outweighed by the loss of performance from using reflection...

I've been unable to find a great deal of discussion on this elsewhere, which suggests that people hand crank/generate their code...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 06, 2007 7:40 am 
Newbie

Joined: Thu Jan 25, 2007 6:47 am
Posts: 2
At some point we mapped everything against interfaces and generated custom proxies to make sure that lazy-loading wasn't propagated but at the end of the day, we just ditched the whole thing and went for a more service-oriented approach.

The crucial question you have to ask yourself is : do I want to expose my domain to my clients or do I want to expose functionality to my clients.


We went for the latter and it fits the bill (thank $deity for WCF though).

YMMV though, we don't always have the same needs.

Cheers!


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

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.