>> in most cases I use NH mappings
I do the same.
I work with ASP.NET MVC so I use this to serialise the objects into JSON:
http://james.newtonking.com/pages/json-net.aspx
Of course NH objects will not always serialise so I generally manually transfrom them into DTOs in that case. I'll definitely have a look at your library to try and get some automation.
I use a JQuery plugin to serialise my javascript objects into JSON and send them to the server via an AJAX call.
That way I can do all my validation on the server.
dagda1@...
To: altdotnet@yahoogroups.com
From: zdeslav.vojkovic@...
Date: Mon, 1 Sep 2008 11:38:38 +0200
Subject: Re: [altdotnet] DTO - entity mapping strategies
Get Hotmail on your mobile from Vodafone Try it Now
I do the same.
I work with ASP.NET MVC so I use this to serialise the objects into JSON:
http://james.newtonking.com/pages/json-net.aspx
Of course NH objects will not always serialise so I generally manually transfrom them into DTOs in that case. I'll definitely have a look at your library to try and get some automation.
I use a JQuery plugin to serialise my javascript objects into JSON and send them to the server via an AJAX call.
That way I can do all my validation on the server.
dagda1@...
To: altdotnet@yahoogroups.com
From: zdeslav.vojkovic@...
Date: Mon, 1 Sep 2008 11:38:38 +0200
Subject: Re: [altdotnet] DTO - entity mapping strategies
I believe that this really depends on context.
Sometimes I prefer to send domain objects across the wire, in most cases I use NH mappings to map directly from DB to DTOs, and sometimes I use (a shameless plug!) this (but I find it more useful inside the presentation layer, to do mappings for presentation model, than domain->DTO)
Sometimes I prefer to send domain objects across the wire, in most cases I use NH mappings to map directly from DB to DTOs, and sometimes I use (a shameless plug!) this (but I find it more useful inside the presentation layer, to do mappings for presentation model, than domain->DTO)
On Mon, Sep 1, 2008 at 6:47 AM, Miika Makinen <mmiika@gmail.com > wrote:
Hi all,
How do you typically manage DTOs in your apps? Reflection? Code Gen? Manual coding? Do you have separate classes responsible for mapping or is it responsibility of the DTO itself (or entity?)? Is NH mapping to entities or DTOs?
Cheers,
Miika
Get Hotmail on your mobile from Vodafone Try it Now