<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Requesting features for AutoMapper</title>
	<atom:link href="http://lostechies.com/jimmybogard/2009/06/15/requesting-features-for-automapper/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2009/06/15/requesting-features-for-automapper/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Wed, 19 Jun 2013 17:39:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Anthony</title>
		<link>http://lostechies.com/jimmybogard/2009/06/15/requesting-features-for-automapper/#comment-1595</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Tue, 07 Jul 2009 01:16:28 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/06/14/requesting-features-for-automapper.aspx#comment-1595</guid>
		<description>Automapper looks great. I&#039;m yet to use it but I think it will work really well in the scenario I have. 

Currently, we have a very large investment in Datasets. In more recent times this is proving to be difficult as we are finding that we need the light weight nature of a DTO to achieve what has become know as view models. Typically we are using them in the scenarios you have described (i.e. summary section at the top of a page to provide context) but also in many of our ajax scenarios.

In these cases, trying to serialize a dataset to the browser when we want to work with json objects that have more of any object structure (i.e. { item : &#039;&#039;, other : { hello : &#039;what&#039;, world : &#039;oh ok&#039; } } ) is rather tedious. The same also works in reverse, when we get jquery to send the server a json object, .net can handle the deserialisation just fine, but then there is the question of persistence. We don&#039;t use the datasets datatable to generate the sql to conduct the update, we use tableadapters with queries hocked up to stored procs to handle the update. Hence we have 2 options, when going from the UI to the BL to the DL to the dataset. We can either pass a dto (but this would be a different dto to the view model dto&#039;s as the view model dto&#039;s are UI specific) or create methods with that have a param for each property we want to update.

Hence where we are looking to use automapper, is to go from the dataset to the view model dto and in situations where we have a domain model being passed from the UI through to the DL, to map the data from the view model dto to the domain model dto.

I guess 2 things I was wondering from this, 1) would you say our use is valid and 2) does Automapper support datasets 3) Automapper can go from a object hierarchy to a flatter structure, can one go from a flat dataset structure to an object heyracky (for situation where the dataset has three fields &#039;item&#039;, &#039;hello&#039; &amp; &#039;what&#039; and we want the json format to be { item : &#039;&#039;, other : { hello : &#039;what&#039;, world : &#039;oh ok&#039; } or what ever - note this structure is needed for some complex ajax scenarios that we have where we request the full json object to start with, then we update just parts of the object from the server - i.e. request for an updated &#039;other&#039; from the server).

Cheers
Anthony </description>
		<content:encoded><![CDATA[<p>Automapper looks great. I&#8217;m yet to use it but I think it will work really well in the scenario I have. </p>
<p>Currently, we have a very large investment in Datasets. In more recent times this is proving to be difficult as we are finding that we need the light weight nature of a DTO to achieve what has become know as view models. Typically we are using them in the scenarios you have described (i.e. summary section at the top of a page to provide context) but also in many of our ajax scenarios.</p>
<p>In these cases, trying to serialize a dataset to the browser when we want to work with json objects that have more of any object structure (i.e. { item : &#8221;, other : { hello : &#8216;what&#8217;, world : &#8216;oh ok&#8217; } } ) is rather tedious. The same also works in reverse, when we get jquery to send the server a json object, .net can handle the deserialisation just fine, but then there is the question of persistence. We don&#8217;t use the datasets datatable to generate the sql to conduct the update, we use tableadapters with queries hocked up to stored procs to handle the update. Hence we have 2 options, when going from the UI to the BL to the DL to the dataset. We can either pass a dto (but this would be a different dto to the view model dto&#8217;s as the view model dto&#8217;s are UI specific) or create methods with that have a param for each property we want to update.</p>
<p>Hence where we are looking to use automapper, is to go from the dataset to the view model dto and in situations where we have a domain model being passed from the UI through to the DL, to map the data from the view model dto to the domain model dto.</p>
<p>I guess 2 things I was wondering from this, 1) would you say our use is valid and 2) does Automapper support datasets 3) Automapper can go from a object hierarchy to a flatter structure, can one go from a flat dataset structure to an object heyracky (for situation where the dataset has three fields &#8216;item&#8217;, &#8216;hello&#8217; &#038; &#8216;what&#8217; and we want the json format to be { item : &#8221;, other : { hello : &#8216;what&#8217;, world : &#8216;oh ok&#8217; } or what ever &#8211; note this structure is needed for some complex ajax scenarios that we have where we request the full json object to start with, then we update just parts of the object from the server &#8211; i.e. request for an updated &#8216;other&#8217; from the server).</p>
<p>Cheers<br />
Anthony </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/06/15/requesting-features-for-automapper/#comment-1594</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Tue, 16 Jun 2009 20:45:23 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/06/14/requesting-features-for-automapper.aspx#comment-1594</guid>
		<description>@mendicant and @Eyston

It&#039;s on the blog post back log to talk about those kinds of things, and also what context we have that led us to that solution.  Hopefully I&#039;ll get to it, eventually :P</description>
		<content:encoded><![CDATA[<p>@mendicant and @Eyston</p>
<p>It&#8217;s on the blog post back log to talk about those kinds of things, and also what context we have that led us to that solution.  Hopefully I&#8217;ll get to it, eventually <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eyston</title>
		<link>http://lostechies.com/jimmybogard/2009/06/15/requesting-features-for-automapper/#comment-1593</link>
		<dc:creator>Eyston</dc:creator>
		<pubDate>Tue, 16 Jun 2009 12:53:47 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/06/14/requesting-features-for-automapper.aspx#comment-1593</guid>
		<description>While mapping from DTO back to Entity isn&#039;t a good idea (the Entity should be more complex then a DTO), it is an area that seems sort of hard to me.  I haven&#039;t looked at Command objects (I&#039;m a pattern noob) but anything to help with taking an stupid Edit Model and initiating behavior on the Entity is useful to me :)

Time to google on Command~</description>
		<content:encoded><![CDATA[<p>While mapping from DTO back to Entity isn&#8217;t a good idea (the Entity should be more complex then a DTO), it is an area that seems sort of hard to me.  I haven&#8217;t looked at Command objects (I&#8217;m a pattern noob) but anything to help with taking an stupid Edit Model and initiating behavior on the Entity is useful to me <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Time to google on Command~</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mendicant</title>
		<link>http://lostechies.com/jimmybogard/2009/06/15/requesting-features-for-automapper/#comment-1592</link>
		<dc:creator>mendicant</dc:creator>
		<pubDate>Mon, 15 Jun 2009 20:02:05 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/06/14/requesting-features-for-automapper.aspx#comment-1592</guid>
		<description>Jimmy, if it&#039;s not too much trouble, could you give me a quick (very high level) rundown on how your command object works? When I read that it suddenly dawned on me that it might make a ton more sense to use the command pattern than our current solution when updating the domain from an edit model.

Off the top of my head, I would expect it to know how to take the edit model and update a corresponding domain model, but then to me that just seems like writing a reverse mapping. Am I off here?</description>
		<content:encoded><![CDATA[<p>Jimmy, if it&#8217;s not too much trouble, could you give me a quick (very high level) rundown on how your command object works? When I read that it suddenly dawned on me that it might make a ton more sense to use the command pattern than our current solution when updating the domain from an edit model.</p>
<p>Off the top of my head, I would expect it to know how to take the edit model and update a corresponding domain model, but then to me that just seems like writing a reverse mapping. Am I off here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogardj</title>
		<link>http://lostechies.com/jimmybogard/2009/06/15/requesting-features-for-automapper/#comment-1591</link>
		<dc:creator>bogardj</dc:creator>
		<pubDate>Mon, 15 Jun 2009 12:55:12 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/06/14/requesting-features-for-automapper.aspx#comment-1591</guid>
		<description>@Betty

Yeah, AutoMapper only really shines when the source/destination type look very similar.  This is true in many cases where the destination type is modeled from the source type.  If that&#039;s not the case, you&#039;ll likely have a lot of mismatches.</description>
		<content:encoded><![CDATA[<p>@Betty</p>
<p>Yeah, AutoMapper only really shines when the source/destination type look very similar.  This is true in many cases where the destination type is modeled from the source type.  If that&#8217;s not the case, you&#8217;ll likely have a lot of mismatches.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Betty</title>
		<link>http://lostechies.com/jimmybogard/2009/06/15/requesting-features-for-automapper/#comment-1590</link>
		<dc:creator>Betty</dc:creator>
		<pubDate>Mon, 15 Jun 2009 03:17:58 +0000</pubDate>
		<guid isPermaLink="false">/blogs/jimmy_bogard/archive/2009/06/14/requesting-features-for-automapper.aspx#comment-1590</guid>
		<description>We&#039;re currently looking at using Automapper as part of a on going data migration tool where we pull from one or more source convert the data using automapper then dump it into a new database.

The current plan is to map from/to: Entity Framework, Generic Rest Data Service that returns xml, MySql and xml deserialized from the harddrive.

Not convinced it&#039;s the best route to take yet as the code seems like it would be easier to write myself due to not many columns lining up and the Entity Framework being annoying with duplicate keys etc.</description>
		<content:encoded><![CDATA[<p>We&#8217;re currently looking at using Automapper as part of a on going data migration tool where we pull from one or more source convert the data using automapper then dump it into a new database.</p>
<p>The current plan is to map from/to: Entity Framework, Generic Rest Data Service that returns xml, MySql and xml deserialized from the harddrive.</p>
<p>Not convinced it&#8217;s the best route to take yet as the code seems like it would be easier to write myself due to not many columns lining up and the Entity Framework being annoying with duplicate keys etc.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
