| 9/18/2006 2:46:21 PM |
Hi,
I am just wondering how other people's experience has been in using remoting with the o/r mapper. The main issue I am wondering about is whether to use serializard instances of my domain objects (those that are managed by the o/r mapper) on both the client and server, or if the domain objects should strictly stay on the server and only send DTOs back and forth over the wire. It seems like using the domain objects is feasible as long as the relationships and aggregations are kept to a bare minimum, the objects are serializable, and they are not auto-tracked (use StartTracking only when saving). But of course, you lose the conveneince of having an elaborate graph and the ability to get to a parent's parent's parent just through dot-notation and instead have to make a lot of queries to repositories. That seems like it would adversly affect the readability of some complex business logic. But then again, weigh that against the cost of having to translate your domain objects into and out of DTOs in every call...
Any comments?
Thanks,
David Martines |