<?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/"
	>

<channel>
	<title>.Net Smoothie &#187; Design</title>
	<atom:link href="http://www.richardbushnell.net/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.richardbushnell.net</link>
	<description></description>
	<lastBuildDate>Thu, 12 Mar 2009 13:52:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Design Guidelines for LINQ</title>
		<link>http://www.richardbushnell.net/2008/03/13/design-guidelines-for-linq/</link>
		<comments>http://www.richardbushnell.net/2008/03/13/design-guidelines-for-linq/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 18:40:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Guidelines]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/index.php/2008/03/13/design-guidelines-for-linq/</guid>
		<description><![CDATA[Have you wondered if and when you should use the new LINQ features in .Net 3.5? Like, where should I put a new extension method? Should I use Func&#60;T&#62; or a custom delegate? How do I best implement a mix-in (extension methods on an interface)? Well, Mircea Trofin has just published a new draft of [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F03%2F13%2Fdesign-guidelines-for-linq%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p>Have you wondered if and when you should use the new LINQ features in .Net 3.5?</p>
<p>Like, where should I put a new extension method? Should I use Func&lt;T&gt; or a custom delegate? How do I best implement a mix-in (extension methods on an interface)?</p>
<p>Well, Mircea Trofin has just published a new draft of some <a href="http://blogs.msdn.com/mirceat/archive/2008/03/13/linq-framework-design-guidelines.aspx" target="_blank">LINQ design guidelines</a>. You might just find your answers there.</p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F03%2F13%2Fdesign-guidelines-for-linq%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2008/03/13/design-guidelines-for-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mix 08 WPF Scheduling Application</title>
		<link>http://www.richardbushnell.net/2008/03/05/mix-08-wpf-scheduling-application/</link>
		<comments>http://www.richardbushnell.net/2008/03/05/mix-08-wpf-scheduling-application/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 08:41:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[Apps]]></category>
		<category><![CDATA[Mix08]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/index.php/2008/03/05/mix-08-wpf-scheduling-application/</guid>
		<description><![CDATA[Mix 08 seems to be much more mature than ever before. In previous years there were a lot of ideas being spoken about; this year there are much more implementations of those ideas available to look at. It seems like a lot of people have been working on the new technologies over the past year [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F03%2F05%2Fmix-08-wpf-scheduling-application%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p><a href="http://www.richardbushnell.net/wp-content/uploads/2008/03/image5.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 20px 20px 0px; border-right-width: 0px" height="186" alt="image" src="http://www.richardbushnell.net/wp-content/uploads/2008/03/image-thumb3.png" width="136" align="left" border="0" /></a>Mix 08 seems to be much more mature than ever before. In previous years there were a lot of ideas being spoken about; this year there are much more implementations of those ideas available to look at. It seems like a lot of people have been working on the new technologies over the past year or so. Hopefully that will lead to the ripening of many technologies (especially WPF) to a point where we can actually use them.</p>
<p>As an example, there is a <a href="http://thirteen23.com/experiences/desktop/mix08/">scheduling application</a> available for Mix. Unfortunately it only runs on Vista, but I captured a video and made a few screenshots for you.</p>
<p>This is the opening screen, with an agenda for the 4 days of the event:</p>
<p><a href="http://www.richardbushnell.net/wp-content/uploads/2008/03/image8.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 40px 0px 0px; width: 420px; border-right-width: 0px" height="334" alt="image" src="http://www.richardbushnell.net/wp-content/uploads/2008/03/image-thumb6.png" width="420" border="0" /></a></p>
<p>(Click the image to make it larger.)</p>
<p><span id="more-78"></span></p>
<p>If you click on a session slot, the agenda zooms out, and the various sessions available for that slot are displayed:</p>
<p><a href="http://www.richardbushnell.net/wp-content/uploads/2008/03/image7.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 40px 0px 0px; width: 420px; border-right-width: 0px" height="335" alt="image" src="http://www.richardbushnell.net/wp-content/uploads/2008/03/image-thumb5.png" width="460" border="0" /></a> </p>
<p>The sessions zoom out again to go back to the agenda.</p>
<p>The app runs very smoothly with my 3GHz Core Duo and 4GB RAM, but I&#8217;m not sure it would look so nice on a slower machine. The background is partly transparent (I can see my Vista video wallpaper running at the back of it) and has a video running sideways through it. It looks very nice.</p>
<p>  <iframe style="width: 460px; height: 375px" src="http://silverlight.services.live.com/invoke/57097/Mix08AgendaApplication/iframe.html" frameborder="0" scrolling="no"></iframe>
<p>I&#8217;m not sure if you&#8217;ll be able to see the smoothness of the animation on this video. In real life, it&#8217;s quite good.</p>
<p>As a side-note, the transparent background isn&#8217;t for everyone. My wife took one look at it and said it made her feel stressed. (One of those days, I think. <img src='http://www.richardbushnell.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>The download of the app was with ClickOnce, and ran very smoothly. I didn&#8217;t really have to do more than click a link on a web-page to install the app and get it running.</p>
<p>Overall, a simple app, but a good experience. I like it a lot. It gives me some good inspiration.</p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F03%2F05%2Fmix-08-wpf-scheduling-application%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2008/03/05/mix-08-wpf-scheduling-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Update Data with LINQ-to-SQL</title>
		<link>http://www.richardbushnell.net/2008/02/18/how-to-update-data-with-linq-to-sql/</link>
		<comments>http://www.richardbushnell.net/2008/02/18/how-to-update-data-with-linq-to-sql/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 17:50:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[LINQ to SQL]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/index.php/2008/02/18/how-to-update-data-with-linq-to-sql/</guid>
		<description><![CDATA[When learning LINQ-to-SQL, it&#8217;s not immediately obvious how to do an update. Querying is easy, and there are methods for inserting and deleting. Updating usually occurs by modifying an object already known to the DataContext and then calling SubmitChanges on the context. var product = (from p in dataContext.Products where p.ProductID == 1 select p).Single(); [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F02%2F18%2Fhow-to-update-data-with-linq-to-sql%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p>When learning LINQ-to-SQL, it&#8217;s not immediately obvious how to do an update. Querying is easy, and there are methods for inserting and deleting. Updating usually occurs by modifying an object already known to the <strong>DataContext</strong> and then calling <strong>SubmitChanges</strong> on the context.</p>
<blockquote><pre class="code"><span style="color: blue">var </span>product = (<span style="color: blue">from </span>p <span style="color: blue">in </span>dataContext.Products
               <span style="color: blue">where </span>p.ProductID == 1
               <span style="color: blue">select </span>p).Single();

product.Name = <span style="color: #a31515">&quot;Richard's product&quot;</span>;

dataContext.SubmitChanges();</pre>
</blockquote>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>It&#8217;s nice to see that MSDN documentation actually addresses the obvious arising question:</p>
<blockquote>
<p>Q. Can I update table data without first querying the database?</p>
<p>A. Although LINQ to SQL does not have set-based update commands, you can use either of the following techniques to update without first querying:</p>
<ul>
<li>Use ExecuteCommand to send SQL code. </li>
<li>Create a new instance of the object and initialize all the current values (fields) that affect the update. Then attach the object to the DataContext by using Attach and modify the field you want to change. </li>
</ul>
</blockquote>
<p><span id="more-54"></span></p>
<p>If you ask me, using an <strong>ExecuteCommand </strong>defeats the object of LINQ-to-SQL. After all, we&#8217;re using it as a data-access-layer to generate entities in code based on the data schema. The last thing we want to have to do is start writing strings of SQL.</p>
<p>So that&#8217;s out.</p>
<h3>I&#8217;m So Attached</h3>
<p>The second option is to use the <strong>Attach</strong> method on the table we&#8217;re updating. I&#8217;ve tried to use the <strong>Attach </strong>method before, but it didn&#8217;t work.</p>
<p>To see what I mean, try this in LINQPad (using the AdventureWorks database from CodePlex):</p>
<blockquote>
<pre class="code"><span style="color: blue">var </span><span style="color: black">product = </span><span style="color: blue">new </span><span style="color: black">Product();
product.ProductID = </span><span style="color: #c81efa">1</span><span style="color: black">;
product.Name = </span><span style="color: #dc1414">&quot;Richard's product&quot;</span><span style="color: black">;

Products.Attach(product);

</span><span style="color: blue">var </span><span style="color: black">changeSet = GetChangeSet();

changeSet.Dump();</span></pre>
</blockquote>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>You&#8217;ll see that there are no changes to make, so no updates are made.</p>
<p>Now, move the line of code that does the update after the call to <strong>Attach</strong>, so as to attach the product first before updating the field:</p>
<blockquote>
<pre class="code"><span style="color: blue">var </span><span style="color: black">product = </span><span style="color: blue">new </span><span style="color: black">Product();
product.ProductID = </span><span style="color: #c81efa">1</span><span style="color: black">;

Products.Attach(product);
</span><span style="color: black">
//Notice we're doing this laterproduct.Name = </span><span style="color: #dc1414">&quot;Richard's product&quot;</span><span style="color: black">;

</span><span style="color: blue">var </span><span style="color: black">changeSet = GetChangeSet();

changeSet.Dump();</span></pre>
</blockquote>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>The c<strong>hangeset</strong> now shows that one update is ready to be made. Unfortunately, if you call <strong>SubmitChanges</strong>, you get an exception:</p>
<blockquote>
<pre class="code">SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.</pre>
</blockquote>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>The MSDN documentation isn&#8217;t so clear here. What do we need to set to get it to work?</p>
<p>The SQL being sent to the database is instructive:</p>
<blockquote>
<pre class="code"><span style="color: blue">UPDATE </span>[Production]<span style="color: gray">.</span>[Product]
<span style="color: blue">SET </span>[Name] <span style="color: gray">= </span>@p9
<span style="color: blue">WHERE </span><span style="color: gray">(</span>[ProductID] <span style="color: gray">= </span>@p0<span style="color: gray">) AND (</span>[Name] <span style="color: gray">IS NULL)
AND (</span>[ProductNumber] <span style="color: gray">IS NULL)
AND (NOT (</span>[MakeFlag] <span style="color: gray">= </span>1<span style="color: gray">))
AND (NOT (</span>[FinishedGoodsFlag] <span style="color: gray">= </span>1<span style="color: gray">))
AND (</span>[Color] <span style="color: gray">IS NULL)
AND (</span>[SafetyStockLevel] <span style="color: gray">= </span>@p1<span style="color: gray">)
AND (</span>[ReorderPoint] <span style="color: gray">= </span>@p2<span style="color: gray">)
AND (</span>[StandardCost] <span style="color: gray">= </span>@p3<span style="color: gray">)
AND (</span>[ListPrice] <span style="color: gray">= </span>@p4<span style="color: gray">)
AND (</span>[Size] <span style="color: gray">IS NULL)
AND (</span>[SizeUnitMeasureCode] <span style="color: gray">IS NULL)
AND (</span>[WeightUnitMeasureCode] <span style="color: gray">IS NULL)
AND (</span>[Weight] <span style="color: gray">IS NULL)
AND (</span>[DaysToManufacture] <span style="color: gray">= </span>@p5<span style="color: gray">)
AND (</span>[ProductLine] <span style="color: gray">IS NULL)
AND (</span>[Class] <span style="color: gray">IS NULL)
AND (</span>[Style] <span style="color: gray">IS NULL)
AND (</span>[ProductSubcategoryID] <span style="color: gray">IS NULL)
AND (</span>[ProductModelID] <span style="color: gray">IS NULL)
AND (</span>[SellStartDate] <span style="color: gray">= </span>@p6<span style="color: gray">)
AND (</span>[SellEndDate] <span style="color: gray">IS NULL)
AND (</span>[DiscontinuedDate] <span style="color: gray">IS NULL)
AND (</span>[rowguid] <span style="color: gray">= </span>@p7<span style="color: gray">)
AND (</span>[ModifiedDate] <span style="color: gray">= </span>@p8<span style="color: gray">)
</span><span style="color: green">-- @p0: Input Int (Size = 0; Prec = 0; Scale = 0) [1]
-- @p1: Input SmallInt (Size = 0; Prec = 0; Scale = 0) [0]
-- @p2: Input SmallInt (Size = 0; Prec = 0; Scale = 0) [0]
-- @p3: Input Decimal (Size = 0; Prec = 29; Scale = 4) [0]
-- @p4: Input Decimal (Size = 0; Prec = 29; Scale = 4) [0]
-- @p5: Input Int (Size = 0; Prec = 0; Scale = 0) [0]</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
</blockquote>
<p>The problem is now that LINQ-to-SQL tables automatically use optimistic concurrency, and for some reason (maybe only in LINQPad) the SellStartDate is not set, and neither are the rowguid or ModifiedDate fields. In any case, either we have to turn off optimistic concurrency, or set all the field values ourselves.</p>
<h3>Using Optimistic Concurrency with Updates</h3>
<p>Unfortunately, by default all fields are used for optimistic concurrency, so you have to set values for all fields. If you were using ASP.Net you could keep a copy of the variables in the session state or something, but at least it saves you a round trip to the database.</p>
<p>Here&#8217;s the code that actually does perform an update:</p>
<blockquote>
<pre class="code"><span style="color: blue">var </span>product = <span style="color: blue">new </span><span style="color: #2b91af">Product</span>();
product.ProductID = 1;
product.Name = <span style="color: #a31515">&quot;Adjustable Race&quot;</span>;
product.ProductNumber = <span style="color: #a31515">&quot;AR-5381&quot;</span>;
product.MakeFlag = <span style="color: blue">false</span>;
product.FinishedGoodsFlag = <span style="color: blue">false</span>;
product.Color = <span style="color: blue">null</span>;
product.SafetyStockLevel = 1000;
product.ReorderPoint = 750;
product.StandardCost = 0.0000M;
product.ListPrice = 0.0000M;
product.Size = <span style="color: blue">null</span>;
product.SizeUnitMeasureCode = <span style="color: blue">null</span>;
product.WeightUnitMeasureCode = <span style="color: blue">null</span>;
product.Weight = <span style="color: blue">null</span>;
product.DaysToManufacture = 0;
product.ProductLine = <span style="color: blue">null</span>;
product.Class = <span style="color: blue">null</span>;
product.Style = <span style="color: blue">null</span>;
product.ProductSubcategoryID = <span style="color: blue">null</span>;
product.ProductModelID = <span style="color: blue">null</span>;
product.SellStartDate = <span style="color: #2b91af">DateTime</span>.Parse(<span style="color: #a31515">&quot;6/1/1998 12:00:00 AM&quot;</span>);
product.SellEndDate = <span style="color: blue">null</span>;
product.DiscontinuedDate = <span style="color: blue">null</span>;
product.Rowguid = <span style="color: blue">new </span><span style="color: #2b91af">Guid</span>(<span style="color: #a31515">&quot;694215b7-08f7-4c0d-acb1-d734ba44c0c8&quot;</span>);
product.ModifiedDate = <span style="color: #2b91af">DateTime</span>.Parse(<span style="color: #a31515">&quot;3/11/2004 10:01:36.827 AM&quot;</span>);

Products.Attach(product);

// Make the change here
product.Name = <span style="color: #a31515">&quot;Richard's product&quot;</span>;

SubmitChanges();</pre>
</blockquote>
<p>So you can avoid two trips to the database by doing the update manually and using the <strong>Attach </strong>method on the table you are updating.</p>
<p>Mind you, I&#8217;m not sure that&#8217;s worth it.</p>
<div style="float:right;margin:0 20px 20px 0">
<iframe style="width: 120px; height: 240px" marginwidth="0" marginheight="0" src="http://rcm.amazon.com/e/cm?t=netsmoo-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1590597893&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=109DD0&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" scrolling="no"></iframe>
</div>
<p>If you want to know more about updating LINQ-to-SQL objects with the DataContext, I recommend <a href="http://www.amazon.com/gp/product/1590597893?ie=UTF8&amp;tag=netsmoo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1590597893">Pro LINQ: Language Integrated Query in C# 2008</a><img style="margin: 0px; width: 1px; border-top-style: none! important; border-right-style: none! important; border-left-style: none! important; border-bottom-style: none! important" height="1" alt="" src="http://www.assoc-amazon.com/e/ir?t=netsmoo-20&amp;l=as2&amp;o=1&amp;a=1590597893" width="1" border="0" />. It&#8217;s got 6 chapters just about LINQ-to-SQL, the DataContext, and concurrency issues.</p>
<p>P.S. In case you&#8217;re interested, I generated some of that code in LINQPad using the following code (it doesn&#8217;t work for dates or Guids, before anyone complains):</p>
<p><span style="color: blue">var </span>product = (<span style="color: blue">from </span>p <span style="color: blue">in</span>Products</p>
<p><span style="color: blue">where</span>p.ProductID == 1</p>
<p><span style="color: blue">select</span>p).Single();</p>
<p><span style="color: blue">var </span>fields = <span style="color: blue">from </span>field <span style="color: blue">in</span>product.GetType().GetFields()</p>
<p><span style="color: blue">select new</span>{</p>
<p>Name = field.Name,</p>
<p>Value = field.GetValue(product),</p>
<p>TypeName = field.FieldType.Name };</p>
<p><span style="color: blue">foreach </span>(<span style="color: blue">var </span>field <span style="color: blue">in</span>fields)</p>
<p><span style="color: #2b91af">Console</span>.WriteLine(<span style="color: #a31515">&quot;product.{0} = {1};&quot;</span>, field.Name,</p>
<p>field.TypeName == <span style="color: #a31515">&quot;String&quot;</span>? <span style="color: #a31515">&quot;\&quot;&quot;</span>+</p>
<p>field.Value + <span style="color: #a31515">&quot;\&quot;&quot;</span>:</p>
<p>field.Value ?? <span style="color: #a31515">&quot;null&quot;</span>);</p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F02%2F18%2Fhow-to-update-data-with-linq-to-sql%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2008/02/18/how-to-update-data-with-linq-to-sql/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>ASP.Net MVC Corollary &#8211; What to do?</title>
		<link>http://www.richardbushnell.net/2008/01/28/aspnet-mvc-corollary-what-to-do/</link>
		<comments>http://www.richardbushnell.net/2008/01/28/aspnet-mvc-corollary-what-to-do/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 03:50:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SubSonic]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/index.php/2008/01/28/aspnet-mvc-corollary-what-to-do/</guid>
		<description><![CDATA[Dude! I got quoted! And by none other than Rob Conery of SubSonic fame. It seems like my last post caused quite an unexpected stir. Thanks to both Rob and Scott for taking the time to answer me. I really appreciate it. A Word of Appreciation Let&#8217;s get something in perspective. Rob has actually produced [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F01%2F28%2Faspnet-mvc-corollary-what-to-do%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p>Dude! I got <a href="http://blog.wekeroad.com/2008/01/25/ramble-aspnet-mvc-is-a-geek-chisel/" target="_blank">quoted</a>! And by none other than Rob Conery of SubSonic fame.</p>
<p>It seems like my <a href="http://richardbushnell.net/index.php/2008/01/25/does-the-aspnet-mvc-framework-frustrate-you/" target="_blank">last post</a> caused quite an unexpected stir. Thanks to both <a href="http://blog.wekeroad.com/2008/01/25/ramble-aspnet-mvc-is-a-geek-chisel/" target="_blank">Rob</a> and <a href="http://www.hanselman.com/blog/" target="_blank">Scott</a> for taking the time to answer me. I really appreciate it.<br />
<span id="more-43"></span></p>
<h2>A Word of Appreciation</h2>
<p>Let&#8217;s get something in perspective. Rob has actually <em>produced</em> something of immense value with SubSonic. I have just <em>complained </em>about it. Rob could very easily have just hammered me down, but he didn&#8217;t. Thanks, Rob.</p>
<p>Scott too.</p>
<p>In the <a href="http://www.hanselman.com/blog/HanselminutesPodcast98RaisingGeeksWithScottsDad.aspx" target="_blank">last episode of his most excellent podcast</a>, Scott said to his Dad that he likes to stir things up. &#8220;Presenting options&#8221; was the phrase I think he used. In that case, we are two peas in a pod. I <em>always</em> like to ask questions. If my question uncovers an unjustified assumption, things usually get better. If I&#8217;m wrong, then at least I come out knowing why I was wrong and understand the problem better.</p>
<p>While studying for my physics degree, I was asked to give feedback for a course on &#8220;Cosmic Dust&#8221;. I commented that it was just a completely pointless course. I mean, why waste 12 weeks of lectures studying the invisible dust floating around in space? Instead of numbing our brains with such useless information, we could have been learning something much more relevant. That particular comment, although made privately, really stirred up the lecturer. He got quite mad actually. He even wrote a long letter to the students with his  reasoning for why cosmic dust was so important. That itself was unprecedented. No lecturer had ever given us feedback to our feedback before.</p>
<p>Not much changed in the end, but at least I came out of it understanding more about what I&#8217;d been doing. Maybe that will happen with ASP.Net MVC.</p>
<p>So thanks to both of you for taking me seriously.</p>
<h2>How Dare They!</h2>
<p>Last month I watched a documentary about J.K. Rowling. It followed her as she completed and published the 7th and final Harry Potter book. It was the fasting selling book of all time. Truly amazing. But what amazed me most about the whole documentary was a comment made by two girls who had been queuing all night to get their copy of the book:</p>
<blockquote><p>&#8220;Finally! We&#8217;ve been waiting 10 years for this!&#8221;</p></blockquote>
<p>The remark was made with a tinge of disgust. It was as if the author had no right to take such a long time writing the book. How dare Mrs Rowling take so much time to finish her book while they had to suffer while sitting around waiting for it. How inconvenient for them! How inconsiderate of Mrs Rowling!</p>
<p>I thought, &#8220;if you wanted the book so much, why didn&#8217;t you write your own?&#8221;</p>
<p>In that spirit, I&#8217;m going to try to do something about the ASP.Net MVC thing myself. I don&#8217;t want to be that kind of person that complains but does nothing.</p>
<h2>Wait! There&#8217;s a baby in that bath-water!</h2>
<p>I read <a href="http://blog.wekeroad.com/2008/01/25/ramble-aspnet-mvc-is-a-geek-chisel/" target="_blank">Rob&#8217;s readers&#8217; comments</a>, and I think that it doesn&#8217;t require a full rewrite of ASP.Net to do what they want. In fact, I already wrote a bit of code, modeled loosely on <a href="http://www.djangoproject.com/documentation/templates/" target="_blank">Django templates</a>, which allows an ASP.Net developer to control the page output pretty much the same way as MVC promises to do. I&#8217;ll have to dig the code out of its hiding place, but then I plan to integrate it with a small Model-View-Presenter framework (a couple of generic base-classes for a Page and Presenter) which will enable a much better way for writing pages than the normal ASP.Net pages do. It also allows full testing of the controlling code.</p>
<p>And better yet, the MVP stuff is based on a refactored and simplified version of some Patterns and Practices code. (Yaaay, we can all be happy together!)</p>
<p>I&#8217;ve used this pattern, and each Presenter class is usually a few lines long. My ASP.Net page only contains presentation logic, i.e. stuff to render the page and retrieve input. I don&#8217;t need a controller nor a completely new framework to do it. In fact, a Controller class would be much worse, IMHO, because Controllers contain the code for more than one concern &#8211; a list page, an edit page, a delete page, etc. (I think that those things could be pragmatically abstracted and made easier anyhow, but that&#8217;s another story.) I personally prefer to keep my concerns separate.</p>
<p>And I&#8217;m not the only one who likes MVP. <a href="http://weblogs.asp.net/craigshoemaker/archive/2007/12/06/podcast-asp-net-mvc-and-the-future-of-model-view-presenter-interview-with-jeffery-palermo.aspx" target="_blank">Craig Shoemaker</a> does too.</p>
<p>So here&#8217;s my plan: I&#8217;ll try to publish some ideas and persuade you all to use them. Then I&#8217;ll get Microsoft to take Routes, Controllers, and whatever other goodies they&#8217;ve got in ASP.Net MVC, and put them in the next full-blown version of ASP.Net. Then everyone can use them and we can carry on with life as normal. I won&#8217;t have to use UrlRewriter to do my Routing any more and Microsoft can go back and finish off Workflow Foundation, ASP.Net Ajax, and Patterns and Practices.</p>
<p>Well, that&#8217;s the plan, anyway.</p>
<p>(I&#8217;ve just got to tidy up some of my code before I publish it. Give me a moment&#8230;)</p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F01%2F28%2Faspnet-mvc-corollary-what-to-do%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2008/01/28/aspnet-mvc-corollary-what-to-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Does the ASP.Net MVC Framework Frustrate You?</title>
		<link>http://www.richardbushnell.net/2008/01/25/does-the-aspnet-mvc-framework-frustrate-you/</link>
		<comments>http://www.richardbushnell.net/2008/01/25/does-the-aspnet-mvc-framework-frustrate-you/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 09:11:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ASP.Net MVC]]></category>
		<category><![CDATA[SubSonic]]></category>
		<category><![CDATA[trends]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/index.php/2008/01/25/does-the-aspnet-mvc-framework-frustrate-you/</guid>
		<description><![CDATA[Silverlight, ASP.Net Ajax, LINQ, Astoria, ASP.Net MVC &#8211; there&#8217;s just tons of stuff coming out of Microsoft. And that&#8217;s not to mention the stuff people have seemingly forgotten about &#8211; ASP.Net Futures with IronPython (AWOL), Patterns and Practices Web Client Software Factory, WPF, WF, WCF and CardSpaces. Now the trend seems to be functional programming [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F01%2F25%2Fdoes-the-aspnet-mvc-framework-frustrate-you%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p>Silverlight, ASP.Net Ajax, LINQ, Astoria, ASP.Net MVC &#8211; there&#8217;s just tons of stuff coming out of Microsoft. And that&#8217;s not to mention the stuff people have seemingly forgotten about &#8211; ASP.Net Futures with IronPython (AWOL), Patterns and Practices Web Client Software Factory, WPF, WF, WCF and CardSpaces. Now the trend seems to be functional programming languages, especially with F#.</p>
<p>There&#8217;s just a bit <em>too</em> much for me.</p>
<p>What I really need is guidance. My customers don&#8217;t ask me what to they should use in 6 months; they ask me how to use what already exists. They don&#8217;t want &#8220;cool&#8221;; they want stability and consistency. And while the ball keeps moving, we can&#8217;t grab it.<br />
<span id="more-39"></span></p>
<p>Take for example, the ASP.Net Futures framework. I recently took over a project where it had been used. I checked to see what was available now &#8211; nothing! It seems to be dead. I&#8217;ll have to rip it out of the project, somehow. Major headache!</p>
<p>MSDN Patterns and Practices have produced some great stuff recently. Policy Injection, ObjectBuilder, PageFlows, Validators; but it&#8217;s completely ignored, as no one has a chance to look at it because of all the other stuff grabbing their attention. Well that, and the fact that it looks a bit overengineered.</p>
<p>While this is happening, and the cool guys are playing with all the new stuff, the guys on the ground are wondering what they should learn and what not. LINQ is hard enough to learn, and most developers haven&#8217;t even looked at the near 18-month-old WF suite yet. There just isn&#8217;t time.</p>
<p>I recently heard Dino Esposito say the same thing. I heard him on <a href="http://www.intellectualhedonism.com/2007/10/16/NETRocks281DinoEspositoOnAJAXArchitecture.aspx" target="_blank">DotNetRocks</a> bemoaning the fact that Microsoft seems to have abandoned ASP.Net Ajax to chase after Silverlight. They could have made ASP.Net Ajax absolutely fantastic, but aren&#8217;t doing anything about it any more. Seems like it&#8217;s finished.</p>
<p>But above it all, the MVC Framework just tips the scale for me.</p>
<p>Let me start with some history. About 18 months ago, I heard Scott Hanselman say in <a href="http://www.hanselminutes.com/default.aspx?showID=40" target="_blank">his podcast</a> that Ruby On Rails was <em>the framework</em> that Scott Guthrie and Microsoft should be worried about. I agreed. In fact, I went and learnt Rails because of that. I found it was really good, just like he said (apart from when you try to get a site deployed, at which point you need a degree in Rocket Science or a great hosting company. I had neither.) But the concepts I learnt from Rails were very interesting. I tried to apply them in my work.</p>
<p>Enter <a href="http://blog.wekeroad.com/2008/01/14/subsonic-and-mvc-introducing-makai/" target="_blank">SubSonic</a>. Rob Conery made a great implementation of the ActiveRecord pattern from Rails for .Net and called it SubSonic. He even included some of the syntactic sugar that makes Rails fun. It is a great framework, and I suggested to some customers that they use it. They tried. They failed. I asked them why, and they answered that it just didn&#8217;t go far enough. They went back to using DataAdapters.</p>
<p><a href="http://blog.wekeroad.com/2007/10/26/microsoft-subsonic-and-me/" target="_blank">Rob</a> and Scott both work for Scott Guthrie now. <a href="http://www.hanselman.com/blog/ASPNETMVCWebFormsUnplugged.aspx" target="_blank">They seemingly focus on the ASP.Net MVC Framework</a>, which, unsurprisingly, is a blatant attempt at a copy of Rails.</p>
<p>Whether or not it&#8217;s a good framework (and I think it is), the problem is, I need some features for the stuff I&#8217;ve already got. I might need Routes (ala Rails) for my ASP.Net apps; I don&#8217;t need a complete new system for building pages. It just took me 3 years to learn ASP.Net as it is now. I don&#8217;t want to throw it all away because it&#8217;s not cool any more. And I don&#8217;t think my customers want to do that neither.</p>
<p>Why not make ASP.Net better? Why not take the stuff in Patterns and Practices and make it simpler to understand. That&#8217;s what happened with C-Omega and C#3.0. The good stuff from a research project found its way into the next version of the more popular language. Thumbs up to Anders!</p>
<p>I think that Microsoft could actually do a much better job at Rails than DHH did. Sure, he gave them a kick in the butt, but that&#8217;s a good thing.</p>
<p>Rails has things in it which we don&#8217;t need in ASP.Net. Multiple views are often necessary for creating REST API&#8217;s &#8211; how often do ASP.Net developers do that? If we do, we have business objects and other ways to support an API. Routes using controllers is for nice-looking URLs, especially useful for search engines &#8211; how many pages of our sites do most ASP.Net developers want to post to search engines? MVC is to make it simpler to control what goes into markup, and what goes into a view &#8211; we already have MVP, which fits well in ASP.Net, and doesn&#8217;t lead to huge controller files. (What&#8217;s a controller anyhow?)</p>
<p>And don&#8217;t forget that Rails doesn&#8217;t have the concepts of security built in. It doesn&#8217;t have controls. Try integrating plugins &#8211; it&#8217;s not always easy. And despite the TextMate craze, the IDE is pitiful. You have to know Ruby well before you can do anything.</p>
<p>On the ASP.Net side, do we really want to kick out viewstate? It was put there for a purpose. Real-world website developers were having trouble managing the control of forms in ASP, and ViewState was a good answer. Rails doesn&#8217;t have that. It does everything with IDs in forms. Cool, but if it&#8217;s put into ASP.Net MVC, it means we&#8217;ll have to learn a completely new model to achieve the same purpose.</p>
<p>The real reason I&#8217;m peed off, is that I&#8217;m having to invent my own guidance, while MS seems to be messing about doing other things. That&#8217;s not good for the customers, as they get new ideas from everyone, and no idea what is right or wrong.</p>
<p>So guys, please. Why not stop what we&#8217;re doing, take a step back, consolidate, learn from each other, and build something better than ever.</p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F01%2F25%2Fdoes-the-aspnet-mvc-framework-frustrate-you%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2008/01/25/does-the-aspnet-mvc-framework-frustrate-you/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Calculating the Fibonacci Sequence with C# 3.0</title>
		<link>http://www.richardbushnell.net/2008/01/24/calculating-the-fibonacci-sequence-with-c-30/</link>
		<comments>http://www.richardbushnell.net/2008/01/24/calculating-the-fibonacci-sequence-with-c-30/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 09:36:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Fibonacci Sequence]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/index.php/2008/01/24/calculating-the-fibonacci-sequence-with-c-30/</guid>
		<description><![CDATA[Scott Hanselman just posted his latest article in his weekly source code series. He shows various ways of producing the Fibonacci Sequence using various languages. I found it really interesting, for two reasons: I tried to do the C#3.0 one on my own after listening to a podcast about F#, and never could work it [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F01%2F24%2Fcalculating-the-fibonacci-sequence-with-c-30%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p><a href="http://www.hanselman.com/blog" target="_blank">Scott Hanselman</a> just posted his <a href="http://www.hanselman.com/blog/TheWeeklySourceCode13FibonacciEdition.aspx" target="_blank">latest article in his weekly source code series</a>. He shows various ways of producing the Fibonacci Sequence using various languages. I found it really interesting, for two reasons:</p>
<ol>
<li>I tried to do the C#3.0 one on my own after listening to a podcast about F#, and never could work it out. (Doh!) </li>
<li>It makes me question what I thought about coding. </li>
</ol>
<p>You see, I spend a lot of time refactoring. Sometimes too much. I have to ask myself why. It&#8217;s usually so that I can come back to the code later, and still understand what I was trying to do. <em>Most</em> of the time, <em>conciser is better. </em>But not always!</p>
<p>And that&#8217;s what I see in this post.</p>
<p><span id="more-38"></span></p>
<p>Suppose I had written this C# function (shamelessly stolen from Scott&#8217;s post):</p>
<pre class="code"><span style="color: #2b91af">Func</span>&lt;<span style="color: blue">int</span>, <span style="color: blue">int</span>&gt; fib = <span style="color: blue">null</span>;
fib = n =&gt; n &gt; 1 ? fib(n - 1) + fib(n - 2) : n;</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Compare this to the C# 2.0 version:</p>
<pre class="code"><span style="color: blue">static int </span>Fibonacci(<span style="color: blue">int </span>x) {
  <span style="color: blue">if </span>(x &lt;= 1)
    <span style="color: blue">return </span>1;
  <span style="color: blue">return </span>Fibonacci(x - 1) + Fibonacci(x - 2);
}</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Apart from the fact that these methods actually give different answers (sorry, Scott), if I were to try to understand these methods 6 months after writing them, which one of the code samples would I be most glad of seeing again?</p>
<p>You see, most code only gets read again for two reasons:</p>
<ol>
<li>to debug it, or </li>
<li>to hand it over to someone else </li>
</ol>
<p>In both cases, clever though it may seem, the first conciser version would probably cause more trouble. Now, don&#8217;t get me wrong, I&#8217;m all for good concise code, but XSLT is concise, and I hate debugging that.</p>
<p>Now, considering that in order to reuse the <span style="color: #2b91af">Func</span>&lt;<span style="color: blue">int</span>, <span style="color: blue">int</span>&gt; function, I would have to pass the around, thus holding it in a static variable, or wrapping it in another class, it doesn&#8217;t actually turn out to be that practical after all. Concise, yes. Practical and readable, hmm.</p>
<p>So, while we have a very-much-by-Ruby-On-Rails-driven trend going to make code as beautiful as possible, don&#8217;t forget to not go too far. We have to be able to read code later on, remember.</p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F01%2F24%2Fcalculating-the-fibonacci-sequence-with-c-30%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2008/01/24/calculating-the-fibonacci-sequence-with-c-30/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using LinqPad to Create a Time-Selector Drop-Down List</title>
		<link>http://www.richardbushnell.net/2008/01/18/using-linqpad-to-create-a-time-selector-drop-down-list/</link>
		<comments>http://www.richardbushnell.net/2008/01/18/using-linqpad-to-create-a-time-selector-drop-down-list/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 17:47:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[LinqPad]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/index.php/2008/01/18/using-linqpad-to-create-a-time-selector-drop-down-list/</guid>
		<description><![CDATA[I am really getting into LINQ now! I think it&#8217;s fantastic. I recently wanted to develop a quick drop-down list in ASP.Net which allows a user to select a time of day from a list. The times are 15 minutes apart, so the list would look like this: &#8230; 08:00 08:15 08:30 08:45 09:00 &#8230; [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F01%2F18%2Fusing-linqpad-to-create-a-time-selector-drop-down-list%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p>I am <em>really </em>getting into LINQ now! I think it&#8217;s fantastic. I recently wanted to develop a quick drop-down list in ASP.Net which allows a user to select a time of day from a list. The times are 15 minutes apart, so the list would look like this:</p>
<p>&#8230;<br /> 08:00<br /> 08:15<br /> 08:30<br /> 08:45<br /> 09:00<br /> &#8230;</p>
<p>&#8230; and so on.</p>
<p>Before LINQ, I would have done this with a for loop, like this:</p>
<pre class="code"><span style="color: #2b91af">List</span>&lt;<span style="color: blue">string</span>&gt; times = <span style="color: blue">new </span><span style="color: #2b91af">List</span>&lt;<span style="color: blue">string</span>&gt;();
<span style="color: blue">for </span>(<span style="color: blue">int </span>hour = 0; hour &lt; 24; hour++)
  <span style="color: blue">for </span>(<span style="color: blue">int </span>minute = 0; minute &lt; 60; minute++)
    <span style="color: blue">if </span>(minute % 15 == 0)
       times.Add(<span style="color: blue">string</span>.Format(
         <span style="color: #a31515">"{0:00}:{1:00}"</span>, hour, minute));</pre>
<p>That&#8217;s not difficult, although it&#8217;s not so easy to understand. I would have to write a small console app or test to make sure I had done it correct though.</p>
<p>I thought this might be a good opportunity to use <a href="http://www.linqpad.net" target="_blank">LinqPad</a>. It&#8217;s a great tool. You can use it to test a LINQ statement in a live window, so I thought I&#8217;d give it a go.</p>
<p>First I needed a LINQ statement to test.</p>
<p><span id="more-36"></span></p>
<h2>Designing the LINQ Statement</h2>
<p>The first thing I needed was an integer for the hour. That&#8217;s quite easy, especially if you use the Range Extension Method technique as I wrote about before. That method allows you to create an IEnumerable&lt;int&gt; from a simple statement, like 1.To(10). So to get the hours of the day, I can simply start with:</p>
<pre class="code"><span style="color: blue">from </span><span style="color: black">hour </span><span style="color: blue">in </span><span style="color: #c81efa">0</span><span style="color: black">.To(</span><span style="color: #c81efa">23</span><span style="color: black">)</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Now I need to do a cross-join with the minutes. In C# comprehension syntax, you do that by simply adding another <font color="#0000ff">from</font> statement. At first, I thought I could do it by using an enumeration of minutes, specifying each value I wanted specifically. To do that I wrote this:</p>
<pre class="code"><span style="color: blue">from </span><span style="color: black">hour </span><span style="color: blue">in </span><span style="color: #c81efa">0</span><span style="color: black">.To(</span><span style="color: #c81efa">23</span><span style="color: black">)
</span><span style="color: blue">from </span><span style="color: black">minute </span><span style="color: blue">in new</span><span style="color: black">[] {</span><span style="color: #c81efa">0</span><span style="color: black">, </span><span style="color: #c81efa">15</span><span style="color: black">, </span><span style="color: #c81efa">30</span><span style="color: black">, </span><span style="color: #c81efa">45</span><span style="color: black">}</span></pre>
<p><a href="http://11011.net/software/vspaste"></a>That works very nicely. I think it&#8217;s easy to understand too. Even if you were going to come back to it years from now, you could still easily see what is being done.</p>
<p>Another alternative is to do the same as the <font color="#0000ff">for</font> statement above, go through the numbers 0 to 59, selecting only those which are divisible by 15. You would do that using another range and a filter:</p>
<pre class="code"><span style="color: blue">from </span><span style="color: black">hour </span><span style="color: blue">in </span><span style="color: #c81efa">0</span><span style="color: black">.To(</span><span style="color: #c81efa">23</span><span style="color: black">)
</span><span style="color: blue">from </span><span style="color: black">minute </span><span style="color: blue">in </span><span style="color: #c81efa">0</span><span style="color: black">.To(</span><span style="color: #c81efa">59</span><span style="color: black">)
</span><span style="color: blue">where </span><span style="color: black">minute % </span><span style="color: #c81efa">15 </span><span style="color: black">== </span><span style="color: #c81efa">0</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Again, I like the way this looks. Another developer should have no difficulty reading that.</p>
<p>To select the string, we will also use the same format as before, this time using the <font color="#0000ff">select</font> keyword:</p>
<pre class="code"><span style="color: blue">select string</span><span style="color: black">.Format(</span><span style="color: #dc1414">"{0:00}:{1:00}"</span><span style="color: black">, hour, minute)</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>You then simply assign the value of this statement to a variable, like this:</p>
<pre class="code"><span style="color: blue">var </span>times = <span style="color: blue">from </span>hour <span style="color: blue">in </span>0.To(23)
            <span style="color: blue">from </span>minute <span style="color: blue">in </span>0.To(59)
            <span style="color: blue">where </span>minute % 15 == 0
            <span style="color: blue">select string</span>.Format(<span style="color: #a31515">"{0:00}:{1:00}"</span>, hour, minute);</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<h2>Using LinqPad to Test the Result</h2>
<p>Now, if you haven&#8217;t already, go <a href="http://www.linqpad.net/" target="_blank">download LinqPad from here</a>, and open it up. You will see a window to write a statement in the top right.</p>
<p>Before you continue, you need to add the extension methods to use my &#8220;To()&#8221; method. As a treat, just for you, <a href="http://www.richardbushnell.net/wp-content/uploads/2008/01/richardbushnellextensions.zip" target="_blank">here&#8217;s a simple assembly and a code file</a> you can use straight away. Download it, save the binary dll somewhere, then do the following in LinqPad:</p>
<ol>
<li>From the menu, click &#8220;Query&#8221;, then &#8220;Advanced Properties&#8221; (or press F4).
<li>On the Additional References tab, click the &#8220;Add&#8230;&#8221; button.
<li>Click the &#8220;Browse&#8230;&#8221; button on the window which pops up.
<li>Go to the location you saved RichardBushnell.Extensions.dll to, and select it. You should see it added to the list of additional references.
<li>Change to the Additional Namespace Imports tab.
<li>Type &#8220;RichardBushnell.Extensions&#8221;
<li>Click &#8220;OK&#8221;. </li>
</ol>
<p>Now, put your cursor in the Query1 tab, and paste in the following:</p>
<pre class="code"><span style="color: blue">from </span><span style="color: black">hour </span><span style="color: blue">in </span><span style="color: #c81efa">0</span><span style="color: black">.To(</span><span style="color: #c81efa">23</span><span style="color: black">)
</span><span style="color: blue">from </span><span style="color: black">minute </span><span style="color: blue">in </span><span style="color: #c81efa">0</span><span style="color: black">.To(</span><span style="color: #c81efa">59</span><span style="color: black">)
</span><span style="color: blue">where </span><span style="color: black">minute % </span><span style="color: #c81efa">15 </span><span style="color: black">== </span><span style="color: #c81efa">0
</span><span style="color: blue">select string</span><span style="color: black">.Format(</span><span style="color: #dc1414">"{0:00}:{1:00}"</span><span style="color: black">, hour, minute)</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Press F5, and you will see a generated list like this:</p>
<p><a href="http://www.richardbushnell.net/wp-content/uploads/2008/01/image2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="176" alt="image" src="http://www.richardbushnell.net/wp-content/uploads/2008/01/image-thumb2.png" width="244" border="0"></a></p>
<p>And that&#8217;s it! You can now see <em>exactly</em> what you will get when you run this code.</p>
<p>What do you think? I&#8217;d love to hear your comments.</p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2008%2F01%2F18%2Fusing-linqpad-to-create-a-time-selector-drop-down-list%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2008/01/18/using-linqpad-to-create-a-time-selector-drop-down-list/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A simple Mix-in with C# 3.0</title>
		<link>http://www.richardbushnell.net/2007/12/25/a-simple-mix-in-with-c-sharp-3_0/</link>
		<comments>http://www.richardbushnell.net/2007/12/25/a-simple-mix-in-with-c-sharp-3_0/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 18:50:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[C# mixins ruby]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/index.php/2007/12/25/a-simple-mix-in-with-c-30/</guid>
		<description><![CDATA[Heard of mix-ins? They&#8217;re an alternative to multiple inheritance, made popular recently by Ruby. Basically, you can use them to &#8220;mix in&#8221; methods from an interface with their implementations into a class. In Ruby you can do this by including a module in a class. In C#, you do it by implementing an interface and [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2007%2F12%2F25%2Fa-simple-mix-in-with-c-sharp-3_0%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p>Heard of mix-ins? They&#8217;re an alternative to multiple inheritance, made popular recently by Ruby. </p>
<p>Basically, you can use them to &#8220;mix in&#8221; methods from an interface <strong>with their implementations</strong> into a class.</p>
<p>In Ruby you can do this by including a module in a class. In C#, you do it by implementing an interface and defining an extension method for the interface.</p>
<p>Here&#8217;s a simple example.</p>
<p>First, define the interface. In this case, it won&#8217;t have any special features, so the interface is empty. We&#8217;ll call it IDebug, as it is going to let us call a method to get details of the object it is implemented on.</p>
<pre class="code"><span style="color: blue">public interface </span><span style="color: #2b91af">IDebug
</span>{
}</pre>
<p>After the interface is set, define a static class with an extension method for the interface. We&#8217;ll just define one method here, called &#8220;GetTypeInfo&#8221;.</p>
<pre class="code"><span style="color: blue">public static class </span><span style="color: #2b91af">DebugExtensions
</span>{
  <span style="color: blue">public static string </span>GetTypeInfo(<span style="color: blue">this </span><span style="color: #2b91af">IDebug </span>debug)
  {
    <span style="color: blue">return </span><span style="color: #2b91af">String</span>.Format(<span style="color: #a31515">"{0} ({1}): {2}"</span>
	, debug.GetType().Name
        , debug.GetHashCode().ToString()
        , debug.ToString());
  }
}</pre>
<p>The method returns the name of the <em>class </em>(not the interface) where the interface is implemented, plus a few extra bits of information.</p>
<p>Now implement a couple of classes which implement the interface. </p>
<p><span style="color: blue">class </span><span style="color: #2b91af">MyClass </span>: <span style="color: #2b91af">IDebug<br /></span>{<br />&nbsp; <span style="color: blue">public override string </span>ToString()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; <span style="color: blue">return </span><span style="color: #a31515">&#8220;I am an instance of MyClass&#8221;</span>;<br />&nbsp; }<br />}</p>
<p><span style="color: blue">class </span><span style="color: #2b91af">MyOtherClass </span>: <span style="color: #2b91af">IDebug<br /></span>{<br />&nbsp; <span style="color: blue">public override string </span>ToString()<br />&nbsp; {<br />&nbsp;&nbsp;&nbsp; <span style="color: blue">return </span><span style="color: #a31515">&#8220;I am an instance of MyOtherClass&#8221;</span>;<br />&nbsp; }<br />}</p>
<p>Now, magically, the method &#8220;GetTypeInfo&#8221; is included with the class as an extension method.</p>
<p>In the method you call this from, you then need add a &#8220;using&#8221; declaration for the namespace of the extension class.</p>
<p>After you&#8217;ve done that you can call the method from the mix-in.</p>
<pre class="code"><span style="color: blue">var </span>myObj = <span style="color: blue">new </span><span style="color: #2b91af">MyClass</span>();
<span style="color: blue">var </span>myObj2 = <span style="color: blue">new </span><span style="color: #2b91af">MyOtherClass</span>();
<span style="color: #2b91af">Console</span>.WriteLine(myObj.GetTypeInfo());
<span style="color: #2b91af">Console</span>.WriteLine(myObj2.GetTypeInfo());</pre>
<p><a href="http://11011.net/software/vspaste"></a>The output of this is:</p>
<p><font face="Courier New" size="2">MyClass (7995840): I am an instance of MyClass<br />MyOtherClass (56251872): I am an instance of MyOtherClass</font></p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2007%2F12%2F25%2Fa-simple-mix-in-with-c-sharp-3_0%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2007/12/25/a-simple-mix-in-with-c-sharp-3_0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qualities of a .Net Application Design</title>
		<link>http://www.richardbushnell.net/2007/12/23/qualities-of-a-dot-net-application-design/</link>
		<comments>http://www.richardbushnell.net/2007/12/23/qualities-of-a-dot-net-application-design/#comments</comments>
		<pubDate>Sun, 23 Dec 2007 11:00:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Quaility]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[architecture software quality .net asp.net scalability]]></category>

		<guid isPermaLink="false">http://richardbushnell.net/?p=8</guid>
		<description><![CDATA[I&#8217;m often asked to produce design documents for new applications. I can&#8217;t do this without discussing the advantages and disadvantages to each part of the design. A great way to do this is to focus on the desired qualities of the system you&#8217;re trying to build. Define the qualities you are trying to achieve, and [...]]]></description>
			<content:encoded><![CDATA[
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2007%2F12%2F23%2Fqualities-of-a-dot-net-application-design%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<br><p>I&#8217;m often asked to produce design documents for new applications. I can&#8217;t do this without discussing the advantages and disadvantages to each part of the design. A great way to do this is to focus on the desired qualities of the system you&#8217;re trying to build. Define the qualities you are trying to achieve, and design each part of the system to match those qualities as best as possible.</p>
<p>It helps to have a list of things to consider. Here&#8217;s a list of some of the qualities you need to address for a .typical Net application:</p>
<h2></h2>
<h2>Development-Time Qualities</h2>
<ul>
<li><strong>Modifiability</strong> &#8211; (Often called &#8220;<strong>flexibility</strong>&#8220;, and especially important for agile development.) How easily can the software be modified to additional requirements and changes? Can changes be localized to as little code as possible? Do public interfaces have to change? How are the parts of the application dependent on one another? Are the most-likely-to-change areas of the application depended upon to be stable? To what extent are concerns separated?
<li><strong>Reusability</strong> &#8211; Can units of the application be reused elsewhere? Does the code fit the &#8220;DRY&#8221; principle (Don&#8217;t Repeat Yourself)? Does the system make good use of existing standards? Reusing code from other frameworks and systems can help keep testing and maintenance down, but reduce modifiability.
<li><strong>Portability</strong> &#8211; Could the system be easily ported to other platforms? This is often not an issue for most enterprise applications, as business requirements typically change more frequently than the technical platforms, and the .Net framework takes care of most of the issues. For a web application, portability could also include browser compatibility. What happens if the users suddenly receive an upgrade to their browsers?
<li><strong>Testability</strong> &#8211; How easy is it to prove that the application functions correctly, and that the various parts of the application do what they are supposed to do in isolation of one another? Can the application be tested automatically? Can the application eventually be tested easily end-to-end as part of an integration test? Can the application be load-tested?
<li><strong>Buildability</strong> &#8211; Can the application be built on systems other than those in the development environment? How often can it be built? The more often it can be built, the better. What tools can be used to do the builds? Can they implement continuous integration by building at every check-in? Which third-party controls or components are used? What part do licenses for third-party products play in the ability to build centrally?
<li><strong>Maintainability</strong> &#8211; How easy is it to understand the software for people other than the original developers? How easy is it to correct defects? Is the system documented enough to make it understandable?
<li><strong>Debugability</strong> &#8211; How easy is it to find out where and why there is an error in the system? How easy is it to find what is going wrong in a live, productive system?
<li><strong>Extensibility</strong> &#8211; How easy is it to extend the functionality of the system beyond its original specification?</li>
</ul>
<h2>Runtime Qualities</h2>
<ul>
<li><strong>Functionality</strong> &#8211; How well does the software help the users to do their work? Are there missing features which make the software useless? Does the software provide end-to-end support for a particular process?
<li><strong>Usability</strong> &#8211; How easy is it for users to understand and learn to use the software?&nbsp; Is the interface intuitive? Is there a supportive help system? Does the user interface match the users&#8217; needs? Are basic usability standards and conventions adhered to?
<li><strong>Performance</strong> &#8211; Does the system perform fast enough? How does it perform when multiple users are active? Where are the bottlenecks and latency in the system?
<li><strong>Concurrency</strong> &#8211; Is it possible for more than one user to use the system at a time? What is the performance impact of multiple sessions? Is state shared across the application, making the system unreliable?
<li><strong>Security</strong> &#8211; Does the system prevent unauthorized access or misuse? What happens if access is wrongly denied to a user? How easy can security be administrated? Does the STRIDE threat model show up any weaknesses? What is the potential outcome of a successful attack?&nbsp;
<li><strong>Integrity</strong> &#8211; This can be related to security, but it also refers to the data integrity of the system. Is the data always kept in a consistent state, or is it sometimes possible to infer different states of the system because of inconsistencies in the system? Do transactions pass the ACID test?
<li><strong>Reliability</strong> &#8211; Can the users rely on the software? Will it always perform correctly? Is it still usable at peak usage periods?
<li><strong>Availability</strong> &#8211; How often and for how long is the system available for use? How do upgrades affect its availability? Is the system meant to be used across time-zones?
<li><strong>Scalability</strong> &#8211; How does the software cope with adding more users over time? Can the system cope with an increase in the volume of data? What happens if the users start to use the system more often? Must the software scale up or can it scale out?
<li><strong>Deployability</strong> &#8211; How easy is it to deploy the initial release of the software? How easy is it to release future releases? Does software need to be replaced, or just patched? How does the deployment affect scalability?
<li><strong>Ugradability</strong> &#8211; Can a new version be deployed without stopping the normal operation of the system? What must be changed or upgraded when a new version is released? What third-party software may be upgraded which would affect the software?
<li><strong>Correctness</strong> &#8211; Does the software do exactly what was specified?
<li><strong>Conceptual Integrity</strong> &#8211; How balanced, simple, elegant, and practical is the whole system? Is there a clear vision as to what the software should do? Is the design consistent?
<li><strong>User Responsiveness</strong> &#8211; Related to performance and usability; how does the user perceive the application to be responding? Does the system stop responding for long periods of time, especially when retrieving data? Does the latency of parts of the system lead to decreased usability? Does the software use multiple threads to improve responsiveness?
<li><strong>Interoperability</strong> &#8211; How easily can the system be used with other systems?
<li><strong>Robustness</strong> &#8211; How does the system react to abnormal conditions? Does it crash, or recover gracefully? Do error messages baffle users and decrease usability?</li>
</ul>
<h2>Priorities</h2>
<p>Software qualities must always be balanced against one another. There&#8217;s no point in having performance good enough for MySpace.com if it&#8217;s not needed, for example, especially if it makes maintenance harder. Each quality has a particular importance for the system being developed. </p>
<p>In general the highest priority qualities are:</p>
<ul>
<li>Maintainability
<li>Correctness
<li>Reliability</li>
</ul>
<p>Also important for .Net Object-Oriented design are:</p>
<ul>
<li>Reusability
<li>Extensibility</li>
</ul>
<p>Most of what I focus on in my day-to-day work is focused on good maintainability and modifiability. Changes come along all the time, and the people paying for the software want them done fast. The faster you can adapt to their needs, the more they trust you, and the better your business relationship.</p>

<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.richardbushnell.net%2F2007%2F12%2F23%2Fqualities-of-a-dot-net-application-design%2F&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="false" style="border:none; overflow:; width:450px; height:30px"></iframe>
<!-- using Like-Button-Plugin-For-Wordpress [v4.2] | by http://www.gb-world.net -->
]]></content:encoded>
			<wfw:commentRss>http://www.richardbushnell.net/2007/12/23/qualities-of-a-dot-net-application-design/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
