<?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: Maintainable MVC Series: View Model and Form Model</title>
	<atom:link href="http://blog.jorritsalverda.nl/2010/03/03/maintainable-mvc-series-viewmodel-and-formmodel/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jorritsalverda.nl/2010/03/03/maintainable-mvc-series-viewmodel-and-formmodel/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=maintainable-mvc-series-viewmodel-and-formmodel</link>
	<description></description>
	<lastBuildDate>Wed, 30 Nov 2011 22:01:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: dmorgan</title>
		<link>http://blog.jorritsalverda.nl/2010/03/03/maintainable-mvc-series-viewmodel-and-formmodel/comment-page-1/#comment-1677</link>
		<dc:creator>dmorgan</dc:creator>
		<pubDate>Thu, 26 Aug 2010 14:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jorritsalverda.nl/?p=178#comment-1677</guid>
		<description>Hi, excellent series, it has helped me a lot to start in the ASP MVC world
I was wondering if you have examples about the form handlers, that part is a gray zone to me.</description>
		<content:encoded><![CDATA[<p>Hi, excellent series, it has helped me a lot to start in the ASP MVC world<br />
I was wondering if you have examples about the form handlers, that part is a gray zone to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Howard van Rooijen</title>
		<link>http://blog.jorritsalverda.nl/2010/03/03/maintainable-mvc-series-viewmodel-and-formmodel/comment-page-1/#comment-677</link>
		<dc:creator>Howard van Rooijen</dc:creator>
		<pubDate>Fri, 28 May 2010 10:55:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jorritsalverda.nl/?p=178#comment-677</guid>
		<description>@Mike - nice tip - thanks very much - I was wondering about that exact problem too...</description>
		<content:encoded><![CDATA[<p>@Mike &#8211; nice tip &#8211; thanks very much &#8211; I was wondering about that exact problem too&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Henry</title>
		<link>http://blog.jorritsalverda.nl/2010/03/03/maintainable-mvc-series-viewmodel-and-formmodel/comment-page-1/#comment-63</link>
		<dc:creator>Mike Henry</dc:creator>
		<pubDate>Mon, 15 Mar 2010 22:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jorritsalverda.nl/?p=178#comment-63</guid>
		<description>Thanks for sharing, I&#039;m enjoying your series.

I like your approach but I&#039;m using strongly-typed input helpers (Html.TextBoxFor, etc.). It was giving me issues because it was generating input names like &quot;Data_Name&quot; instead of &quot;Name&quot; so the values weren&#039;t properly binding to the formModel in UpdateItem. The solution was to use the Bind attribute with the Prefix argument:

e.g. public ActionResult UpdateItem(int id, [Bind(Prefix=&quot;Data&quot;)] FormModel formModel)

Hope this helps anyone else who runs into the same issue.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing, I&#8217;m enjoying your series.</p>
<p>I like your approach but I&#8217;m using strongly-typed input helpers (Html.TextBoxFor, etc.). It was giving me issues because it was generating input names like &#8220;Data_Name&#8221; instead of &#8220;Name&#8221; so the values weren&#8217;t properly binding to the formModel in UpdateItem. The solution was to use the Bind attribute with the Prefix argument:</p>
<p>e.g. public ActionResult UpdateItem(int id, [Bind(Prefix="Data")] FormModel formModel)</p>
<p>Hope this helps anyone else who runs into the same issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://blog.jorritsalverda.nl/2010/03/03/maintainable-mvc-series-viewmodel-and-formmodel/comment-page-1/#comment-30</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Mon, 08 Mar 2010 14:22:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jorritsalverda.nl/?p=178#comment-30</guid>
		<description>Thanks for this series.  The cross-section of a maintainable DRY, SOLID, MVC app is great.  I look forward to the rest of the posts.</description>
		<content:encoded><![CDATA[<p>Thanks for this series.  The cross-section of a maintainable DRY, SOLID, MVC app is great.  I look forward to the rest of the posts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Wilson</title>
		<link>http://blog.jorritsalverda.nl/2010/03/03/maintainable-mvc-series-viewmodel-and-formmodel/comment-page-1/#comment-27</link>
		<dc:creator>Joe Wilson</dc:creator>
		<pubDate>Sat, 06 Mar 2010 17:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jorritsalverda.nl/?p=178#comment-27</guid>
		<description>I like this series, too.  Keep up the good work!

I am pretty close to where you are on validation, in that the duplication of validation rules is a big code smell for DRY.  But now I&#039;m thinking of it like the domain model and form model.  There is overlap, sure, but the models serve different purposes and can be tailored to that purpose.  Form model validation is pretty much just input validation, with some business rules overlaping.  But more complex validation belongs further down in the stack in your domain layer.

I used to think the ideal situation would be domain rules bubbling up to the UI layer so they can be validated there, but now I&#039;m thinking this is just like having different models.  It&#039;s OK to have overlap if it&#039;s a separate concern.  Input validation and business rule validation are separate concerns to me.</description>
		<content:encoded><![CDATA[<p>I like this series, too.  Keep up the good work!</p>
<p>I am pretty close to where you are on validation, in that the duplication of validation rules is a big code smell for DRY.  But now I&#8217;m thinking of it like the domain model and form model.  There is overlap, sure, but the models serve different purposes and can be tailored to that purpose.  Form model validation is pretty much just input validation, with some business rules overlaping.  But more complex validation belongs further down in the stack in your domain layer.</p>
<p>I used to think the ideal situation would be domain rules bubbling up to the UI layer so they can be validated there, but now I&#8217;m thinking this is just like having different models.  It&#8217;s OK to have overlap if it&#8217;s a separate concern.  Input validation and business rule validation are separate concerns to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JeroenH</title>
		<link>http://blog.jorritsalverda.nl/2010/03/03/maintainable-mvc-series-viewmodel-and-formmodel/comment-page-1/#comment-19</link>
		<dc:creator>JeroenH</dc:creator>
		<pubDate>Fri, 05 Mar 2010 19:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jorritsalverda.nl/?p=178#comment-19</guid>
		<description>very interesting series!!</description>
		<content:encoded><![CDATA[<p>very interesting series!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

