<?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: Opinionated Input Builders for ASP.Net MVC – Part 5 the Required input</title>
	<atom:link href="http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jun 2013 06:32: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: erichexter</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-166</link>
		<dc:creator>erichexter</dc:creator>
		<pubDate>Sat, 27 Jun 2009 20:54:11 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-166</guid>
		<description>@sean, you would need to implement your own convention and wire it in at application start up.  The convention would use service location to create a class that can look into web context and determine the user of the current request and than return the appropriate value.</description>
		<content:encoded><![CDATA[<p>@sean, you would need to implement your own convention and wire it in at application start up.  The convention would use service location to create a class that can look into web context and determine the user of the current request and than return the appropriate value.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-165</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Sat, 27 Jun 2009 18:38:45 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-165</guid>
		<description>How would the attribute-based approach extend to situations where you wanted to make required&#124;NOTrequired configurable based on the user role, or perhaps even at an application instance level?</description>
		<content:encoded><![CDATA[<p>How would the attribute-based approach extend to situations where you wanted to make required|NOTrequired configurable based on the user role, or perhaps even at an application instance level?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erichexter</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-164</link>
		<dc:creator>erichexter</dc:creator>
		<pubDate>Fri, 26 Jun 2009 01:13:01 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-164</guid>
		<description>@Scott in this sample I am actually using the DataAnnotations Model Binder and the preview of the DataAnnotations dll from the Mvc Release on codeplex.  I wanted to demonstrate that this method of implementing the Opinions lets the developer choose their approach and use this framework to plug in an attribute based approach or a code based approach.  I think that which ever approach is used it has to be tied into the validation and model binder.</description>
		<content:encoded><![CDATA[<p>@Scott in this sample I am actually using the DataAnnotations Model Binder and the preview of the DataAnnotations dll from the Mvc Release on codeplex.  I wanted to demonstrate that this method of implementing the Opinions lets the developer choose their approach and use this framework to plug in an attribute based approach or a code based approach.  I think that which ever approach is used it has to be tied into the validation and model binder.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Hanselman</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-163</link>
		<dc:creator>Scott Hanselman</dc:creator>
		<pubDate>Thu, 25 Jun 2009 22:57:28 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-163</guid>
		<description>Wouldn&#039;t you then need to create or extend the DefaultModelBinder to make sure that the length, required, and other attributes on the ViewModel are respected on the way IN to a method after a POST?</description>
		<content:encoded><![CDATA[<p>Wouldn&#8217;t you then need to create or extend the DefaultModelBinder to make sure that the length, required, and other attributes on the ViewModel are respected on the way IN to a method after a POST?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erichexter</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-162</link>
		<dc:creator>erichexter</dc:creator>
		<pubDate>Wed, 17 Jun 2009 16:51:17 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-162</guid>
		<description>@Roberto,  This is on my list to implement.  I could see the convention calling into a chain of responsibilities provider that could decide to pull the appropriate data from a repository.  that being said I do need to get that example put in so that it is clear how to extend it and get some feedback to improve on the design.</description>
		<content:encoded><![CDATA[<p>@Roberto,  This is on my list to implement.  I could see the convention calling into a chain of responsibilities provider that could decide to pull the appropriate data from a repository.  that being said I do need to get that example put in so that it is clear how to extend it and get some feedback to improve on the design.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roberto Hernandez</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-161</link>
		<dc:creator>Roberto Hernandez</dc:creator>
		<pubDate>Wed, 17 Jun 2009 15:35:40 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-161</guid>
		<description>You are missing the classical DropDownList using referencial data from a data store.  I know that it can be done using the partial views scenario, but I still would love to see a good sample on how to implement it and how it affects the design of your ViewModel.

Regards,

Roberto.-</description>
		<content:encoded><![CDATA[<p>You are missing the classical DropDownList using referencial data from a data store.  I know that it can be done using the partial views scenario, but I still would love to see a good sample on how to implement it and how it affects the design of your ViewModel.</p>
<p>Regards,</p>
<p>Roberto.-</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erichexter</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-160</link>
		<dc:creator>erichexter</dc:creator>
		<pubDate>Fri, 12 Jun 2009 00:17:17 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-160</guid>
		<description>@Tad there has been zero performance work done on this so far. As they stand i am sure that their are some areas that would not scale very well under high load.  I still need to address that but I am certain that with some profiling the any performance problems could be worked through so that the gain in productivity and consistency of your application will far out weigh the performance penalty you pay for using this type of control selection.

Under the hood the code goes through the lambda expressions and than uses reflection to get the value of the property from the model. I know there are performance penalties with this type of access. I also know that their are a few different ways to overcome this through IL generation and caching of compiled expressions. So in the long term I am not worried because there are some well defined ways to deal with those issues.  But until I do the performance testing I do not want to start optimizing any of the code.</description>
		<content:encoded><![CDATA[<p>@Tad there has been zero performance work done on this so far. As they stand i am sure that their are some areas that would not scale very well under high load.  I still need to address that but I am certain that with some profiling the any performance problems could be worked through so that the gain in productivity and consistency of your application will far out weigh the performance penalty you pay for using this type of control selection.</p>
<p>Under the hood the code goes through the lambda expressions and than uses reflection to get the value of the property from the model. I know there are performance penalties with this type of access. I also know that their are a few different ways to overcome this through IL generation and caching of compiled expressions. So in the long term I am not worried because there are some well defined ways to deal with those issues.  But until I do the performance testing I do not want to start optimizing any of the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tad</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-159</link>
		<dc:creator>Tad</dc:creator>
		<pubDate>Thu, 11 Jun 2009 22:11:59 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-159</guid>
		<description>What are the performance implications of that opinionated helpers?</description>
		<content:encoded><![CDATA[<p>What are the performance implications of that opinionated helpers?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: erichexter</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-158</link>
		<dc:creator>erichexter</dc:creator>
		<pubDate>Thu, 11 Jun 2009 17:43:39 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-158</guid>
		<description>@Bill Barry If you look in the source code I have one view which has the following form &lt;%=Html.InputForm(&quot;Home&quot;,&quot;Save&quot;)%&gt; The Model does not have to be specified as it can be obtained from the HtmlHelper.  I am not sure what part of the series I will get to that one but I do have it working.. It was a natural progression once the other pieces of the builder came together.</description>
		<content:encoded><![CDATA[<p>@Bill Barry If you look in the source code I have one view which has the following form < %=Html.InputForm("Home","Save")%> The Model does not have to be specified as it can be obtained from the HtmlHelper.  I am not sure what part of the series I will get to that one but I do have it working.. It was a natural progression once the other pieces of the builder came together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bill Barry</title>
		<link>http://lostechies.com/erichexter/2009/06/11/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input/#comment-157</link>
		<dc:creator>Bill Barry</dc:creator>
		<pubDate>Thu, 11 Jun 2009 16:14:33 +0000</pubDate>
		<guid isPermaLink="false">/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comment-157</guid>
		<description>I agree, which is why I would use just the first bit from my example. Unfortunately not everybody thinks like I do.
The part I am talking about to suggest that this is all that should be done for 90% of all forms:
&lt;%=Html.ValidationSummary()%&gt;
This sample demonstrates ...
&lt;% Html.Form&lt;SimpleModel&gt;(&quot;save&quot;, &quot;home&quot;); %&gt;


perhaps with default values being provided:
&lt;% Html.Form(&quot;save&quot;, &quot;home&quot;, Model); %&gt;
</description>
		<content:encoded><![CDATA[<p>I agree, which is why I would use just the first bit from my example. Unfortunately not everybody thinks like I do.<br />
The part I am talking about to suggest that this is all that should be done for 90% of all forms:<br />
< %=Html.ValidationSummary()%><br />
This sample demonstrates &#8230;<br />
< % Html.Form<SimpleModel>(&#8220;save&#8221;, &#8220;home&#8221;); %></p>
<p>perhaps with default values being provided:<br />
< % Html.Form("save", "home", Model); %></p>
]]></content:encoded>
	</item>
</channel>
</rss>
