<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Eric Hexter</title><link>http://www.lostechies.com/blogs/hex/default.aspx</link><description>Where the rubber meets the road.</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/EricHexter" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>Updated TDD Productivity Plug-in for Resharper</title><link>http://feedproxy.google.com/~r/EricHexter/~3/pdyTCOQY5Hk/updated-tdd-productivity-plug-in-for-resharper.aspx</link><pubDate>Wed, 01 Jul 2009 03:41:03 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22550</guid><dc:creator>erichexter</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=22550</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/30/updated-tdd-productivity-plug-in-for-resharper.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I first want to thank JetBrains for being pretty awesome.&amp;#160; I have complained a lot about how they are constantly chaining their APIs to Resharper and as a result it makes keeping plugins very hard to maintain but they went way out of their way to help.&amp;#160; I received and email from one of their developers offering to help on my plugin.&amp;#160; Their was a change made in the latest version of resharp which made my plugin incompatible&amp;#160; and their telemetry showed them a pattern with this problem.&amp;#160; Just this week they made a commit to the source code and updated the project.&amp;#160; I did not have the time to get into the internals of this change and I was really motivated by their help.&lt;/p&gt;  &lt;p&gt;As a result, if you were using the plugin I recommend you download the latest version and install it!&lt;/p&gt;  &lt;h4&gt;&lt;a href="http://code.google.com/p/resharper-tdd-productivity-plugin/" target="_blank"&gt;Download it Here&lt;/a&gt;&lt;/h4&gt;  &lt;p&gt;For those of you who do not use it yet I will run down the features that are available.&lt;/p&gt;  &lt;h3&gt;1. Code forward, create a class in a referenced project.&lt;/h3&gt;  &lt;p&gt;When prompted with Quick Fixes for a non-existent class You get the following menu.&amp;#160; This adds menu items to create the class in all referenced projects.( If this menu does not show up… you may need to add the project references to you unit test project).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_1CA2EF1F.png" width="1028" height="404" /&gt; &lt;/p&gt;  &lt;p&gt;After selecting a menu item.&amp;#160; The class is created in the project you selected but the IDE stays in your test class.&amp;#160; And you are prompted with the quick fix for adding the using for your classes namespace.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_4C7D90E0.png" width="1028" height="627" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The class file is created in the corresponding project under the correct folder and namespace.&amp;#160; It is that easy!&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_03776F1A.png" width="644" height="465" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;h3&gt;2. Move Class/Interface to referenced project&lt;/h3&gt;  &lt;p&gt;If you prefer working with your Class or Interface under test in the same file as your test class and move the class to your referenced project after you get your tests passing this feature will reduce the number of steps it takes to move the class to the referenced project. This eliminates the need to fumble around in the Solution Explorer window.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_2F47C309.png" width="1028" height="272" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22550" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/pdyTCOQY5Hk" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/agile/default.aspx">agile</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/testing/default.aspx">testing</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Tools/default.aspx">Tools</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Open+Source+Software/default.aspx">Open Source Software</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Unittests/default.aspx">Unittests</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Resharper/default.aspx">Resharper</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/TDD/default.aspx">TDD</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/30/updated-tdd-productivity-plug-in-for-resharper.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders – Part 9 override the default Date Time picker</title><link>http://feedproxy.google.com/~r/EricHexter/~3/DF5TGGyd_X8/opinionated-input-builders-part-9-override-the-default-date-time-picker.aspx</link><pubDate>Tue, 30 Jun 2009 13:07:23 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22523</guid><dc:creator>erichexter</dc:creator><slash:comments>7</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=22523</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/30/opinionated-input-builders-part-9-override-the-default-date-time-picker.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx"&gt;Part 1 – Overview&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx"&gt;Part 2 – the Labe&lt;/a&gt;l &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx"&gt;Part 3 – the Source Code&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx"&gt;Part 4 – the Partial View&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx"&gt;Part 5 – the Required Field Indicator&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx"&gt;Part 6 – the Performance&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/14/opinionated-input-builders-part-7-more-on-performance-take-2.aspx"&gt;Part 7 – the Performance Take 2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/17/opinionated-input-builders-part-8-the-auto-form.aspx"&gt;Part 8 – the AutoForm&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Part 9 – override the default Date Time Picker&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I received a comment from Scott Hanselman about how would a better date time picker look using the opinionated input builders.&amp;#160; I knew that this would be a complex problem just for the fact that there are currently very few good solutions to this problem now.&amp;#160; While JQuery provides a great Date picker I am not very happy with the time picker.&amp;#160; So&amp;#160; here is a version of what this could look like.&amp;#160; What I like about this approach is that it takes all the complexity including the multiple form elements and javascript and pushes it to a small partial that can be easily reused as well as it could be easily tested using QUnit.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The user interface I came up with is a combination of the Jquery UI datepicker and a set of dropdowns to select the time.&amp;#160; I trimmed down the minute select box so that it only contains fifteen minute increments for this example.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_393D72DF.png" width="616" height="174" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In order to implement this I added a call to the Partial( ) method and passed in the name of my opinion for how a datetime should be rendered.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_69844795.png" width="1145" height="167" /&gt; &lt;/p&gt;  &lt;p&gt;The next step was to add a partial control with the same name to my Shared view folder.&amp;#160; This could have been placed in the Home folder if I only wanted to have this input available for that controller.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_1D4C3DE7.png" width="245" height="357" /&gt; &lt;/p&gt;  &lt;p&gt;The code for the Partial view looks like the following. The view page is strongly typed to a DateTime model property. Than comes some jquery to pull it all together. &lt;/p&gt;  &lt;p&gt;I rendered a hidden field, this field will be used to databind when being posted back to my Save Action.&amp;#160; The other elements I appended some fixed names so that I can wire up an event that updates the hidden field when any of the values of the dropdowns or the date pickker text box changes.&amp;#160; I also write a dynamice method named after the input field in order to reduce the client side code.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_75398EC7.png" width="1028" height="429" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;This is one approach to solve this problem,&amp;#160; if you did not want to include this javascript and do the client side wire up of updating the hidden field this same work could be done in a Custom Model Binder that is wired up for DateTime objects that could look for fields with these names and than it could do the formatting.&amp;#160; So there you go a few ways to tackle this problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22523" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/DF5TGGyd_X8" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvc/default.aspx">mvc</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvccontrib/default.aspx">mvccontrib</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/OSS/default.aspx">OSS</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Open+Source+Software/default.aspx">Open Source Software</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/CoC/default.aspx">CoC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/30/opinionated-input-builders-part-9-override-the-default-date-time-picker.aspx</feedburner:origLink></item><item><title>Performance differences in the ASP.Net MVC View Engine when using two View Engines versus a single Composite View Engine.</title><link>http://feedproxy.google.com/~r/EricHexter/~3/RBHWk8xH398/performance-differences-in-the-asp-net-mvc-view-engine-when-using-two-view-engines-versus-a-single-composite-view-engine.aspx</link><pubDate>Fri, 19 Jun 2009 02:01:49 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22193</guid><dc:creator>erichexter</dc:creator><slash:comments>13</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=22193</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/18/performance-differences-in-the-asp-net-mvc-view-engine-when-using-two-view-engines-versus-a-single-composite-view-engine.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;While I was testing out my VirtualPathProvider implementation in the Opinionated Input Builders series I ran across an interesting performance difference which was quite surprising.&amp;#160; In fact even after looking at the source code to the MVC ViewEngineCollection it still seemed like this difference should not occur.&amp;#160; But it does and I am sure that we will get to the bottom of this.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Don’t go jumping to any conclusions just yet &lt;/strong&gt;about how this performs because the one common piece of functionality that these engines still rely on is a VirtualPathProvider that I implemented and I can honestly say I understand very little about how the VPP is used and how to ensure that it was implemented correctly to ensure maximum performance.&lt;/p&gt;  &lt;p&gt;The first part of this graph (the green line) shows the requests / second that I can get through my MVC view when using two ViewEngines, the default view engine to handle all requests to the /Views/{controller} and /Views{Shared} . The second view engine Handles all requests to my virtual path /Views/InputBuilders/ .&amp;#160; At the 7:50 mark I changed the flag and recompiled the application.&amp;#160; You see a small dip while the application restarts with the new code in place.&amp;#160; Now the application uses a single view engine that handles all the views for the default locations and my extra virtual path.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_3EB3F6FC.png" width="1028" height="480" /&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is the part of my codebase that shows the difference between adding my ViewEngine to the collection and Clearing the Collection and adding the view engine with parameters to handle the additional view locations.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_4898E867.png" width="1028" height="388" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The source code for the project I am testing is located here: &lt;a href="http://code.google.com/p/erichexter/downloads/detail?name=InputBuildersV4.zip&amp;amp;can=2&amp;amp;q=#makechanges"&gt;http://code.google.com/p/erichexter/downloads/detail?name=InputBuildersV4.zip&amp;amp;can=2&amp;amp;q=#makechanges&lt;/a&gt; incase you wish to try this out yourself.&amp;#160; The assumptions and environment settings are the same as they were in my previous post ( &lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx"&gt;http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx&lt;/a&gt; ).&lt;/p&gt;  &lt;p&gt;I would love to hear from someone who has an eye for performance tuning!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22193" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/RBHWk8xH398" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvc/default.aspx">mvc</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/testing/default.aspx">testing</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/x64/default.aspx">x64</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/IIS/default.aspx">IIS</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/18/performance-differences-in-the-asp-net-mvc-view-engine-when-using-two-view-engines-versus-a-single-composite-view-engine.aspx</feedburner:origLink></item><item><title>Making a Unit Test Framework agnostic Assertion in C#</title><link>http://feedproxy.google.com/~r/EricHexter/~3/1GyJZhNNwa0/making-a-unit-test-framework-agnostic-assertion-in-c.aspx</link><pubDate>Thu, 18 Jun 2009 17:49:48 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22181</guid><dc:creator>erichexter</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=22181</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/18/making-a-unit-test-framework-agnostic-assertion-in-c.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;At the beginning of the year I got some feedback that the assertions in the MvcContrib.TestHelper library were great and very useful but the problem with them is that we relyed on the NUnit assertions.&amp;#160; This was a problem for some users as they did not use nunit and did not want to include that dll in their codebase.&amp;#160; I also have been frustrated because NUnit is strongly named and since I am using other framework that add a little extra on top of nunit I have found that I know need to add all sorts of Assembly Redirect configuration in my app.config files in order to trick all&amp;#160; of the assemblies I am using to think they have the right version of NUnit.&amp;#160;&amp;#160; It is quite a big mess when you really think about it.&lt;/p&gt;  &lt;p&gt;So at the Alt.Net conference in Seattle I proposed a session to talk about Unit Test Framework agnostic assertions and helpers. I was quite lucky to have some very smart people in the room and on the kyte.tv feeds.&amp;#160; The end result that came out of the was this.&amp;#160; Just throw a custom exception and the test frameworks will pick it up.&amp;#160; I was told that this is how Rhino Mocks handles it’s assertions and that the test frameworks would eventually add my namespace to there code base so that the Call stack reported to the developer running his tests would not see the frames that were used internally by my assertions. Let me give you a visual so that it is a little easier to understand exactly what the problem is….&lt;/p&gt;  &lt;p&gt;The first line in this example shows a line that is from my special assertion code.&amp;#160; I do not want that to show up when a user runs a unit test with my assertion.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_78309898.png" width="1134" height="95" /&gt; &lt;/p&gt;  &lt;p&gt;Here is my little assertion helper example.&amp;#160; Since I just created a standard exception I got the default behavior.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_1E927BE4.png" width="1028" height="226" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The way to fix this is to throw a special exception which knows how to remove specific frames out of the call stack.&amp;#160; This code was adapted from the xUnit source code and is working quite well in the MvcContrib Test Helper Library&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_3D68EFC2.png" width="1028" height="571" /&gt; &lt;/p&gt;  &lt;p&gt;With some simple string manipulation of removing lines that contain the namespace of my exception it is really easy to reuse this exception in an Unit Test framework Agnostic helper library.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is the result of an assertion that failed using this assertion.&amp;#160; As you can see the test runner does not show lines that my assertion framework contain the call stack stops at the last line in my unit test code.&amp;#160; Which is exactly what we want.&amp;#160; That way there is no question as to where the developer using this needs to look to get information about the test failure.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_4192C787.png" width="1207" height="232" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;This code is located in the MvcContrib TestHelper library located at &lt;a href="http://MvcContrib.org"&gt;http://MvcContrib.org&lt;/a&gt; in case you want to dig deeper into the code.&amp;#160; I hope this helps others as it really took some time to get to this approach.. It seemed totally obvious to the developers of the unit test frameworks but for us mere mortals it took a little extra digging to really understand how the Unit Test runners work.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Comments .. Questions ???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22181" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/1GyJZhNNwa0" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvccontrib/default.aspx">mvccontrib</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/testing/default.aspx">testing</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Tools/default.aspx">Tools</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/altnetseattle/default.aspx">altnetseattle</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Unittests/default.aspx">Unittests</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/18/making-a-unit-test-framework-agnostic-assertion-in-c.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders – Part 8 the Auto Form</title><link>http://feedproxy.google.com/~r/EricHexter/~3/VQoR9IrbAUM/opinionated-input-builders-part-8-the-auto-form.aspx</link><pubDate>Wed, 17 Jun 2009 17:38:20 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22141</guid><dc:creator>erichexter</dc:creator><slash:comments>15</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=22141</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/17/opinionated-input-builders-part-8-the-auto-form.aspx#comments</comments><description>&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx" target="_blank"&gt;Part 1 – Overview&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx" target="_blank"&gt;Part 2 – the Labe&lt;/a&gt;l &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx" target="_blank"&gt;Part 3 – the Source Code&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx" target="_blank"&gt;Part 4 – the Partial View&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx" target="_blank"&gt;Part 5 – the Required Field Indicator&lt;/a&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx" target="_blank"&gt;Part 6 – the Performance&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/14/opinionated-input-builders-part-7-more-on-performance-take-2.aspx" target="_blank"&gt;Part 7 – the Performance Take 2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/17/opinionated-input-builders-part-8-the-auto-form.aspx" target="_blank"&gt;Part 8 – the AutoForm&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Once I defined what my the opinions for rendering each data type of my model as a form element it was a pretty trivial exercise to take this to the next level and render a default form for the model.&amp;#160; Just a single like in the view that walks over each property of the model and decides how it should render each property. Although this was not my goal of the builders it was a logical step to go from a pattern for each property to just enumerating all the properties.&amp;#160; I think this really shows the power of having the strongly typed view models. &lt;/p&gt;  &lt;p&gt;While I like this approach I would not stick to this as the only way to develop forms.&amp;#160; I would use an approach like this to take care of my initial CRUD type screens and allow this to quickly get my views hooked up to my controllers.&amp;#160; The next step is to have a clear and simple path for dealing with the case where the AutoForm does not work for a scenario.&amp;#160; Using some of the View Templates it is pretty trivial to generate a view or a partial that displays the view code to define each input individually so that they can be re ordered or have properties overridden.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Here is the form that is generated as well as the single line of view code that is used to create it.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_11C72ED6.png" width="1028" height="664" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Just to show how trivial it was to implement this functionality here is the section of code that is called to loop over each property of the model.&amp;#160; It would be pretty easy to modify this for your conventions to say add a Validation Summary to the top of the form.&amp;#160; This code simply loops of the properties of the Model Type and then renders the partial needed for each of the properties type.&amp;#160; Than a Submit Button is added and the form tag is closed.&amp;#160; Pretty simple.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_0B03FF86.png" width="1028" height="381" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22141" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/VQoR9IrbAUM" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/17/opinionated-input-builders-part-8-the-auto-form.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders  - Part 7 More on Performance / Take 2.</title><link>http://feedproxy.google.com/~r/EricHexter/~3/_YKfebJ7n0c/opinionated-input-builders-part-7-more-on-performance-take-2.aspx</link><pubDate>Sun, 14 Jun 2009 19:15:02 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22086</guid><dc:creator>erichexter</dc:creator><slash:comments>6</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=22086</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/14/opinionated-input-builders-part-7-more-on-performance-take-2.aspx#comments</comments><description>&lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx" target="_blank"&gt;Part 1 – Overview&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx" target="_blank"&gt;Part 2 – the Labe&lt;/a&gt;l &lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx" target="_blank"&gt;Part 3 – the Source Code&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx" target="_blank"&gt;Part 4 – the Partial View&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx" target="_blank"&gt;Part 5 – the Required Field Indicator&lt;/a&gt;&amp;#160; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx" target="_blank"&gt;Part 6 – the Performance&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;Part 7 – the Performance Take 2&lt;/li&gt;  &lt;p&gt;After doing what all good developers should do on the weekend… which is enjoy life and spend some time with my family, I thought I would take another stab at the Input Builder performance and see what else I could learn about the implementation.&amp;#160; That being said this is what I came up with.&amp;#160; &lt;/p&gt;  &lt;h3&gt;Want to get a 2X increase in 5 seconds of development time?&lt;/h3&gt;  &lt;p&gt;One of the features of the Builders that I like is the ability to deliver all of the partial views from a separate assembly that would make this library and approach feel more like a component with a single package for all of its files than a Hodge-podge of files you need to copy into your project.&amp;#160; That approach came at a cost.&amp;#160; My own implementation of the VirtualPathProvider proved to be disastrous on performance.&amp;#160; Below is the same performance test running against my sample page with the partial views and master pages copied into the local project and removing my implementation of the VirtualPathProvider.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_6B57133F.png" width="1028" height="182" /&gt;&lt;/p&gt;  &lt;p&gt;With this small 5 second change the Maximum Requests/Second went from &lt;strong&gt;442&lt;/strong&gt; to &lt;strong&gt;1,027&lt;/strong&gt; .&amp;#160; The Average Requests/Second went from &lt;strong&gt;351&lt;/strong&gt; to &lt;strong&gt;908&lt;/strong&gt;. Not bad huh?&amp;#160; So after a single change to the code base and removing my custom code for pulling partial views from the embedded resources,&amp;#160; I was able to get a huge performance increase.&amp;#160; &lt;/p&gt;  &lt;h3&gt;What are the next steps?&lt;/h3&gt;  &lt;p&gt; Since I still like the approach of having the virtual path provider I will spend a little time looking into how I can change the implementation so that it renders better performance.&amp;#160; Now that I have better performance out of the builders it will be good for me to take a 2nd pass with the profiler and see where the hot spots are.&amp;#160; My hunch is the bottle neck in this code is something that I wrote versus something that comes out of the box with the framework.&amp;#160;&amp;#160; So there will be more work to do on this front but at this point I am positive that I can overcome the performance aspects of this approach and I will concentrate on a few more posts which discuss more of the opinions as well as more of the implementation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22086" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/_YKfebJ7n0c" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvc/default.aspx">mvc</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvccontrib/default.aspx">mvccontrib</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/testing/default.aspx">testing</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/continous+improvement/default.aspx">continous improvement</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/OSS/default.aspx">OSS</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Open+Source+Software/default.aspx">Open Source Software</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/CoC/default.aspx">CoC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/14/opinionated-input-builders-part-7-more-on-performance-take-2.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders Part 6 – Performance of the builders</title><link>http://feedproxy.google.com/~r/EricHexter/~3/a9Fr_KuywOA/opinionated-input-builders-part-6-performance-of-the-builders.aspx</link><pubDate>Sat, 13 Jun 2009 17:15:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:22058</guid><dc:creator>erichexter</dc:creator><slash:comments>19</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=22058</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx#comments</comments><description>&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx" target="_blank"&gt;Part 1 – Overview&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx" target="_blank"&gt;Part 2 – the Labe&lt;/a&gt;l &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx" target="_blank"&gt;Part 3 – the Source Code&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx" target="_blank"&gt;Part 4 – the Partial View&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx" target="_blank"&gt;Part 5 – the Required Field Indicator&lt;/a&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;Part 6 – the Performance &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#ff0000"&gt;Update - 6/14/2009&lt;/font&gt; &lt;/b&gt;&lt;a href="http://www.lostechies.com/blogs/chad_myers/archive/2009/06/14/on-the-performance-of-opinionated-builders.aspx"&gt;Chad Myers blogged about the trade offs and the importance of productivity over premature optimizations&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Update 6 /14/2009&lt;/strong&gt;&amp;#160;&lt;/font&gt;– &lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/14/opinionated-input-builders-part-7-more-on-performance-take-2.aspx" target="_blank"&gt;Please see the second set of tests I ran for a large performance increase.&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Multiple people asked about the performance implications of using this style of input builders.&amp;#160; First let me say that as far as performance, using the partial views is probably the least efficient way to render html.&amp;#160; But with every approach there are tradeoffs. In this case we are trading run time performance for developer productivity and codebase and user interface consistency. That being said I cannot answer what the best approach is for you. That depends on the size of your team , the size of your project, the skill set of your team and a number of other aspects which determine what the best approach is.&amp;#160; For instance I would not use input builders or a MVC view if I was building a form to collect votes for American Idol.&amp;#160; I would actually create the forms in static html pages.&amp;#160; The scalability would require the best performing solution.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;The Control Test&lt;/h3&gt;  &lt;p&gt;With any good test you have to have a control case. In this case I ran a load test against an empty MVC view that was using the same Master Page as my form page.&amp;#160; I ran a constant load against that page in IIS 7, on a x64 Vista OS for 10 minutes.&amp;#160; The results is that I have a maximum Request / Second of &lt;strong&gt;1,622&lt;/strong&gt; and an Average Requests / Second of &lt;strong&gt;1,275&lt;/strong&gt;. You can see the chart below of the Requests/Second.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_20D7B973.png" width="1028" height="216" /&gt;&lt;/p&gt;  &lt;h3&gt;The Load Test&lt;/h3&gt;  &lt;p&gt;Next I ran the same test against the page I have used for all of the samples in this series.&amp;#160; With the same load , machine configuration, and duration as the control test.&amp;#160; In this case my Maximum Requests/Second was &lt;strong&gt;442&lt;/strong&gt; and the Average Requests/Second were &lt;strong&gt;351&lt;/strong&gt;.&amp;#160; What does that mean?&amp;#160; I lost &lt;strong&gt;75%&lt;/strong&gt; of my page request through put by using the Input Builders. Does this mean we should not use the input builders?&amp;#160; The answer is … it depends.&amp;#160; What through put do you need? From my experience I have found that most forms backed by a data store cannot scale to 400 Requets / Sec without some significant architectural principles in play.&amp;#160; Such as asynchronous messaging and other methods to scale.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_22A80F3A.png" width="1028" height="380" /&gt; &lt;/p&gt;  &lt;h3&gt;&amp;#160;&lt;/h3&gt;  &lt;h3&gt;What are the next steps for performance?&lt;/h3&gt;  &lt;p&gt;The next step for me is running the load test with a Profiler attached to the process.&amp;#160; I used the JetBrains Dot Trace application.&amp;#160; It is nice because after I run the profile session and analyze the data it has a quick and dirty Hot Spot report.&amp;#160; This show the single biggest offender of my codebase.&amp;#160; This means that if I optimize the code below that will have the biggest improvement for performance.&amp;#160; It is a combination of the time it takes to execute this code combined with the number of times this code path is executed.&amp;#160; That being said, lets dig into it.&amp;#160; &lt;/p&gt;  &lt;p&gt;The 3rd call in this stack is part of the RenderPartial call I do not totally understand the internals of the MVC view engine and I will not pretend to. If I really wanted to see more it would make sense to pull down the MVC source code and build it with is symbol files, than the profiler could give me more information.&amp;#160; So what I am surprised by is that my hunch when first thinking about performance would have taken me to the reflection and Lamda Expression code, but this test shows that the biggest bottle neck is in the control / partial rendering.&amp;#160; So by using this tool I have saved myself a huge headache by preventing myself from optimizing the wrong code.&amp;#160; At this point I am going to put this information together and get it in front of those in the .Net Community who are way smarter than I am and of course, get it to the brainiacs at Microsoft who wrote this stuff to suggest some approaches for better performance . They know their internal benchmarks as well as what they are planning for the future.&amp;#160; &lt;/p&gt;  &lt;p&gt;The biggest lesson I can demonstrate here is do not pre optimize.&amp;#160; I already wasted 20 minutes of my time and Jimmy Bogard’s time talking about different ways to optimize Lambda Expressions.&amp;#160; It is clear that implementing those optimizations would not make a single difference in effecting the output of this performance test. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_737623A2.png" width="1028" height="269" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;&lt;/h3&gt;  &lt;h3&gt;Should you use the builders?&lt;/h3&gt;  &lt;p&gt;Well that decision is really up to you, but I hoped that I demonstrated a scientific approach to answering that question. For me the componentization of the HTML and the productivity increases of using the builders far outweigh the runtime performance issues.&amp;#160; Again, I would take this on a case by case basis and when I need more throughput than what I can provide with this approach I would consider a different method of mark up generation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=22058" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/a9Fr_KuywOA" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvccontrib/default.aspx">mvccontrib</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/CoC/default.aspx">CoC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx</feedburner:origLink></item><item><title>Free ASP.Net MVC Workshop in Austin on Tuesday June 16th</title><link>http://feedproxy.google.com/~r/EricHexter/~3/erAjwA9K2Yk/free-asp-net-mvc-workshop-in-austin-on-tuesday-june-16th.aspx</link><pubDate>Thu, 11 Jun 2009 13:32:07 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21809</guid><dc:creator>erichexter</dc:creator><slash:comments>2</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=21809</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/11/free-asp-net-mvc-workshop-in-austin-on-tuesday-june-16th.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I am doing a half day workshop at the Microsoft Office in Austin around ASP.Net MVC.&amp;#160; I did this in February with &lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/" target="_blank"&gt;Jimmy Bogard&lt;/a&gt; and we had about 90 people show up, it was a pretty good event. We will cover a lot of what we have learned using the framework on a number of large enterprise project at &lt;a href="http://www.headspringsystems.com" target="_blank"&gt;Headspring Systems&lt;/a&gt;.&amp;#160; This time I am doing the workshop with &lt;a href="http://jeffreypalermo.com/" target="_blank"&gt;Jeffrey Palermo&lt;/a&gt; and we will cover a portion of the presentation he gave to the Austin Code Camp.&amp;#160; After that I think I will dive into some features around getting things done with the framework.&amp;#160; See Jeffrey’s &lt;a href="http://jeffreypalermo.com/blog/afternoon-of-asp-net-mvc-16-june-free-headspring-event/" target="_blank"&gt;post&lt;/a&gt; for some more details.&lt;/p&gt;  &lt;p&gt;To Register go here: &lt;a href="http://www.headspringsystems.com/services/agile-training/mvc-training/"&gt;&lt;font size="4"&gt;http://www.headspringsystems.com/services/agile-training/mvc-training/&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21809" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/erAjwA9K2Yk" height="1" width="1"/&gt;</description><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/11/free-asp-net-mvc-workshop-in-austin-on-tuesday-june-16th.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders for ASP.Net MVC – Part 5 the Required input</title><link>http://feedproxy.google.com/~r/EricHexter/~3/8eafRJfuunM/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx</link><pubDate>Thu, 11 Jun 2009 02:58:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21760</guid><dc:creator>erichexter</dc:creator><slash:comments>32</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=21760</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx#comments</comments><description>&lt;ul&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx"&gt;Part 1 &amp;ndash; Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx"&gt;Part 2 &amp;ndash; the Labe&lt;/a&gt;l&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx"&gt;Part 3 &amp;ndash; the Source Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a target="_blank" href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx"&gt;Part 4 &amp;ndash; the Partial View&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Part 5 &amp;ndash; the Required Field Indicator &lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;The Required Field Indicator&lt;/h3&gt;
&lt;p&gt;   &lt;br /&gt;The Required Field Indicator is a property which allows the UI to indicate that a field is required.&amp;nbsp; The example below shows that an&amp;nbsp;asterisk&amp;nbsp;could be used to indicated the field is required. This could be used to apply a css class to the Label which could change the color or bold the label.&amp;nbsp; The possibilities for how you turn this property into a compelling user interface is endless. The important point to know is that there are different approaches to decide how this could be set.&lt;/p&gt;
&lt;p&gt;&lt;img height="343" width="644" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_596CFF37.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Model Approach&lt;/h3&gt;
&lt;p&gt;Here is an example of using a DataAnnotations Required attribute as a way to indicate the field is required.&amp;nbsp; I like this approach since this attribute can be used with a &lt;a target="_blank" href="http://www.asp.net/learn/mvc/tutorial-39-cs.aspx"&gt;Model Binder to perform Model Validation using model state&lt;/a&gt;.&amp;nbsp;&amp;nbsp; This model binder will be provided in the ASP.Net MVC 2.0 release so I included this as a way to get synergy with existing features of the MVC framework.&lt;/p&gt;
&lt;p&gt;&lt;img height="352" width="644" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_71906992.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt; &lt;/p&gt;
&lt;p&gt; I have received a lot of feed back that people feel marking your model with attributes pollutes the model.&amp;nbsp; I disagree with this because the models that I use are View Models not my Domain entities which represent my business object which will be stored into my database.&amp;nbsp; The Models that I would decorate with validation attributes would be used for one specific MVC View.&amp;nbsp; The model would represent the fields needed to create the User Interface view.&amp;nbsp; &lt;/p&gt;
&lt;h3&gt;Fluent Approach&lt;/h3&gt;
&lt;p&gt;   &lt;br /&gt;An alternative approach to using attributes would&amp;nbsp; be to use a Fluent method as shown below. I dislike this approach as it does not work with my preferred way of performing data type validation using the MVC Model Binder. in the framework. I would be more likely to use the fluent methods for the Label or PartialView selection, but I would not use it for the Required indicator because it would mean I am duplicating how I identify a required property on my Model.&lt;/p&gt;
&lt;p&gt;&lt;img height="337" width="644" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_3081EA2E.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt; &lt;/p&gt;
&lt;h3&gt;The View markup&lt;/h3&gt;
&lt;p&gt;   &lt;br /&gt; Here is an example of how the Required property is used in the Field.Master master page.&amp;nbsp; As I wrote earlier, this could be used to add a css class to the html markup.&lt;/p&gt;
&lt;p&gt;&lt;img height="214" width="644" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_7A30C21E.png" alt="image" border="0" title="image" style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" /&gt;&lt;/p&gt;
&lt;h3&gt;Your own convention&lt;/h3&gt;
&lt;p&gt;The framework uses a convention to determine if a Model property is required.&amp;nbsp; By implementing your own &lt;strong&gt;&lt;em&gt;PropertyIsRequiredConvention&lt;/em&gt;&lt;/strong&gt; you could make all Properties with the name &lt;strong&gt;Name &amp;amp; Description &lt;/strong&gt;required or&amp;nbsp; whatever makes sense for the type of application that you are creating. It could be &lt;strong&gt;Username or email&lt;/strong&gt; if you are creating a consumer facing website the possibilities are endless. But at the end of the day you can have your own convention.&lt;/p&gt;
&lt;p&gt;&lt;img height="299" width="1028" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_6E2ED1EA.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt; &lt;/p&gt;
&lt;p&gt;Here is the implementation of my Default Convention for Property Is Required, it is simple and to the point.&amp;nbsp; I could see implementing some sort of Chain of Responsibility pattern here and in the other conventions to have some consistency to your User Interface. &lt;/p&gt;
&lt;p&gt;&lt;img height="122" width="644" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_66372F88.png" alt="image" border="0" title="image" style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" /&gt; &lt;/p&gt;
&lt;p&gt;Thoughts&amp;hellip; opinions..?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21760" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/8eafRJfuunM" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvccontrib/default.aspx">mvccontrib</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/CoC/default.aspx">CoC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders for ASP.Net MVC – Part 4 the Partial View Inputs</title><link>http://feedproxy.google.com/~r/EricHexter/~3/Y_AIwzl2xMs/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx</link><pubDate>Wed, 10 Jun 2009 15:00:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21687</guid><dc:creator>erichexter</dc:creator><slash:comments>24</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=21687</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx#comments</comments><description>&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx" target="_blank"&gt;Part 1 – Overview&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx" target="_blank"&gt;Part 2 – the Labe&lt;/a&gt;l&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx" target="_blank"&gt;Part 3 – the Source Code&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx" target="_blank"&gt;Part 4 – the Partial View&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx" target="_blank"&gt;Part 5 – the Required Field Indicator&lt;/a&gt;&amp;#160; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This is the forth part of the series.&amp;#160; &lt;/p&gt;  &lt;p&gt;Given this form that is generated by the input builders the partials for each data type of the Model are selected by the builder based on a simple convention.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_4376DF07.png" width="644" height="362" /&gt;     &lt;br /&gt;    &lt;br /&gt;Each partial control is selected using the following convention:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The type of the property is used to find a Partial View by the same name. &lt;/li&gt;    &lt;li&gt;If the partial does not exist in the /Views/Shared/ directory it is pulled from an embedded resource from the Input Builder assembly.&amp;#160; This allows you to override the conventions of the framework with your own. &lt;/li&gt;    &lt;li&gt;If a PartialView Attribute is applied to a property it is used to override the previous conventions. &lt;/li&gt;    &lt;li&gt;Display a partial using a Chained Method on the Input() method UsingPartial( partialName ) &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Looking at the types of the model you can see that the Enum partial will render a Select element by default.&amp;#160; The PartialView(“RadioButtons”) attribute was applied to override the default and have the build render the RadioButtons.aspx partial view.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_09879C1B.png" width="644" height="471" /&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is an example of using the Chained Method override instead of using an attribute based approach.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_60530D1B.png" width="875" height="295" /&gt; &lt;/p&gt;  &lt;p&gt;This convention of utilizing the partial views allows the separation of concerns (SoC) of the markup from the conventions which determine which partial to render.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What if you do not like the convention ????? &lt;/strong&gt;&amp;#160; Each part of the UI model is extensible.&amp;#160; There are two conventions that are at play here.&amp;#160; The selection of the partial view and the selection of the data that is used by the controls to display the possible selections.&amp;#160; This is shown for the enum data types which allows the select and radio button inputs to display a list of possible values.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The ModelPropertyFactory class calls two methods to execute the conventions.&amp;#160; The ParialNameConvention and ModelPropertyBuilder by using the static Func fields this will allow your project to define your own conventions if you do not like mine.&amp;#160; This is an important extensibility point that gives the great flexibility to this approach.&amp;#160; There are conventions like this for each of the elements used within the partials.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_0843033C.png" width="1028" height="264" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21687" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/Y_AIwzl2xMs" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvccontrib/default.aspx">mvccontrib</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/CoC/default.aspx">CoC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders for ASP.Net MVC – Part 3 the source code.</title><link>http://feedproxy.google.com/~r/EricHexter/~3/0L_vFR-MQKc/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx</link><pubDate>Wed, 10 Jun 2009 13:36:50 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21725</guid><dc:creator>erichexter</dc:creator><slash:comments>21</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=21725</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx#comments</comments><description>&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx" target="_blank"&gt;Part 1 – Overview&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx" target="_blank"&gt;Part 2 – the Labe&lt;/a&gt;l&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx" target="_blank"&gt;Part 3 – the Source Code&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx" target="_blank"&gt;Part 4 – the Partial View&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx" target="_blank"&gt;Part 5 – the Required Field Indicator&lt;/a&gt;&amp;#160;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;There have been a number of requests for me to provide the source for the input builders.&amp;#160; I consider this code to be a prototype because, I expect to change the API as this post series helps me work out what should be supported.&amp;#160; I have full intention to add this code to the MvcContrib project once I get the appropriate feedback and documentation as a result of fleshing out this post series.&lt;/p&gt;  &lt;p&gt;With that being said the source code is located here: There is only V1 up there now but I expect to have some iterations pretty quickly.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.google.com/p/erichexter/downloads/list?q=label:Inputbuilder"&gt;http://code.google.com/p/erichexter/downloads/list?q=label:Inputbuilder&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;ASP.Net MVC 1.0 &lt;/li&gt;    &lt;li&gt;Visual Studio 2008 &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Solution Structure:&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The solution is structured into two projects.&amp;#160; The InputBuilder project is what I would see providing as a dll in the future.&amp;#160; The web project is a MVC web application that shows how to use the InputBuilders as well as override markup for the builders. &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_11ABA974.png" width="240" height="474" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21725" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/0L_vFR-MQKc" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/CoC/default.aspx">CoC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders for ASP.Net MVC - Part 2 Html Layout for the Label</title><link>http://feedproxy.google.com/~r/EricHexter/~3/xggLNy4AngQ/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx</link><pubDate>Wed, 10 Jun 2009 01:26:02 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21681</guid><dc:creator>erichexter</dc:creator><slash:comments>33</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=21681</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx#comments</comments><description>&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx" target="_blank"&gt;Part 1 – Overview&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx" target="_blank"&gt;Part 2 – the Labe&lt;/a&gt;l &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx" target="_blank"&gt;Part 3 – the Source Code&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx" target="_blank"&gt;Part 4 – the Partial View&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx" target="_blank"&gt;Part 5 – the Required Field Indicator&lt;/a&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx" target="_blank"&gt;Part 6 – the Performance&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/14/opinionated-input-builders-part-7-more-on-performance-take-2.aspx" target="_blank"&gt;Part 7 – the Performance Take 2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/17/opinionated-input-builders-part-8-the-auto-form.aspx" target="_blank"&gt;Part 8 – the AutoForm&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;In part two of this series I will cover the different components of the Input as it is rendered to HTML and explain how each of those are created by the Input Builder.&lt;/p&gt;  &lt;p&gt;Given the following form layout I will explain each feature of the input builder framework.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image5_5F00_5EF6F85B.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image_thumb2" border="0" alt="image_thumb2" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_thumb2_5F00_7DCD6C39.png" width="644" height="346" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h2&gt;the Label&lt;/h2&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="inputbuilder-label" border="0" alt="inputbuilder-label" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/inputbuilder_2D00_label_5F00_43DE294D.png" width="561" height="309" /&gt;&lt;/p&gt;  &lt;p&gt;The text highlighted in red are labels that come from the Model type. The label is created from the PropertyInfo object that represents the respective properties of the mode.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The label is Property Name. &lt;/li&gt;    &lt;li&gt;The label is the Property Name that is split on the pascal case property name. &lt;/li&gt;    &lt;li&gt;The label is specified by using the Label Attribute applied to the property. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="inputbuilder-label-model" border="0" alt="inputbuilder-label-model" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/inputbuilder_2D00_label_2D00_model_5F00_554E8A25.png" width="626" height="453" /&gt; &lt;/p&gt;  &lt;p&gt;The html for the label is created in a Content control of the Field.Master Master Page. That control is highlighted in red.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="inputbuilder-label-masterpage" border="0" alt="inputbuilder-label-masterpage" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/inputbuilder_2D00_label_2D00_masterpage_5F00_46A3DE40.png" width="803" height="394" /&gt;&lt;/p&gt;  &lt;p&gt;That explains how the labels are rendered to the html for the builder.&amp;#160; There will be more posts in this series to explain the other conventions followed by the Input Builders.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is part 2 in the series.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx" target="_blank"&gt;Part 1 – Introduction to the Input Builder&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21681" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/xggLNy4AngQ" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/CoC/default.aspx">CoC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx</feedburner:origLink></item><item><title>Opinionated Input Builders for ASP.Net MVC using partials – Part 1</title><link>http://feedproxy.google.com/~r/EricHexter/~3/vEEaIPwm7Jg/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx</link><pubDate>Tue, 09 Jun 2009 16:21:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21666</guid><dc:creator>erichexter</dc:creator><slash:comments>48</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=21666</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx#comments</comments><description>&lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx" target="_blank"&gt;Part 1 – Overview&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-part-2-html-layout-for-the-label.aspx" target="_blank"&gt;Part 2 – the Labe&lt;/a&gt;l &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-source-code.aspx" target="_blank"&gt;Part 3 – the Source Code&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-3-the-partial-view-inputs.aspx" target="_blank"&gt;Part 4 – the Partial View&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/10/opinionated-input-builders-for-asp-net-mvc-part-5-the-required-input.aspx" target="_blank"&gt;Part 5 – the Required Field Indicator&lt;/a&gt;&amp;#160; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/13/opinionated-input-builders-part-6-performance-of-the-builders.aspx" target="_blank"&gt;Part 6 – the Performance&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/14/opinionated-input-builders-part-7-more-on-performance-take-2.aspx" target="_blank"&gt;Part 7 – the Performance Take 2&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.lostechies.com/blogs/hex/archive/2009/06/17/opinionated-input-builders-part-8-the-auto-form.aspx" target="_blank"&gt;Part 8 – the AutoForm&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;It has taken a while to really understand how different pieces and ideas can fit together to give a concise and productive form input helpers for the asp.net mvc framework. I have pulled together this idea from the following sources:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;“opinionated input builders” that &lt;a href="http://codebetter.com/blogs/jeremy.miller/" target="_blank"&gt;Jeremy Miller&lt;/a&gt; and &lt;a href="http://www.lostechies.com/blogs/chad_myers/" target="_blank"&gt;Chad Myers&lt;/a&gt; presented at the &lt;a href="http://www.kaizenconf.com/" target="_blank"&gt;Kaizen Conference&lt;/a&gt; in Austin last year, &lt;/li&gt;    &lt;li&gt;The work that &lt;a href="http://www.headspringsystems.com" target="_blank"&gt;Headspring Systems&lt;/a&gt; (&lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/default.aspx" target="_blank"&gt;Jimmy Bogard&lt;/a&gt; and &lt;a href="http://mhinze.com/" target="_blank"&gt;Matt Hinze&lt;/a&gt;) has done with that concept on some of our big projects. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://bradwilson.typepad.com/" target="_blank"&gt;Brad Wilson’s&lt;/a&gt; sample of how &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=18803" target="_blank"&gt;Dynamic Data Could work on Asp.Net MVC&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Convention Over Configuration – Ruby on Rails and Jeremy Miller &lt;/li&gt;    &lt;li&gt;Creating partial views as aspx pages with their own nested master pages via &lt;a href="http://www.jeffreypalermo.com" target="_blank"&gt;Jeffrey Palermo&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;The strongly typed helpers from &lt;a href="http://www.mvccontrib.org" target="_blank"&gt;MVC Contrib&lt;/a&gt; and the &lt;a href="http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24471" target="_blank"&gt;MVC Futures&lt;/a&gt; work that the MVC Team has put together. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Now that I have given credit to everyone who has helped me get to the point of understanding how to pull of these pieces together.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;h2&gt;The Model comes first.&lt;/h2&gt;  &lt;p&gt;The goal of these control helpers is to reward you for developing MVC with the Model first.&amp;#160; Yeah there is a reason that &lt;strong&gt;Model View Controller&lt;/strong&gt; starts with the &lt;strong&gt;Model&lt;/strong&gt;. Using the strongly typed views in the aspx view engine we can carry the type down to the control helpers with intellisense and then build html input control based on conventions for rendering specific CLR types to specific HTML output.&amp;#160; Now my biggest problem with the ways that this has been attempted to date is that once helpers started to take on more mark up beyond the &amp;lt; input &amp;gt; tag it was hard to modify as that markup ended up being written in code rather than in a view file.&amp;#160; This is where I abstracted the mark up and the logic to decide which markup to render so that there is a solution that is easy to maintain the markup and it is easy to add new conventions or change the conventions for how a particular type or model property is rendered to a control.&lt;/p&gt;  &lt;p&gt;First here is an example of a model rendered in a strongly typed view and the markup used to create this.&amp;#160; There are attributes applied to the model to add some specific control over how the UI is rendered. It is important to call out that in this case I have built a (view) Model specifically to represent a single view.&amp;#160; I do not intend to reuse this model in another views.&amp;#160; I think trying to get reuse out of models is a mistake in most circumstances, it is better to keep your model clean so that it represents exactly what you want for the View.&amp;#160; Each of these attributes are used by my conventions to decide which Partial View to render.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image9_5F00_23E0A376.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image9_5F00_thumb_5F00_48FDEDE2.png" width="585" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This is the example of the view page which is rendering the view and the markup used to create this.&amp;#160; The Html.Input uses the LamdaExpression syntax to declare which property needs and input.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_0D5DDF22.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_thumb_5F00_24A8E393.png" width="886" height="772" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;It is important to call out that the Guid property is rendered as a Hidden input tag and that is why it does not show up in the UI. This is a model element that is used to carry state in the form between posts.&lt;/p&gt;  &lt;h2&gt;Walkthrough of the Html.Input( ) method&lt;/h2&gt;  &lt;p&gt;The syntax for calling into the input method uses a lamda expression like so…..&amp;#160; This has full intelisense support.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_53AB1F6A.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_thumb_5F00_2C70D635.png" width="566" height="41" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The helper determines that since the Name is a string data type it decides by convention to render this property using the String.aspx partial view.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_00C00C39.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_thumb_5F00_473CFC41.png" width="566" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here is the markup of the String.aspx partial view.&amp;#160; As you can see it uses a Master Page to control how its label and input is rendered.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_5D4367D3.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_thumb_5F00_470D4C81.png" width="1028" height="286" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Here is the Field.Master Master Page this controls the layout of the input, label, example text, and validation message. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_2BF47D73.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" border="0" alt="image" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/image_5F00_thumb_5F00_712CD49C.png" width="1036" height="427" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;More to come soon.. What do you like… what do you dislike?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21666" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/vEEaIPwm7Jg" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/mvccontrib/default.aspx">mvccontrib</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net+MVC/default.aspx">Asp.Net MVC</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/CoC/default.aspx">CoC</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/06/09/opinionated-input-builders-for-asp-net-mvc-using-partials-part-i.aspx</feedburner:origLink></item><item><title>The Flat Tire Principle for Source Control</title><link>http://feedproxy.google.com/~r/EricHexter/~3/7vArKLLzrBU/the-flat-tire-principal-for-source-control.aspx</link><pubDate>Tue, 19 May 2009 03:24:00 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21079</guid><dc:creator>erichexter</dc:creator><slash:comments>4</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=21079</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/05/18/the-flat-tire-principal-for-source-control.aspx#comments</comments><description>&lt;p&gt;There is a strange correlation between automobiles and line of business software applications when it comes to performing some standard repairs.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/flattire1_5F00_579293A6.jpg"&gt;&lt;img border="0" align="right" width="244" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/flattire1_5F00_thumb_5F00_3947DCB0.jpg" alt="flat-tire1" height="190" style="border-right:0px;border-top:0px;display:inline;margin:0px 0px 0px 25px;border-left:0px;border-bottom:0px;" title="flat-tire1" /&gt;&lt;/a&gt;Consider the following scenario, you are happily working away at your job or out dining with your friends or family and when you come out to your vehicle, it has a flat tire.&amp;nbsp; While this does not happen that often, it is a pretty common&amp;nbsp; occurrence.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/ysod_5F00_305ADB22.jpg"&gt;&lt;img border="0" align="left" width="362" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/ysod_5F00_thumb_5F00_7FC75D69.jpg" alt="ysod" height="283" style="border-right:0px;border-top:0px;display:inline;margin:0px 20px 0px 0px;border-left:0px;border-bottom:0px;" title="ysod" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This common occurrence can look like this in an ASP.Net application&amp;hellip;. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/FlatTire_5F00_3AAE9033.jpg"&gt;&lt;img border="0" align="left" width="244" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/FlatTire_5F00_thumb_5F00_2A361F38.jpg" alt="FlatTire" height="184" style="border-right:0px;border-top:0px;display:inline;margin:5px 20px 10px 0px;border-left:0px;border-bottom:0px;" title="FlatTire" /&gt;&lt;/a&gt; In fact it is so likely to happen that most (if not all) automobile manufactures include the necessary equipment to keep you moving along when this happens.&amp;nbsp; So where in your trunk or hidden under your seats are usually a spare tire. a jack, a wrench, and in some cases a special adaptor to loosen on special lock lug nut.&amp;nbsp; The lock lug nut is a lug nut that is specific to each manufacturer and is meant to deter criminals from stealing your tires.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/forester_5F00_wheel_5F00_lock_5F00_3A44EDEF.jpg"&gt;&lt;img border="0" align="right" width="184" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/forester_5F00_wheel_5F00_lock_5F00_thumb_5F00_15472D76.jpg" alt="forester_wheel_lock" height="244" style="border-right:0px;border-top:0px;display:inline;margin:0px 0px 0px 25px;border-left:0px;border-bottom:0px;" title="forester_wheel_lock" /&gt;&lt;/a&gt;After a little work you can get your tire replaced or if you do not feel handy enough you can call for some help to get your spare tire put on and your flat tire put into your trunk so that you can get to a repair station.&amp;nbsp; Once you get to a repair station they will ask for your lock nut.&amp;nbsp; The repair stations do not want spend the time working with the wrong tools to get your new tire on.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;This is where I can relate this analogy back to software.&amp;nbsp; I consider all of those &lt;strong&gt;3rd part controls&lt;/strong&gt;, &lt;strong&gt;open source libraries &lt;/strong&gt;and tools the &lt;strong&gt;lock nuts &lt;/strong&gt;of software.&amp;nbsp; We call these lock nuts &lt;strong&gt;system dependencies&lt;/strong&gt;.&amp;nbsp; You must handle all of your dependencies with extreme care.&amp;nbsp; All of these tools can prevent your ability to maintain a software system in the future.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/flattire_5F00_1783B632.jpg"&gt;&lt;img border="0" align="left" width="244" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/flattire_5F00_thumb_5F00_3902E5C1.jpg" alt="flat-tire" height="172" style="border-right:0px;border-top:0px;display:inline;margin:0px 25px 0px 0px;border-left:0px;border-bottom:0px;" title="flat-tire" /&gt;&lt;/a&gt; Why?&amp;nbsp; If you do not keep your dependencies in your source control tree than when it comes time to build your software after you rebuild your machine or when it comes time to fix a bug brought on by environmental changes this simple thing can turn an easy fix into an impossible task.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/codecamptrunk_5F00_3015E433.jpg"&gt;&lt;img border="0" align="right" width="404" src="http://www.lostechies.com/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/hex/codecamptrunk_5F00_thumb_5F00_39057672.jpg" alt="codecamptrunk" height="381" style="border-right:0px;border-top:0px;display:inline;margin-left:0px;border-left:0px;margin-right:0px;border-bottom:0px;" title="codecamptrunk" /&gt;&lt;/a&gt; The fix to this problem is pretty simple.. Grab all of those evil 3rd party assemblies and specific versions of libraries and include them in your source control tree.&amp;nbsp; Here is the /lib folder of the CodeCampServer project.&amp;nbsp; This seems like such a simple little thing yet so many developers make the mistake of ignoring their dependencies and instead&amp;nbsp; keep relying on remembering where they put the installer for the specific version of a control their project needs which is sitting on the company file server.&amp;nbsp; I cringe thinking about all the developers who will stumble on this code years down the road. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21079" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/7vArKLLzrBU" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/c_2300_/default.aspx">c#</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/agile/default.aspx">agile</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Asp.Net/default.aspx">Asp.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Tools/default.aspx">Tools</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Open+Source+Software/default.aspx">Open Source Software</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/05/18/the-flat-tire-principal-for-source-control.aspx</feedburner:origLink></item><item><title>Big Props to the Codeplex team!</title><link>http://feedproxy.google.com/~r/EricHexter/~3/6YsAmr0pS6Y/big-props-to-the-codeplex-team.aspx</link><pubDate>Sun, 17 May 2009 03:09:58 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21038</guid><dc:creator>erichexter</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://www.lostechies.com/blogs/hex/rsscomments.aspx?PostID=21038</wfw:commentRss><comments>http://www.lostechies.com/blogs/hex/archive/2009/05/16/big-props-to-the-codeplex-team.aspx#comments</comments><description>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;A month back I was on a mission to get a feature included in Codeplex that would allow my projects to better support the companies which fund my projects.&amp;#160; I reached out to the community to help vote this feature up from somewhere in the lower 400s to the number one (1) position.&amp;#160; The Codeplex team implemented the feature and pushed it live in the matter of weeks.&amp;#160; I talked with one of the team members at Teched and they told me the feature would have made it up a week earlier but there was an across the board focus from the company to test out their latest product.&lt;/p&gt;  &lt;p&gt;&amp;#160; I was so glad to have such an awesome response from the team.. I have hosted Open Source projects on Codeplex , Google Code and Source Forge and I must say I have never had this type of interaction with Google Code or Source Forge.&amp;#160; While I dislike the source control system&amp;#160; with Codeplex, I have to say that to have a team that is that focused and transparent is just awesome.&amp;#160; So… huge props to Codeplex.&amp;#160; Having a team that is willing actually listen to the users is a huge reason to consider codeplex for your open source projects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21038" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/EricHexter/~4/6YsAmr0pS6Y" height="1" width="1"/&gt;</description><category domain="http://www.lostechies.com/blogs/hex/archive/tags/.Net/default.aspx">.Net</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/OSS/default.aspx">OSS</category><category domain="http://www.lostechies.com/blogs/hex/archive/tags/Open+Source+Software/default.aspx">Open Source Software</category><feedburner:origLink>http://www.lostechies.com/blogs/hex/archive/2009/05/16/big-props-to-the-codeplex-team.aspx</feedburner:origLink></item></channel></rss>
