<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>.net and other musings &#187; ASP.NET</title>
	<atom:link href="http://benl.wordpress.com/category/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://benl.wordpress.com</link>
	<description>Ben Lovell, an agile developer living in the UK.</description>
	<lastBuildDate>Thu, 16 Jul 2009 09:43:48 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='benl.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/43c6fe283d98c1764e951cd6dfface61?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>.net and other musings &#187; ASP.NET</title>
		<link>http://benl.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://benl.wordpress.com/osd.xml" title=".net and other musings" />
		<item>
		<title>Incremental development with Monorail: Part Seven</title>
		<link>http://benl.wordpress.com/2008/05/15/incremental-development-with-monorail-part-seven/</link>
		<comments>http://benl.wordpress.com/2008/05/15/incremental-development-with-monorail-part-seven/#comments</comments>
		<pubDate>Thu, 15 May 2008 17:11:54 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Monorail]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[TestDrivenDevelopment]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windsor]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2008/05/15/incremental-development-with-monorail-part-seven/</guid>
		<description><![CDATA[Since our last installment I slipped in a ninja-edit to one of the configuration files. This was to ensure that our sole service was marked as transient rather than the default Windsor lifestyle of singleton. This was pointed out to me by an eagle-eyed commenter and was an oversight on my part. So we&#8217;re now [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=385&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Since our last installment I slipped in a ninja-edit to one of the configuration files. This was to ensure that our sole service was marked as transient rather than the default Windsor lifestyle of singleton. This was pointed out to me by an <a href="http://justinram.wordpress.com/">eagle-eyed commenter</a> and was an oversight on my part. So we&#8217;re now at rev10 and ready to roll once again!</p>
<p>In our last post we tidied up a few bits and improved our code-base rather than actually adding features as such. This time we&#8217;re going to move down into the persistence and start to drive out this notional layer.</p>
<p>We&#8217;re going to handle data access using the repository pattern. The repositories will work on our ActiveRecord entities ensuring they&#8217;re persisted to our database. We will introduce a new interaction between our service <strong>BlogPostService </strong>and the newly introduced repository interface <strong>IBlogPostRepository</strong>. Let&#8217;s get on and write a test:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/71.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="407" alt="71" src="http://benl.files.wordpress.com/2008/05/71-thumb.png?w=508&#038;h=407" width="508" border="0"></a> </p>
<p>The test above is fairly self-explanatory. We&#8217;ve introduced the <strong>IBlogPostRepository </strong>and we&#8217;re passing it into our <strong>BlogPostService </strong>which should then call the <strong>Save </strong>method passing our mapped <strong>post</strong>. We need to get rid of the red code and get the test passing, so first we must create our new interface, and then modify the service constructor:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/72.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="77" alt="72" src="http://benl.files.wordpress.com/2008/05/72-thumb.png?w=508&#038;h=77" width="508" border="0"></a> </p>
<p><a href="http://benl.files.wordpress.com/2008/05/73.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="118" alt="73" src="http://benl.files.wordpress.com/2008/05/73-thumb.png?w=508&#038;h=118" width="508" border="0"></a> </p>
<p>We need to modify our other tests that construct the <strong>BlogPostService </strong>as they&#8217;re still assuming only a single argument constructor exists. As we have some duplication going on we&#8217;ll push this construction up into our setup code:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/74.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="282" alt="74" src="http://benl.files.wordpress.com/2008/05/74-thumb.png?w=508&#038;h=282" width="508" border="0"></a> </p>
<p>We should be able to run our tests in this fixture now:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/75.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="143" alt="75" src="http://benl.files.wordpress.com/2008/05/75-thumb.png?w=508&#038;h=143" width="508" border="0"></a> </p>
<p>As expected, since our <strong>BlogPostService </strong>doesn&#8217;t actually do much with our repository yet, we need to do some pretty minor tweaking to pass this test:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/76.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="113" alt="76" src="http://benl.files.wordpress.com/2008/05/76-thumb.png?w=508&#038;h=113" width="508" border="0"></a></p>
<p>Let&#8217;s try again now:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/77.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="56" alt="77" src="http://benl.files.wordpress.com/2008/05/77-thumb.png?w=508&#038;h=56" width="508" border="0"></a>&nbsp; Cool, let us try and run the whole suite including our integration type tests:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/78.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="138" alt="78" src="http://benl.files.wordpress.com/2008/05/78-thumb.png?w=508&#038;h=138" width="508" border="0"></a> </p>
<p>The integration tests are failing as we&#8217;ve yet to map the new dependency in our Windsor configuration. We can specify this now:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/79.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="54" alt="79" src="http://benl.files.wordpress.com/2008/05/79-thumb.png?w=508&#038;h=54" width="508" border="0"></a> </p>
<p>We still have failing integration tests though, so we need to add the <strong>BlogPostRepository</strong> specified in our configuration:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/80.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="142" alt="80" src="http://benl.files.wordpress.com/2008/05/80-thumb.png?w=508&#038;h=142" width="508" border="0"></a> </p>
<p>As you can see it doesn&#8217;t do much, but we just want our tests passing at this stage. Let&#8217;s run the whole suite of tests now:</p>
<p><a href="http://benl.files.wordpress.com/2008/05/81.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="30" alt="81" src="http://benl.files.wordpress.com/2008/05/81-thumb.png?w=476&#038;h=30" width="476" border="0"></a> </p>
<p>Great, we have a working product once more. I&#8217;m going to finish here, as ever, the latest changes have been committed:</p>
<p><a title="http://code.google.com/p/mr-blogengine/" href="http://code.google.com/p/mr-blogengine/">http://code.google.com/p/mr-blogengine/</a></p>
<p>Next time we&#8217;ll make our new repository more useful and <em>finally </em>hit the database!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/385/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/385/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/385/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=385&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2008/05/15/incremental-development-with-monorail-part-seven/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/71-thumb.png" medium="image">
			<media:title type="html">71</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/72-thumb.png" medium="image">
			<media:title type="html">72</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/73-thumb.png" medium="image">
			<media:title type="html">73</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/74-thumb.png" medium="image">
			<media:title type="html">74</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/75-thumb.png" medium="image">
			<media:title type="html">75</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/76-thumb.png" medium="image">
			<media:title type="html">76</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/77-thumb.png" medium="image">
			<media:title type="html">77</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/78-thumb.png" medium="image">
			<media:title type="html">78</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/79-thumb.png" medium="image">
			<media:title type="html">79</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/80-thumb.png" medium="image">
			<media:title type="html">80</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/05/81-thumb.png" medium="image">
			<media:title type="html">81</media:title>
		</media:content>
	</item>
		<item>
		<title>MVC Storefront</title>
		<link>http://benl.wordpress.com/2008/04/29/mvc-storefront/</link>
		<comments>http://benl.wordpress.com/2008/04/29/mvc-storefront/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 07:20:57 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Castle]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Monorail]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[TestDrivenDevelopment]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2008/04/29/mvc-storefront/</guid>
		<description><![CDATA[Rob Conery has been posting a series of screencasts featuring the development of an ASP.NET MVC based product catalogue. This is being carried out in a &#8220;TDD&#8221; like fashion. The interesting difference between his posts and mine (apart from the obvious fact that I&#8217;m lazy and haven&#8217;t screencasted&#8230; yet) is that he starts from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=339&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://blog.wekeroad.com/" target="_blank">Rob Conery</a> has been posting a <a href="http://blog.wekeroad.com/mvc-storefront/mvcstore-part-6/" target="_blank">series of screencasts</a> featuring the development of an ASP.NET MVC based product catalogue. This is being carried out in a &#8220;TDD&#8221; like fashion. The interesting difference between his posts and mine (apart from the obvious fact that I&#8217;m lazy and haven&#8217;t screencasted&#8230; yet) is that he starts from the bottom of the stack and works upwards towards the UI where as I do the opposite.</p>
<p>Its interesting contrasting the two approaches not to mention the differences between the ASP.NET MVC framework and Castle Monorail way of getting things done.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/339/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/339/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/339/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/339/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/339/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=339&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2008/04/29/mvc-storefront/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Incremental development with Monorail: Part Five</title>
		<link>http://benl.wordpress.com/2008/04/24/incremental-development-with-monorail-part-five/</link>
		<comments>http://benl.wordpress.com/2008/04/24/incremental-development-with-monorail-part-five/#comments</comments>
		<pubDate>Thu, 24 Apr 2008 20:20:29 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[Monorail]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[TestDrivenDevelopment]]></category>
		<category><![CDATA[Windsor]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2008/04/24/incremental-development-with-monorail-part-five/</guid>
		<description><![CDATA[Welcome back. In this post I&#8217;ll be getting our tests passing again and cleaning things up a little. We left off with a failing integration test:
 
I suspect this is due to the IBlogPostMapper dependency we introduced to our BlogPostService not being handled by the container. If we run in the browser we can confirm [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=338&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Welcome back. In this post I&#8217;ll be getting our tests passing again and cleaning things up a little. We left off with a failing integration test:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/421.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="125" alt="42" src="http://benl.files.wordpress.com/2008/04/42-thumb1.png?w=508&#038;h=125" width="508" border="0"></a> </p>
<p>I suspect this is due to the <strong>IBlogPostMapper </strong>dependency we introduced to our <strong>BlogPostService </strong>not being handled by the container. If we run in the browser we can confirm this is in fact true:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="315" alt="" src="http://benl.files.wordpress.com/2008/04/thumb.png?w=504&#038;h=315" width="504" border="0"></a> </p>
<p>As we&#8217;ve yet to implement our <strong>IBlogPostMapper </strong>we must go ahead and do this before we can add the container configuration to pass our integration test. Lets bust out a test and get things rolling:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/43.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="462" alt="43" src="http://benl.files.wordpress.com/2008/04/43-thumb.png?w=508&#038;h=462" width="508" border="0"></a> </p>
<p>We have a few blanks to fill in in order to get this to compile and run:</p>
<ol>
<li>Make the DTO&#8217;s properties virtual so we can mock them. This is in preference to extracting an interface<strong>. </strong></li>
<li>Implement <strong>IBlogPostMapper</strong>.</li>
<li>Add the necessary properties to the <strong>IBlogPost </strong>interface.</li>
</ol>
<p>Lets go ahead and do this now:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/44.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="438" alt="44" src="http://benl.files.wordpress.com/2008/04/44-thumb.png?w=508&#038;h=438" width="508" border="0"></a></p>
<p><strong>IBlogPostMapper </strong>minimal implementation:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/45.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="162" alt="45" src="http://benl.files.wordpress.com/2008/04/45-thumb.png?w=508&#038;h=162" width="508" border="0"></a>&nbsp; </p>
<p>The necessary modifications to <strong>IBlogPost</strong>:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/46.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="167" alt="46" src="http://benl.files.wordpress.com/2008/04/46-thumb.png?w=508&#038;h=167" width="508" border="0"></a> </p>
<p>Now we can compile and run our test:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/47.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="95" alt="47" src="http://benl.files.wordpress.com/2008/04/47-thumb.png?w=508&#038;h=95" width="508" border="0"></a> </p>
<p>Our <strong>BlogPostMapper </strong>implementation is throwing an exception so lets go back and take another step to try and pass our test:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/48.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="133" alt="48" src="http://benl.files.wordpress.com/2008/04/48-thumb.png?w=508&#038;h=133" width="508" border="0"></a> </p>
<p><strong>BlogPost</strong>:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/49.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="418" alt="49" src="http://benl.files.wordpress.com/2008/04/49-thumb.png?w=508&#038;h=418" width="508" border="0"></a> </p>
<p>I&#8217;m pretty certain we&#8217;ve done enough to pass our test now. Lets have a go:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/50.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="38" alt="50" src="http://benl.files.wordpress.com/2008/04/50-thumb.png?w=508&#038;h=38" width="508" border="0"></a> </p>
<p>OK now lets focus on the full suite:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/51.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="129" alt="51" src="http://benl.files.wordpress.com/2008/04/51-thumb.png?w=508&#038;h=129" width="508" border="0"></a> </p>
<p>Our integration test is still bombing but as we&#8217;ve got a mapper now, we can go ahead and wire up our Windsor configuration and get things moving again:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/52.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="84" alt="52" src="http://benl.files.wordpress.com/2008/04/52-thumb.png?w=508&#038;h=84" width="508" border="0"></a> </p>
<p>We&#8217;ve added another configuration file: <strong>mapper.config</strong> and referenced this from the <strong>web.config</strong>. We shouldn&#8217;t need to do any more than this so lets run our full test suite:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/53.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="28" alt="53" src="http://benl.files.wordpress.com/2008/04/53-thumb.png?w=508&#038;h=28" width="508" border="0"></a> </p>
<p>Our full suite is passing now. Not bad for 5 minutes work! As usual the latest changes are checked in to the <a href="http://code.google.com/p/mr-blogengine/" target="_blank">Google code project hosted here.</a></p>
<p>Now we have a full passing suite, in our next edition I&#8217;ll be moving down into the persistence and also incorporating a <a href="http://hammett.castleproject.org/?p=280" target="_blank">few modifications from Hammett</a>. Stay tuned!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/338/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/338/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=338&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2008/04/24/incremental-development-with-monorail-part-five/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/42-thumb1.png" medium="image">
			<media:title type="html">42</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/thumb.png" medium="image" />

		<media:content url="http://benl.files.wordpress.com/2008/04/43-thumb.png" medium="image">
			<media:title type="html">43</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/44-thumb.png" medium="image">
			<media:title type="html">44</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/45-thumb.png" medium="image">
			<media:title type="html">45</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/46-thumb.png" medium="image">
			<media:title type="html">46</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/47-thumb.png" medium="image">
			<media:title type="html">47</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/48-thumb.png" medium="image">
			<media:title type="html">48</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/49-thumb.png" medium="image">
			<media:title type="html">49</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/50-thumb.png" medium="image">
			<media:title type="html">50</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/51-thumb.png" medium="image">
			<media:title type="html">51</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/52-thumb.png" medium="image">
			<media:title type="html">52</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/53-thumb.png" medium="image">
			<media:title type="html">53</media:title>
		</media:content>
	</item>
		<item>
		<title>Incremental development with Monorail: Part Three</title>
		<link>http://benl.wordpress.com/2008/04/01/incremental-development-with-monorail-part-three/</link>
		<comments>http://benl.wordpress.com/2008/04/01/incremental-development-with-monorail-part-three/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 16:49:13 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[DDD]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Domain Driven Design]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Monorail]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2008/04/01/incremental-development-with-monorail-part-three/</guid>
		<description><![CDATA[Part OnePart Two
In the last instalment we finished up with a suite of passing tests. However, we&#8217;ve yet to produce anything remotely usable so lets continue by reaching down further and driving out our services/persistence. We&#8217;ll start by writing the following test:
 
We&#8217;ve meddled with our test setup a little to introduce the MockRepository for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=296&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://benl.wordpress.com/2008/03/27/incremental-development-with-monorail/">Part One</a><br /><a href="http://benl.wordpress.com/2008/03/27/incremental-development-with-monorail-part-two/">Part Two</a></p>
<p>In the last instalment we finished up with a suite of passing tests. However, we&#8217;ve yet to produce anything remotely usable so lets continue by reaching down further and driving out our services/persistence. We&#8217;ll start by writing the following test:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/23.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="478" alt="23" src="http://benl.files.wordpress.com/2008/04/23-thumb.png?w=508&#038;h=478" width="508" border="0"></a> </p>
<p>We&#8217;ve meddled with our test setup a little to introduce the <strong>MockRepository </strong>for mocking out our <strong>PostController&#8217;s</strong> new dependency on the <strong>IBlogPostService. </strong>Our test now calls the <strong>AddPost </strong>method on our service interface and sets up the resulting <strong>AddPostResponseDto</strong>. Running the test produces a bunch of compiler whinging so we best implement the newly introduced bits:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/24.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="99" alt="24" src="http://benl.files.wordpress.com/2008/04/24-thumb.png?w=508&#038;h=99" width="508" border="0"></a></p>
<p><a href="http://benl.files.wordpress.com/2008/04/25.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="309" alt="25" src="http://benl.files.wordpress.com/2008/04/25-thumb.png?w=508&#038;h=309" width="508" border="0"></a>&nbsp; </p>
<p><a href="http://benl.files.wordpress.com/2008/04/26.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="181" alt="26" src="http://benl.files.wordpress.com/2008/04/26-thumb.png?w=508&#038;h=181" width="508" border="0"></a> </p>
<p>These are the only changes and additions we&#8217;ve made in order for the tests to compile and run. Running our test now produces the following result:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/27.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="27" alt="27" src="http://benl.files.wordpress.com/2008/04/27-thumb.png?w=508&#038;h=27" width="508" border="0"></a> </p>
<p>As we&#8217;ve yet to modify the <strong>PostController.Save(&#8230;) </strong>call to include a call the newly introduced <strong>IBlogPostService </strong>dependency. Lets go ahead and do this now:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/28.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="144" alt="28" src="http://benl.files.wordpress.com/2008/04/28-thumb.png?w=508&#038;h=144" width="508" border="0"></a> </p>
<p>We&#8217;ve now included the call to our newly introduced service and we set the <strong>responseMessage </strong>if the response is signaled as successful. Lets run our test now:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/29.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="24" alt="29" src="http://benl.files.wordpress.com/2008/04/29-thumb.png?w=495&#038;h=24" width="495" border="0"></a> </p>
<p>It works, ship it! Actually no, again we&#8217;re pretty low on <em>actual </em>functionality right now. Remember we&#8217;ve yet to actually drive out any implementation of the <strong>IBlogPostService </strong>interface as yet and I expect that the acceptance test will fail horribly since we didn&#8217;t wire up the necessary container configuration either. Lets go ahead and run the whole test suite and see what gives:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/30.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="132" alt="30" src="http://benl.files.wordpress.com/2008/04/30-thumb.png?w=508&#038;h=132" width="508" border="0"></a> </p>
<p>In the brief moments the browser appears during the test we can see the following:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/31.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="407" alt="31" src="http://benl.files.wordpress.com/2008/04/31-thumb.png?w=508&#038;h=407" width="508" border="0"></a> </p>
<p>Hmm, as I predicted earlier our application fails to run due to the lack of proper container configuration. Before we can do this we need to implement the <strong>IBlogPostService </strong>interface somewhere. We need to write a failing test to begin our foray into the implementation of a <strong>BlogPostService</strong>:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/32.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="124" alt="32" src="http://benl.files.wordpress.com/2008/04/32-thumb.png?w=508&#038;h=124" width="508" border="0"></a> </p>
<p>Lets create the <strong>BlogPostService </strong>only performing the steps necessary to pass the test above:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/33.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="184" alt="33" src="http://benl.files.wordpress.com/2008/04/33-thumb.png?w=508&#038;h=184" width="508" border="0"></a> </p>
<p>Run the test:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/34.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="19" alt="34" src="http://benl.files.wordpress.com/2008/04/34-thumb.png?w=508&#038;h=19" width="508" border="0"></a> </p>
<p>Now we have a working <strong>BlogPostService </strong>we can now wire up our container configuration to pass the acceptance test:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/35.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="86" alt="35" src="http://benl.files.wordpress.com/2008/04/35-thumb.png?w=508&#038;h=86" width="508" border="0"></a> </p>
<p>Now running the full suite of tests produces the following:</p>
<p><a href="http://benl.files.wordpress.com/2008/04/36.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="36" alt="36" src="http://benl.files.wordpress.com/2008/04/36-thumb.png?w=508&#038;h=36" width="508" border="0"></a> </p>
<p>Our tests pass!</p>
<p>That&#8217;s it for this post. I&#8217;ve checked in the latest changes to the repository. In the next post we&#8217;ll continue our efforts and begin to implement validation on our screen-bound DTO&#8217;s.</p>
<p>Google code hosted project: <a title="http://code.google.com/p/mr-blogengine/" href="http://code.google.com/p/mr-blogengine/">http://code.google.com/p/mr-blogengine/</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/296/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/296/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/296/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=296&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2008/04/01/incremental-development-with-monorail-part-three/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/23-thumb.png" medium="image">
			<media:title type="html">23</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/24-thumb.png" medium="image">
			<media:title type="html">24</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/25-thumb.png" medium="image">
			<media:title type="html">25</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/26-thumb.png" medium="image">
			<media:title type="html">26</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/27-thumb.png" medium="image">
			<media:title type="html">27</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/28-thumb.png" medium="image">
			<media:title type="html">28</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/29-thumb.png" medium="image">
			<media:title type="html">29</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/30-thumb.png" medium="image">
			<media:title type="html">30</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/31-thumb.png" medium="image">
			<media:title type="html">31</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/32-thumb.png" medium="image">
			<media:title type="html">32</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/33-thumb.png" medium="image">
			<media:title type="html">33</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/34-thumb.png" medium="image">
			<media:title type="html">34</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/35-thumb.png" medium="image">
			<media:title type="html">35</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2008/04/36-thumb.png" medium="image">
			<media:title type="html">36</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft MVC next week?</title>
		<link>http://benl.wordpress.com/2007/11/29/microsoft-mvc-next-week/</link>
		<comments>http://benl.wordpress.com/2007/11/29/microsoft-mvc-next-week/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 19:24:18 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[2008]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/11/29/microsoft-mvc-next-week/</guid>
		<description><![CDATA[Some news if you haven&#8217;t read it elsewhere: the ASP.NET 3.5 extensions CTP is due for release at some point next week. My primary interest being MVC by far, then Astoria I guess.
I can&#8217;t wait to start fiddling with the MVC framework. Good work Microsoft!
Check out ScottGu&#8217;s post here for more information.
    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=133&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some news if you haven&#8217;t read it elsewhere: the ASP.NET 3.5 extensions CTP is due for release at some point next week. My primary interest being MVC by far, then Astoria I guess.</p>
<p>I can&#8217;t wait to start fiddling with the MVC framework. Good work Microsoft!</p>
<p>Check out <a href="http://weblogs.asp.net/scottgu/archive/2007/11/29/net-web-product-roadmap-asp-net-silverlight-iis7.aspx" target="_blank">ScottGu&#8217;s post here</a> for more information.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/133/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/133/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/133/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/133/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/133/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=133&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/11/29/microsoft-mvc-next-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET Development Landscape</title>
		<link>http://benl.wordpress.com/2007/10/11/aspnet-development-landscape/</link>
		<comments>http://benl.wordpress.com/2007/10/11/aspnet-development-landscape/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 22:33:49 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Castle]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Monorail]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/10/11/aspnet-development-landscape/</guid>
		<description><![CDATA[With all the System.Web.Mvc goodness flying around at the moment, the Microsoft or nothing shops (you know, the ones that flat-out can&#8217;t adopt a technology unless it comes from the borg) might finally get a taste of how web development should be done. Unfortunately for the aforementioned reason, Monorail has never be an option for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=131&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>With all the System.Web.Mvc goodness flying around at the moment, the Microsoft or nothing shops (you know, the ones that flat-out can&#8217;t adopt a technology unless it comes from the borg) might finally get a taste of how web development should be done. Unfortunately for the aforementioned reason, Monorail has never be an option for those developers.</p>
<p>The one thing that really excites me about MSMVC is the periphery of concepts that will be introduced by way of association: deep testability, SRP, DIP and SoC. Traditionally these practices aren&#8217;t promoted (or I might go so far as say <em>easily achieved</em>) heavily in the .NET technologies and frameworks coming out of Microsoft. As we&#8217;re focusing on ASP.NET at the moment, sure, they&#8217;re possible to adhere to whether you&#8217;re using ASP.NET in the presentation layer or not, but ASP.NET doesn&#8217;t <strong>promote</strong> them the same way the MVC framework will.</p>
<p>I can&#8217;t help but wonder how different the landscape might be now if MSMVC was released with .NET 1.0 instead of webforms?</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/131/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/131/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/131/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/131/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/131/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=131&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/10/11/aspnet-development-landscape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Microsoft MVC Framework</title>
		<link>http://benl.wordpress.com/2007/10/07/microsoft-mvc-framework/</link>
		<comments>http://benl.wordpress.com/2007/10/07/microsoft-mvc-framework/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 14:30:40 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[ALT.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Castle]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Monorail]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/10/07/microsoft-mvc-framework/</guid>
		<description><![CDATA[Some of you may be aware of the ALT.net conference going on this weekend. I wasn&#8217;t particularly interested in a gathering of egos in mutual back-slapping, but I was interested in the announcement of the System.Web.MVC framework from Microsoft.
This has been on the cards for a while and had kinda been announced a while back [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=123&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some of you may be aware of the ALT.net conference going on this weekend. I wasn&#8217;t particularly interested in a gathering of egos in mutual back-slapping, but I was interested in the announcement of the System.Web.MVC framework from Microsoft.</p>
<p>This has been on the cards for a while and had kinda been announced a while back by Scott Guthrie. Since then not much detail has been uncovered other than a one or two hires for the dev team (from what I&#8217;ve heard from my sources <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p>Jeffrey Palermo announced some of the technical details in <a href="http://codebetter.com/blogs/jeffrey.palermo/archive/2007/10/05/altnetconf-scott-guthrie-announces-asp-net-mvc-framework-at-alt-net-conf.aspx" target="_blank">this blog post</a>, although light in actual substance, yet giving us more idea than anything released previously.</p>
<p>Some of the key things of note:</p>
<ul>
<li>Testability: the key concern. Overcome by making everything virtual/behind interfaces and extension points abound.</li>
<li>Ability to plug-in to framework via aforementioned extension points. Gives us the ability to add extra view-engines a la Monorail.</li>
<li>Default view-engine implementation using ASPX without postback and viewstate pain.</li>
<li>Controllers can be resolved from a container i.e. Windsor, Spring.net etc.</li>
</ul>
<p>A CTP is due towards the end of the year (Monorail will suffice just fine until, and probably far after then) and the framework is slated for release with VS2008 as an add-on to the general release. </p>
<p>Some of the things I&#8217;ll be interested in seeing are whether the following are supported:</p>
<ul>
<li>Handling devices, i.e. sniffing user agent and providing different views. Something just recently provided in patch form to Monorail. </li>
<li>The MSMVC equivalent of Monorail&#8217;s ViewComponent concept.</li>
<li>Routing and URL rewriting support.</li>
<li>Monorail Helper equivalent.</li>
<li>AJAX support.</li>
</ul>
<p>It has been mentioned that some of the plumbing may be used to reduce the Monorail codebase. Now that could be interesting&#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/123/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/123/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/123/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/123/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/123/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=123&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/10/07/microsoft-mvc-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows Vista and IIS Features (or lack of)</title>
		<link>http://benl.wordpress.com/2007/08/15/windows-vista-and-iis-features-or-lack-of/</link>
		<comments>http://benl.wordpress.com/2007/08/15/windows-vista-and-iis-features-or-lack-of/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 12:43:45 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/08/15/windows-vista-and-iis-features-or-lack-of/</guid>
		<description><![CDATA[Damn. I&#8217;m late to the party and I&#8217;ve only just recently started using Vista for development. One thing I&#8217;ve just stumbled across is that you can&#8217;t debug ASP.NET applications with IIS7 on Vista Home Premium, as Windows Authentication is disabled and cannot be enabled in this SKU. Hmmm, upgrade here I come.
    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=107&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Damn. I&#8217;m late to the party and I&#8217;ve only just recently started using Vista for development. One thing I&#8217;ve just stumbled across is that you can&#8217;t debug ASP.NET applications with IIS7 on Vista Home Premium, as Windows Authentication is disabled and cannot be enabled in this SKU. Hmmm, upgrade here I come.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/107/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/107/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=107&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/08/15/windows-vista-and-iis-features-or-lack-of/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Agile project management with StoryVerse</title>
		<link>http://benl.wordpress.com/2007/06/28/agile-project-management-with-storyverse/</link>
		<comments>http://benl.wordpress.com/2007/06/28/agile-project-management-with-storyverse/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 12:48:03 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Castle]]></category>
		<category><![CDATA[Monorail]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/06/28/agile-project-management-with-storyverse/</guid>
		<description><![CDATA[If you&#8217;re practicing agile project management&#160;take a look at StoryVerse &#8211; an open source agile project management application built on Monorail and ActiveRecord.
 
In particular I like the no-fuss UI. Very reminiscent of&#160;Google UI. Anyway take a look.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=104&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you&#8217;re practicing agile project management&nbsp;take a look at <a href="http://code.google.com/p/storyverse/" target="_blank">StoryVerse</a> &#8211; an open source agile project management application built on Monorail and ActiveRecord.</p>
<p><a href="http://benl.files.wordpress.com/2007/06/storydetail.jpg"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" height="240" alt="StoryDetail" src="http://benl.files.wordpress.com/2007/06/storydetail-thumb.jpg?w=236&#038;h=240" width="236" border="0"></a> </p>
<p>In particular I like the no-fuss UI. Very reminiscent of&nbsp;Google UI. Anyway take a look.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/104/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/104/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/104/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/104/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/104/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=104&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/06/28/agile-project-management-with-storyverse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>

		<media:content url="http://benl.files.wordpress.com/2007/06/storydetail-thumb.jpg" medium="image">
			<media:title type="html">StoryDetail</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick SmartDispatcherController tip</title>
		<link>http://benl.wordpress.com/2007/06/28/quick-smartdispatchercontroller-tip/</link>
		<comments>http://benl.wordpress.com/2007/06/28/quick-smartdispatchercontroller-tip/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 12:08:37 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Castle]]></category>
		<category><![CDATA[Monorail]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/06/28/quick-smartdispatchercontroller-tip/</guid>
		<description><![CDATA[If you&#8217;re using the SmartDispatcherController in your Monorail application, consider restricting the parameter store using the From property defined on the DataBindAttribute. You&#8217;ll get a small performance boost (as Monorail doesn&#8217;t have to go looking for whether the data is coming from querystring or form post) and you get the added benefit of preventing submits [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=101&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you&#8217;re using the <em>SmartDispatcherController </em>in your Monorail application, consider restricting the parameter store using the <strong><em>From</em> </strong>property defined on the <em><strong>DataBindAttribute</strong>. </em>You&#8217;ll get a small performance boost (as Monorail doesn&#8217;t have to go looking for whether the data is coming from querystring or form post) and you get the added benefit of preventing submits through querystring or form when it is not the intended behaviour.</p>
<p>Example:</p>
<pre style="width:433px;height:88px;"><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> Create([DataBind(<span style="color:#a31515;">"contact"</span>, From=ParamStore.Form)] <span style="color:#2b91af;">Contact</span> contact)
{
    <span style="color:#008000;">//...
</span>}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/101/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/101/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=101&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/06/28/quick-smartdispatchercontroller-tip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>BackgroundMotion sample application</title>
		<link>http://benl.wordpress.com/2007/06/20/backgroundmotion-sample-application/</link>
		<comments>http://benl.wordpress.com/2007/06/20/backgroundmotion-sample-application/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 08:46:03 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Architecture]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/06/20/backgroundmotion-sample-application/</guid>
		<description><![CDATA[I found BackgroundMotion via Andrew Peter&#8217;s blog -&#160;created in partnership with Microsoft as a &#8220;best practice&#8221; example application. I&#8217;ve had a look at the source code and at first glance it&#8217;s quite a nicely architected solution&#8230; Certainly better than some of the&#160;starter kits&#160;coming out of Microsoft (anyone remember Petshop!?). Anyway it features all of the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=94&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I found <a href="http://www.backgroundmotion.com/Default.aspx" target="_blank">BackgroundMotion</a> via <a href="http://andrewpeters.net/2007/06/19/backgroundmotion-code-sample/" target="_blank">Andrew Peter&#8217;s</a> blog -&nbsp;created in partnership with Microsoft as a &#8220;best practice&#8221; example application. I&#8217;ve had a look at the source code and at first glance it&#8217;s quite a nicely architected solution&#8230; Certainly better than some of the&nbsp;starter kits&nbsp;coming out of Microsoft (anyone remember Petshop!?). Anyway it features all of the following:</p>
<blockquote><ul>
<li>Use of a domain-driven design techniques. Repository and Unit of Work abstractions over LINQ to SQL
<li>Model-level validation using the Validation Block
<li>Dependency injection using Composite Web Block
<li>Using Lucene.NET to index a domain model
<li>Using MVP with declarative data-binding in the presentation layer </li>
</ul>
</blockquote>
<p>Nice to see Lucene.NET being employed. As is NUnit. I&#8217;ll have a closer look when I get a chance. Expect some comments shortly.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/94/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/94/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=94&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/06/20/backgroundmotion-sample-application/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>RoR vs. Web Forms vs. MonoRail Pt2</title>
		<link>http://benl.wordpress.com/2007/06/01/ror-vs-web-forms-vs-monorail-pt2/</link>
		<comments>http://benl.wordpress.com/2007/06/01/ror-vs-web-forms-vs-monorail-pt2/#comments</comments>
		<pubDate>Fri, 01 Jun 2007 12:01:55 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Monorail]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Ruby/Rails]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/06/01/ror-vs-web-forms-vs-monorail-pt2/</guid>
		<description><![CDATA[Ok so in the last post I talked about some of the more obvious issues I have with ASP.NET and web forms development. Thankfully, the Castle Project&#8217;s MonoRail framework goes some way to alleviating that pain.
The Positives
MVC, MVP, ABC easy as 123&#8230;
Under the covers, MonoRail is a full MVC compliant framework essentially comprising a front [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=82&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Ok so in the <a href="http://benl.wordpress.com/2007/05/31/ror-vs-web-forms-vs-monorail/">last post</a> I talked about some of the more obvious issues I have with ASP.NET and web forms development. Thankfully, the <a href="http://www.castleproject.org/monorail/index.html" target="_blank">Castle Project&#8217;s MonoRail</a> framework goes some way to alleviating that pain.</p>
<h3>The Positives</h3>
<p><strong>MVC, MVP, ABC easy as 123&#8230;</strong></p>
<p>Under the covers, MonoRail is a full MVC compliant framework essentially comprising a front controller sitting over the ASP.NET infrastructure intercepting specially formed URI&#8217;s. The HTML ends up in the browser  via your choice of view engine, with NVelocity (a fork of the Jakarta Velocity port) the default and most accessible, Brail being the Boo dynamic language and most performant option and of course a cruddy web forms engine too which nobody should use. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;ve been comfortably using NVelocity for a while now, and provide testament that its not difficult to pick up.</p>
<p>The controller code orchestrates the flow of logic through the application and rails URI&#8217;s map nicely to actions on the controller which are ultimately public methods on the controller class itself. All nice and easy. Actions exposed on controllers derived from the magical <em>SmartDispatcherController</em> can translate posted form values into domain model objects for you by simply adding the <em>DataBind</em> attribute to your action&#8217;s argument list:</p>
<pre><span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> Save([<span style="color:#2b91af;">DataBind</span>(<span style="color:#a31515;">"publisher"</span>)] <span style="color:#2b91af;">Publisher</span> publisher)</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>In the above example the publisher argument is passed into the <em>Save</em> action fully constructed via the form or query string values posted! This saves on the usual binding and scraping stuff you normally do in web forms and which almost always ends up sitting in the code behind untested. Note: the databinding stuff is of course very flexible and my example above just touches on the possibilities.</p>
<p><strong>ActiveRecord</strong></p>
<p>The model can be supplied with an <a href="http://www.castleproject.org/activerecord/index.html" target="_blank">ActiveRecord</a> enabled domain model. This of course abstracts away NHibernate behind the scenes. <strike>Unfortunately generic collections support doesn&#8217;t work right now but I believe that work is firmly underway</strike>.</p>
<p>Edit: Generic collections are supported, as long as you&#8217;re running from the trunk.</p>
<p>Domain entities are adorned with the necessary attributes defining how their properties are mapped to your data source. This is a departure from the usual hbm XML mapping files but just as expressive.</p>
<p>ActiveRecord also supplies simple validation in the form of special attributes including email validation, regular expression validation and the like.</p>
<p><strong>UI Components</strong></p>
<p>Reusability of UI components is achieved via <em>ViewComponent</em>. These can support nested sections, parameters etc.</p>
<p><strong>AJAX and client scripting support</strong></p>
<p>Built into MonoRail are a number of helpers which allow you to perform the usual AJAX stuff such as calling remote server side methods and callback support, Scriptaculous and Effects2 client side goodness. In fact the helper extensibility is a nice way of adding extensions and wrapping commonly performed functionality in the view.</p>
<p><strong>Convention over configuration</strong></p>
<p>Like RoR, MonoRail prefers convention over configuration. The project structure skeleton is the same throughout all MonoRail enabled solutions. The MonoRail installer also includes a handy templated solution provider for both VS.NET 2003 and 2005 to create the project skeleton and testing is included. Accustomed MonoRail developers can open any solution and just know where things are going to be.</p>
<p><strong>Testability</strong></p>
<p>One of the sore points of ASP.NET development was the unit testing difficulty. MonoRail overcomes this by enforcing the MVC pattern. Controllers are testable classes sitting outside of the usual ASP.NET cruft. There are a number of framework features within MonoRail which specifically aid testing.</p>
<p><strong>Scaffolding</strong></p>
<p>Like RoR, controllers adorned with the necessary scaffolding attributes can automatically produce the basic markup and logic for CRUD operations on your domain model. Handy for prototyping or creating rough-and-ready data entry capabilities in your applications.</p>
<p><strong>Container support</strong></p>
<p>MonoRail supports IoC via the <a href="http://www.castleproject.org/container/index.html" target="_blank">Windsor container</a>. Controllers and their dependencies/parameters can be injected by the container if necessary.</p>
<h3><strong>The negatives</strong></h3>
<p>MonoRail does have some negatives, which I will mull over:</p>
<p><strong>No 3rd party or ASP.NET web forms controls support</strong></p>
<p>I don&#8217;t really see this as an issue but can see that some ASP.NET developers will. Fans of the big UI library packages will complain, but there is this <em>old concept of HTML</em> and it is surprising how flexible it can be <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Most use of control libraries I have seen has been misguided, by this I mean they&#8217;re usually added to a screen just <em>because they can.</em></p>
<p>The web forms control library isn&#8217;t such an issue as things like calendars, grids and the like are not to difficult to duplicate the MonoRail way.</p>
<p><strong>Learning a whole bunch of new concepts/patterns/practices</strong></p>
<p>Most ASP.NET developers are what can only be described as morts. They&#8217;re not familiar with design patterns and good practices such as clean separation since they came from either ASP or VB (procedural backgrounds) so this stuff doesn&#8217;t come naturally. If you&#8217;ve used NHibernate you&#8217;ll pick up the ActiveRecord stuff in no time. Learning the template syntax for your chosen view engine is of course another consideration.</p>
<h3><font color="#000000">Summary</font></h3>
<p>In summary, the benefits of using MonoRail over web forms are clear. Clean separation of concerns, testability, reduced complexity and none of the web form cruft and artifacts. MonoRail won&#8217;t suit everybody, but even if you&#8217;re happy with web forms it&#8217;s definitely worth a look. Personally I think its the only way worth programming in the enterprise with ASP.NET today.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/82/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/82/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=82&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/06/01/ror-vs-web-forms-vs-monorail-pt2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>RoR vs. Web Forms vs. MonoRail</title>
		<link>http://benl.wordpress.com/2007/05/31/ror-vs-web-forms-vs-monorail/</link>
		<comments>http://benl.wordpress.com/2007/05/31/ror-vs-web-forms-vs-monorail/#comments</comments>
		<pubDate>Thu, 31 May 2007 15:11:33 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Monorail]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/05/31/ror-vs-web-forms-vs-monorail/</guid>
		<description><![CDATA[As you know, I&#8217;ve been lucky enough to do a fair bit of Ruby on Rails development lately and well, what can I say? I&#8217;ve been spoiled! The development experience leaves me running out of expletives. I adore Rails&#8230; Especially in contrast to ASP.NET or more specifically &#8211; web forms. I have always had mixed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=77&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As you know, I&#8217;ve been lucky enough to do a fair bit of Ruby on Rails development lately and well, what can I say? I&#8217;ve been spoiled! The development experience leaves me running out of expletives. I adore Rails&#8230; Especially in contrast to ASP.NET or more specifically &#8211; web forms. I have always had mixed feelings with regards to ASP.NET but now more than ever &#8211; given my aforementioned experience of the graceful RoR framework. Allow me to elaborate on some of the issues I have with ASP.NET:</p>
<p><strong>The cruft to allow stateful paradigms on a stateless protocol&#8230;</strong></p>
<p>&#8230; Of which there are several:  post-backs, view-state and complex page life-cycle immediately spring to mind. In trying to do anything slightly dynamic with the control tree you run into view-state problems difficult to debug and frankly just not worth the bother. Web Forms and control development in general is a black art thanks to the huge and unwieldy collection of events kicking off during the page life-cycle &#8211; which nobody really understands save for perhaps God and Scott Guthrie. In trying to create an abstraction over the inherent statelessness of HTTP, which by definition should reduce complexity, ASP.NET has only served to add more. Yes, ASP.NET utterly bastardises HTTP. Make no mistake.</p>
<p><span style="font-weight:bold;">Code behind, beside, back-to-front etc</span></p>
<p>Code behind is a decent concept. Providing a means to remove application logic from the view &#8211; you know, seperation of concerns and all that. However, the common use for the code-behind is more often like an application logic <em>purgatory</em> if you will &#8211; between the final dispatch to heaven (the middle tier) or hell (the view). OK so ASP.NET doesn&#8217;t force you to put logic in the code behind but it doesn&#8217;t exactly encourage you not to? The path of least resistence is always the path most followed, which in this case means piles of code which should sit in a lower tier being present in the code behind.</p>
<p><span style="font-weight:bold;">Testability</span></p>
<p>It is extremely hard to write testable code in ASP.NET.  Mainly due to the previous point regarding code behind. Logic creeps into the code behind where it is impossible to get to by conventional testing. Sure you can write acceptance or end-to-end tests using Selenium or some other automated UI testing tool, but i&#8217;m talking closer to the metal tests&#8230; as-in unit tests.</p>
<p><strong>The built-in ASP.NET controls</strong></p>
<p>Most of them are overly complex and rely on piles of viewstate to get things done. ASP.NET 2 helps reduce the payload a little via control state but this is just another quirk if you ask me. Controls produce dodgy markup (ok I&#8217;m aware of the whole control adapter thing, but why should I fix MS broken HTML?) and bizarre ID tags making cross browser and standards-based web development a real bane.  Some of the other weirdness such as handling OnDataBinding and OnItemCreated etc and reaching into the control tree just to highlight a particular row or cell is a real pain. Some of the big-boy controls have this kitchen sink approach i.e. datagrid, gridview etc. The validators, while a nice concept, don&#8217;t really cut it in the enterprise world. Where you&#8217;d almost certainly be performing proper validation in your <a href="http://www.martinfowler.com/eaaCatalog/domainModel.html" target="_blank">DomainModel</a> someplace.</p>
<p><strong>IDE and designer integration</strong></p>
<p>ASP.NET and the .NET framework in general were created to sell tools and server licences, which is clearly evident given the tight coupling with VS.NET. Take VS.NET out of the picture and ASP.NET development is a hugely different and less pleasurable experience.  Show me someone who can create an ASP.NET web application using Notepad? Of course thats not what we should be using in the enterprise but its a good benchmark for both a language, or framework simplicity.</p>
<p>There are things I do like about ASP.NET. I like the extensibility of the provider model, the hosting aspect, the HTTP pipeline and extensibility points such as modules and handlers are nice &#8211; especially in IIS7.  It scales too, but a lot of that is due to IIS from 6 and on really.</p>
<p>So is there a light at the end of the tunnel? Well, yes&#8230; In the form of the fantastic <a href="http://www.castleproject.org/monorail/index.html" target="_blank">MonoRail framework</a>. Stay tuned for part 2 <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/77/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/77/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/77/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/77/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/77/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=77&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/05/31/ror-vs-web-forms-vs-monorail/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Ode to VS.NET 2003 webform designer</title>
		<link>http://benl.wordpress.com/2007/04/25/ode-to-vsnet-2003-webform-designer/</link>
		<comments>http://benl.wordpress.com/2007/04/25/ode-to-vsnet-2003-webform-designer/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 19:21:35 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/04/25/ode-to-vsnet-2003-webform-designer/</guid>
		<description><![CDATA[The VS.NET webform designer,
Was engineered by a bunch of part-timers,
I clicked &#8216;design-mode&#8217; and it ate all my code,
I can&#8217;t wait til the day I retire 
  
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=66&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>The VS.NET webform designer,<br />
Was engineered by a bunch of part-timers,<br />
I clicked &#8216;design-mode&#8217; and it ate all my code,<br />
I can&#8217;t wait til the day I retire </em></p>
<p> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/66/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/66/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=66&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/04/25/ode-to-vsnet-2003-webform-designer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
		<item>
		<title>Orcas Designer: The New Hope</title>
		<link>http://benl.wordpress.com/2007/04/24/orcas-designer-the-new-hope/</link>
		<comments>http://benl.wordpress.com/2007/04/24/orcas-designer-the-new-hope/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 11:39:17 +0000</pubDate>
		<dc:creator>benl</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Orcas]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://benl.wordpress.com/2007/04/24/orcas-designer-the-new-hope/</guid>
		<description><![CDATA[With reference to my last webform designer woes post, someone has pointed me to the upcoming webforms designer in Visual Studio codename Orcas. Apparently Orcas takes the design surface from Expression Web, which is an altogether nicer experience than that of the current Visual Studio products.
Good news as well is that Orcas supports multiple build [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=59&subd=benl&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>With reference to my last <a href="http://benl.wordpress.com/2007/04/23/vsnet-webform-designer-woes/">webform designer woes</a> post, someone has pointed me to the upcoming webforms designer in <a href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx" target="_blank">Visual Studio codename Orcas</a>. Apparently Orcas takes the design surface from <a href="http://www.microsoft.com/expression/products/overview.aspx?key=web">Expression Web</a>, which is an altogether nicer experience than that of the current Visual Studio products.</p>
<p>Good news as well is that Orcas supports multiple build targets&#8230; So .NET 2.0 compatibility is guaranteed too! I&#8217;m downloading as I post this and I&#8217;ll post a mini-review of sorts as soon as I&#8217;ve had a thrash around.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/benl.wordpress.com/59/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/benl.wordpress.com/59/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/benl.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/benl.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/benl.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/benl.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/benl.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/benl.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/benl.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/benl.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/benl.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/benl.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=benl.wordpress.com&blog=178045&post=59&subd=benl&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://benl.wordpress.com/2007/04/24/orcas-designer-the-new-hope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/146e52d49d361f85c0945487452fc6a0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Ben</media:title>
		</media:content>
	</item>
	</channel>
</rss>