<?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>iLude</title>
	<atom:link href="http://www.ilude.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ilude.com</link>
	<description>Any normal person would have stopped at this point, but I'm not a normal person, I'm a geek, a geek beyond reason.</description>
	<lastBuildDate>Wed, 24 Feb 2010 01:26:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Links to Command and Query Responsibility Segregation (CQRS) Pattern Code and Discussions</title>
		<link>http://www.ilude.com/2010/02/23/links-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2010/02/23/links-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 01:21:39 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2010/02/23/links-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions/</guid>
		<description><![CDATA[In my quest to get a better understanding what the heck Greg Young and Udi Dahan are talking about I’ve been on a search to find examples of how people are actually implementing these patterns.

First off if you are new to this and would like to learn more, I recommend you start with one or [...]]]></description>
			<content:encoded><![CDATA[<p>In my quest to get a better understanding what the heck <a href="http://codebetter.com/blogs/gregyoung/" target="_blank">Greg Young</a> and <a href="http://www.udidahan.com/" target="_blank">Udi Dahan</a> are talking about I’ve been on a search to find examples of how people are actually implementing these patterns.</p>
<p><span id="more-84"></span></p>
<p>First off if you are new to this and would like to learn more, I recommend you start with one or more of the following books:</p>
<p><script src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=US&amp;ID=V20070822/US/ilude-20/8001/d6248c4f-9b2b-4449-9f6c-44692ab69246" type="text/javascript"> </script> <noscript><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&#038;MarketPlace=US&#038;ID=V20070822%2FUS%2Filude-20%2F8001%2Fd6248c4f-9b2b-4449-9f6c-44692ab69246&#038;Operation=NoScript" mce_HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&amp;MarketPlace=US&amp;ID=V20070822%2FUS%2Filude-20%2F8001%2Fd6248c4f-9b2b-4449-9f6c-44692ab69246&amp;Operation=NoScript">Amazon.com Widgets</A></noscript></p>
<p>They will get you started with Domain Driven Design and messaging. For the most part these books will get you up to speed so you can talk the talk. Once you’ve got a solid understanding of the vocabulary, you be were I think a lot of us are. How do we apply Eventing/Messaging to our domain models?</p>
<p>So here are a few links to help out:</p>
<p>First off is <a href="http://elegantcode.com/about/mark-nijhof/" target="_blank">Mark Nijhof&#8217;s</a> <a href="http://elegantcode.com/2009/11/11/cqrs-la-greg-young/" target="_blank">excellent series of posts</a> that lead to his <a href="http://github.com/MarkNijhof/Fohjin" target="_blank">Fohjin Example Application</a>. If your looking for public C# code to learn from this is it.</p>
<p>Second is <a href="http://blog.xebia.com/author/erozendaal/" target="_blank">Erik Rozendaal</a> who wrote a <a href="http://github.com/erikrozendaal/cqrs-lottery" target="_blank">lottery example</a> to help <a href="http://blog.xebia.com/2009/12/03/domain-driven-design-and-command-query-separation-example-application/" target="_blank">train his coworkers</a>. Erik’s code is written in Java.</p>
<p>Another Java implementation is the <a href="http://code.google.com/p/axonframework/" target="_blank">Axon Framework</a>. I’ve not had a chance to check this one out yet. But the guys building it blog over at <a href="http://www.gridshore.nl/" target="_blank">Girdshore</a>.</p>
<p>Finally there’s <a href="http://thinkbeforecoding.com">Jérémie Chassaing</a> blog and although he doesn’t have code to download his <a href="http://thinkbeforecoding.com/tag/CQRS" target="_blank">series of posts on cqrs</a> has lots of code examples that he discusses.</p>
<p>Hopefully this is helpful. If you know of other code examples please let me know in the comments.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions&amp;bodytext=In%20my%20quest%20to%20get%20a%20better%20understanding%20what%20the%20heck%20Greg%20Young%20and%20Udi%20Dahan%20are%20talking%20about%20I%E2%80%99ve%20been%20on%20a%20search%20to%20find%20examples%20of%20how%20people%20are%20actually%20implementing%20these%20patterns.%0D%0A%0D%0A%0D%0A%0D%0AFirst%20off%20if%20you%20are%20new%20to%20this%20and%20would%20like" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions&amp;notes=In%20my%20quest%20to%20get%20a%20better%20understanding%20what%20the%20heck%20Greg%20Young%20and%20Udi%20Dahan%20are%20talking%20about%20I%E2%80%99ve%20been%20on%20a%20search%20to%20find%20examples%20of%20how%20people%20are%20actually%20implementing%20these%20patterns.%0D%0A%0D%0A%0D%0A%0D%0AFirst%20off%20if%20you%20are%20new%20to%20this%20and%20would%20like" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;t=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions&amp;annotation=In%20my%20quest%20to%20get%20a%20better%20understanding%20what%20the%20heck%20Greg%20Young%20and%20Udi%20Dahan%20are%20talking%20about%20I%E2%80%99ve%20been%20on%20a%20search%20to%20find%20examples%20of%20how%20people%20are%20actually%20implementing%20these%20patterns.%0D%0A%0D%0A%0D%0A%0D%0AFirst%20off%20if%20you%20are%20new%20to%20this%20and%20would%20like" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=In%20my%20quest%20to%20get%20a%20better%20understanding%20what%20the%20heck%20Greg%20Young%20and%20Udi%20Dahan%20are%20talking%20about%20I%E2%80%99ve%20been%20on%20a%20search%20to%20find%20examples%20of%20how%20people%20are%20actually%20implementing%20these%20patterns.%0D%0A%0D%0A%0D%0A%0D%0AFirst%20off%20if%20you%20are%20new%20to%20this%20and%20would%20like" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions&amp;body=In%20my%20quest%20to%20get%20a%20better%20understanding%20what%20the%20heck%20Greg%20Young%20and%20Udi%20Dahan%20are%20talking%20about%20I%E2%80%99ve%20been%20on%20a%20search%20to%20find%20examples%20of%20how%20people%20are%20actually%20implementing%20these%20patterns.%0D%0A%0D%0A%0D%0A%0D%0AFirst%20off%20if%20you%20are%20new%20to%20this%20and%20would%20like" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F&amp;title=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Links%20to%20Command%20and%20Query%20Responsibility%20Segregation%20%28CQRS%29%20Pattern%20Code%20and%20Discussions%20-%20http%3A%2F%2Fwww.ilude.com%2F2010%2F02%2F23%2Flinks-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2010/02/23/links-to-command-and-query-responsibility-segregation-cqrs-pattern-code-and-discussions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New Year, New Challenges</title>
		<link>http://www.ilude.com/2010/01/18/new-year-new-challenges/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2010/01/18/new-year-new-challenges/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 03:47:44 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2010/01/18/new-year-new-challenges/</guid>
		<description><![CDATA[Just a short personal post.&#160; Its a new year and I’m facing some new self created challenges.
 
&#160;&#160;&#160;&#160; My first child arrived at the end of November to change my life and steal my heart. And although taking care of her and mom occupies a lot of my time. I still want to make time [...]]]></description>
			<content:encoded><![CDATA[<p>Just a short personal post.&#160; Its a new year and I’m facing some new self created challenges.</p>
<p><a href="http://www.ilude.com/wp-content/uploads/2010/01/bathtime.jpg#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="bathtime" border="0" alt="bathtime" align="left" src="http://www.ilude.com/wp-content/uploads/2010/01/bathtime_thumb.jpg" width="140" height="244" /></a> </p>
<blockquote><p>&#160;&#160;&#160;&#160; My first child arrived at the end of November to change my life and steal my heart. And although taking care of her and mom occupies a lot of my time. I still want to make time to get more posts up this year. </p>
</blockquote>
<p>&#160;&#160;&#160;&#160; So thanks for stopping by and I hope I have something to share this year that is helpful, entertaining and at least a bit educational.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges&amp;bodytext=Just%20a%20short%20personal%20post.%26%23160%3B%20Its%20a%20new%20year%20and%20I%E2%80%99m%20facing%20some%20new%20self%20created%20challenges.%20%20%20%20%20%20%20%20%26%23160%3B%26%23160%3B%26%23160%3B%26%23160%3B%20My%20first%20child%20arrived%20at%20the%20end%20of%20November%20to%20change%20my%20life%20and%20steal%20my%20heart.%20And%20although%20taking%20care%20of%20her%20an" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges&amp;notes=Just%20a%20short%20personal%20post.%26%23160%3B%20Its%20a%20new%20year%20and%20I%E2%80%99m%20facing%20some%20new%20self%20created%20challenges.%20%20%20%20%20%20%20%20%26%23160%3B%26%23160%3B%26%23160%3B%26%23160%3B%20My%20first%20child%20arrived%20at%20the%20end%20of%20November%20to%20change%20my%20life%20and%20steal%20my%20heart.%20And%20although%20taking%20care%20of%20her%20an" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;t=New%20Year%2C%20New%20Challenges" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges&amp;annotation=Just%20a%20short%20personal%20post.%26%23160%3B%20Its%20a%20new%20year%20and%20I%E2%80%99m%20facing%20some%20new%20self%20created%20challenges.%20%20%20%20%20%20%20%20%26%23160%3B%26%23160%3B%26%23160%3B%26%23160%3B%20My%20first%20child%20arrived%20at%20the%20end%20of%20November%20to%20change%20my%20life%20and%20steal%20my%20heart.%20And%20although%20taking%20care%20of%20her%20an" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=Just%20a%20short%20personal%20post.%26%23160%3B%20Its%20a%20new%20year%20and%20I%E2%80%99m%20facing%20some%20new%20self%20created%20challenges.%20%20%20%20%20%20%20%20%26%23160%3B%26%23160%3B%26%23160%3B%26%23160%3B%20My%20first%20child%20arrived%20at%20the%20end%20of%20November%20to%20change%20my%20life%20and%20steal%20my%20heart.%20And%20although%20taking%20care%20of%20her%20an" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges&amp;body=Just%20a%20short%20personal%20post.%26%23160%3B%20Its%20a%20new%20year%20and%20I%E2%80%99m%20facing%20some%20new%20self%20created%20challenges.%20%20%20%20%20%20%20%20%26%23160%3B%26%23160%3B%26%23160%3B%26%23160%3B%20My%20first%20child%20arrived%20at%20the%20end%20of%20November%20to%20change%20my%20life%20and%20steal%20my%20heart.%20And%20although%20taking%20care%20of%20her%20an" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F&amp;title=New%20Year%2C%20New%20Challenges" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=New%20Year%2C%20New%20Challenges%20-%20http%3A%2F%2Fwww.ilude.com%2F2010%2F01%2F18%2Fnew-year-new-challenges%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2010/01/18/new-year-new-challenges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Messaging and MVC</title>
		<link>http://www.ilude.com/2009/07/25/thoughts-on-messaging-and-mvc/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2009/07/25/thoughts-on-messaging-and-mvc/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 07:46:32 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2009/07/25/thoughts-on-messaging-and-mvc/</guid>
		<description><![CDATA[When I start to learn a new style of programming I like to experiment by creating my own versions of things. This has lead to writing my own ORM framework and Mime parser just to name a few of my coding accomplishments for which I pride my self. Writing each was a valuable learning experience [...]]]></description>
			<content:encoded><![CDATA[<p>When I start to learn a new style of programming I like to experiment by creating my own versions of things. This has lead to writing my own ORM framework and Mime parser just to name a few of my coding accomplishments for which I pride my self. Writing each was a valuable learning experience that allowed me a much better understanding of similar software systems. <span id="more-78"></span></p>
<p>So when I started reading about messaging and Command Query Separation I became interested in how they could be implemented in an ASP.NET MVC style application. The biggest issue I faced was the fact that messaging is an asynchronous environment. You publish your message and can go off and do other things while waiting for a response. But in a controller action your command message seemed to be the summation of action call. For instance say you wanted to add an item to a shopping cart. You create an AddItemToCartCommand and publish it to the message bus. Now you need to wait for the response message that the item was added to the cart, or otherwise failed to be added (say the item was discontinued).  With most of the service bus implementations handling this situation seemed overly complex. So I coded up a spike to see how I could address the problem while trying to keep things simple and discoverable.  What is displayed below is working code and I will publish the implementation details in a follow up post. For now I want to focus on the syntax of how its used.</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; height: 333px; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"><span style="color: #0000ff">using</span> System;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #0000ff">using</span> iLude.Messaging.Core;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"><span style="color: #0000ff">using</span> iLude.Messaging.Engine;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #0000ff">using</span> iLude.Messaging.Tests.Support.Messages;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"><span style="color: #0000ff">using</span> NUnit.Framework;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #0000ff">using</span> NUnit.Framework.SyntaxHelpers;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"><span style="color: #0000ff">namespace</span> iLude.Messaging.Tests {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    [TestFixture]</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> ExampleTests {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        <span style="color: #0000ff">private</span> IServiceBus bus;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        [SetUp]</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Setup() {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            bus = <span style="color: #0000ff">new</span> ServiceBus();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        [Test]</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> When_request_is_sent_should_receive_response() {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            var messageReceived = <span style="color: #0000ff">false</span>;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            var timeoutCalled = <span style="color: #0000ff">false</span>;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            bus.Subscribe(<span style="color: #0000ff">this</span>).To&lt;RequestMessage&gt;().HandledBy((x, message) =&gt; x.ProcessRequest(message));</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            <span style="color: #0000ff">using</span>(IMessagingSession session = bus.GetSession()) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                session.Publish( <span style="color: #0000ff">new</span> RequestMessage { Body = <span style="color: #006080">"Hello World"</span> } )</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                    .WaitFor&lt;ResponseMessage&gt;(message =&gt; {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                        messageReceived = <span style="color: #0000ff">true</span>;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                    }).OrTimeoutAfter(1.Seconds(), () =&gt; {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                        timeoutCalled = <span style="color: #0000ff">true</span>;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                    });</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            Assert.That(messageReceived, Is.True);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            Assert.That(timeoutCalled, Is.False);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> ProcessRequest(RequestMessage message) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            bus.Publish(<span style="color: #0000ff">new</span> ResponseMessage(message.ID));</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">}</pre>
</div>
</div>
<p>First off lets look at the setup of a message handler.</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">bus.Subscribe(<span style="color: #0000ff">this</span>).To&lt;RequestMessage&gt;().HandledBy((x, message) =&gt; x.ProcessRequest(message));</pre>
</div>
</div>
<p>For this I could have gone the traditional interface route, but I decided against it for a number of reasons. Chief among those reason is that it limits future convention of configuration possibilities. Instead I opted to use a lambda function to specify the method I wished to be called to handle the message. In this case I also choose to pass in a specific instance that will be notified, But a generic override is also available so that only a class type need specified. The bus will then use an <a href="http://codebetter.com/blogs/jeremy.miller/archive/2005/11/18/134816.aspx" target="_blank">IOC</a> container to fetch an instance of that type to handle the published message.</p>
<p>In this case the handling method is pretty simple.</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"><span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> ProcessRequest(RequestMessage message) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    bus.Publish(<span style="color: #0000ff">new</span> ResponseMessage(message.ID));</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">}</pre>
</div>
</div>
<p>We receive a copy of the published message and sent out a response. The ResponseMessage is passed the original message id, which it will use as the correlative ID.</p>
<p>Now we can get to the meat and potatoes:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"><span style="color: #0000ff">using</span>(IMessagingSession session = bus.GetSession()) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    session.Publish( <span style="color: #0000ff">new</span> RequestMessage { Body = <span style="color: #006080">"Hello World"</span> } )</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        .WaitFor&lt;ResponseMessage&gt;(message =&gt; {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            messageReceived = <span style="color: #0000ff">true</span>;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        }).OrTimeoutAfter(1.Seconds(), () =&gt; {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            timeoutCalled = <span style="color: #0000ff">true</span>;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        });</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">}</pre>
</div>
</div>
<p>First we create a new MessagingSession that is disposable. This session is our Unit of Work. I use it to provide synchronization around this asynchronous operation. The operation is to publish a request message and wait for a response. If we receive one we process the anonymous function which sets messageReceived = true. Otherwise if we have not gotten a response after 1 second we should set timeoutCalled = true.  The publish method and its child methods return nearly instantly and execution in the current thread continues to the end of the using statement.</p>
<p>This is where the magic happens, in the session’s dispose method.</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"><span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Dispose() {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    bus.Publish(request);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    <span style="color: #0000ff">if</span>(resetEvent.WaitOne(timeout)) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        action.DynamicInvoke(response);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    <span style="color: #0000ff">else</span> <span style="color: #0000ff">if</span>(timeoutAction != <span style="color: #0000ff">null</span>) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        timeoutAction.DynamicInvoke();</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">}</pre>
</div>
</div>
<p>At this point the message has not yet been published by the session. When the session’s Dispose method is called it will publish the message to the bus and then blocks the thread using a ManualResetEvent to wait for a response. The session does this by subscribing to the message bus for the requested response message type. If it received a response message with the proper correlative ID it sets the ManualResetEvent. This unblocks the dispose method to invoke the anonymous function. Otherwise if the timeout expires the specified timeout function is called.</p>
<p>I would be very interested in hearing your thoughts on this idea. As I stated this is only a spike and I have not pushed it much beyond this stage. I am also very new to messaging and as such may be doing more than my fair share of bad practices.  So all feedback is welcome.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC&amp;bodytext=When%20I%20start%20to%20learn%20a%20new%20style%20of%20programming%20I%20like%20to%20experiment%20by%20creating%20my%20own%20versions%20of%20things.%20This%20has%20lead%20to%20writing%20my%20own%20ORM%20framework%20and%20Mime%20parser%20just%20to%20name%20a%20few%20of%20my%20coding%20accomplishments%20for%20which%20I%20pride%20my%20self.%20Writ" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC&amp;notes=When%20I%20start%20to%20learn%20a%20new%20style%20of%20programming%20I%20like%20to%20experiment%20by%20creating%20my%20own%20versions%20of%20things.%20This%20has%20lead%20to%20writing%20my%20own%20ORM%20framework%20and%20Mime%20parser%20just%20to%20name%20a%20few%20of%20my%20coding%20accomplishments%20for%20which%20I%20pride%20my%20self.%20Writ" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;t=Thoughts%20on%20Messaging%20and%20MVC" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC&amp;annotation=When%20I%20start%20to%20learn%20a%20new%20style%20of%20programming%20I%20like%20to%20experiment%20by%20creating%20my%20own%20versions%20of%20things.%20This%20has%20lead%20to%20writing%20my%20own%20ORM%20framework%20and%20Mime%20parser%20just%20to%20name%20a%20few%20of%20my%20coding%20accomplishments%20for%20which%20I%20pride%20my%20self.%20Writ" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=When%20I%20start%20to%20learn%20a%20new%20style%20of%20programming%20I%20like%20to%20experiment%20by%20creating%20my%20own%20versions%20of%20things.%20This%20has%20lead%20to%20writing%20my%20own%20ORM%20framework%20and%20Mime%20parser%20just%20to%20name%20a%20few%20of%20my%20coding%20accomplishments%20for%20which%20I%20pride%20my%20self.%20Writ" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC&amp;body=When%20I%20start%20to%20learn%20a%20new%20style%20of%20programming%20I%20like%20to%20experiment%20by%20creating%20my%20own%20versions%20of%20things.%20This%20has%20lead%20to%20writing%20my%20own%20ORM%20framework%20and%20Mime%20parser%20just%20to%20name%20a%20few%20of%20my%20coding%20accomplishments%20for%20which%20I%20pride%20my%20self.%20Writ" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F&amp;title=Thoughts%20on%20Messaging%20and%20MVC" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Thoughts%20on%20Messaging%20and%20MVC%20-%20http%3A%2F%2Fwww.ilude.com%2F2009%2F07%2F25%2Fthoughts-on-messaging-and-mvc%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2009/07/25/thoughts-on-messaging-and-mvc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dropdown Menus of Simplicity</title>
		<link>http://www.ilude.com/2009/04/30/dropdown-menus-of-simplicity/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2009/04/30/dropdown-menus-of-simplicity/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 15:07:55 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2009/04/30/dropdown-menus-of-simplicity/</guid>
		<description><![CDATA[One of those things that I’m often asked for by clients is “Can we have a drop down menu across the top?” To which I answer “Sure!”. And then once I start trying to work their look and feel into some jquery, javascript and CSS menuing plug-in I suddenly recall that I hate mutating someone [...]]]></description>
			<content:encoded><![CDATA[<p>One of those things that I’m often asked for by clients is “Can we have a drop down menu across the top?” To which I answer “Sure!”. And then once I start trying to work their look and feel into some jquery, javascript and CSS menuing plug-in I suddenly recall that I hate mutating someone else&#8217;s mess of html, css and javascript into something that still works across all the browsers and looks like what the client wants. YUCK!</p>
<p><span id="more-72"></span></p>
<p>So not to long ago I set out to find the simplest example of a cross browser dropdown menu that I could find. I found many examples but none were exactly right for my needs. So I started playing around with some of the ideas and here’s what I came up with.</p>
<p>First things first. There are four major browsers on the market: IE, Firefox, Safari and Google Chrome. The last three browsers will just work but for that first one much gnashing of teeth and swearing can be directed its way. So to get everyone to play nicely we start with a strict doctype like this:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;!DOCTYPE html PUBLIC <span style="color: #006080">"-//W3C//DTD HTML 4.01//EN"</span> <span style="color: #006080">"http://www.w3.org/TR/html4/strict.dtd"</span>&gt;</pre>
</div>
</div>
<p>Strict XHTML will work as well. Now lets look at some HTML for the menu:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;div <span style="color: #0000ff">class</span>=<span style="color: #006080">"menu"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        &lt;a href=<span style="color: #006080">"#"</span>&gt;Lorem&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;/span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        &lt;a href=<span style="color: #006080">"#"</span>&gt;Ipsum&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        &lt;div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Dolor sit amet&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Consectetur adipisicing&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Eiusmod tempor&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;/span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        &lt;a href=<span style="color: #006080">"#"</span>&gt;Officia&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        &lt;div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Nemo enim ipsam&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Dolore magnam&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Suscipit laboriosam&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;/span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;/div&gt;</pre>
</div>
</div>
<p>An important note: DO NOT PUT LINE RETURNS AND INDENTS INSIDE THE ANCHOR TAGS! Once again our favorite browser IE will not function correctly if you do this. So keep your anchor tags all on one line.</p>
<p>Now here is the fun part for all of the latest browsers we only need some simple CSS to make the menu work. Lets take a look:</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">.menu span {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    <span style="color: #0000ff">float</span>:left;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    margin-right:10px;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    position: relative;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    z-index: 100;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">}</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">.menu a {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    text-decoration: none;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    display: block;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">}</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">.menu span:hover div, .menu span div:hover {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    display: block;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">}</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">.menu span div {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    border: 1px solid black;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    padding: 5px;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    background-color: white;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    display: none;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    position: absolute;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    white-space: nowrap;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">}</pre>
</div>
</div>
<p>Once you get a sample page put together with this play around with the margins, padding, borders and colors to get a feel for their effects on this basic look and feel. The floats, display and position attributes are the important ones that make this menu work.</p>
<p>Inevitably someone will say to you “Hey this doesn’t work in my browser!”. And your response  should be “Upgrade to a more recent version of IE before you are <a href="http://secunia.com/advisories/product/11/" target="_blank">infected with anymore viruses and trojans</a> you <a href="http://en.wikipedia.org/wiki/Luddite" target="_blank">luddite</a>!” But if that fails because of corporate policy or other brain dead arguments and you are forced to deal with the reality that some people still drive <a href="http://en.wikipedia.org/wiki/Ford_Pinto#Safety_problems_and_scandal" target="_blank">Ford Pintos</a> there is a solution. <a href="http://jquery.com/" target="_blank">JQuery</a> to the rescue!</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;script src=<span style="color: #006080">"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"</span> type=<span style="color: #006080">"text/javascript"</span>&gt;&lt;/script&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">&lt;script type=<span style="color: #006080">"text/javascript"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    $(document).ready(function(){</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        <span style="color: #0000ff">if</span>($.browser.msie &amp;&amp; $.browser.version &lt;= 6.0) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            $(<span style="color: #006080">".menu span"</span>).hover(</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                function() {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                    $(<span style="color: #0000ff">this</span>).children(<span style="color: #006080">"div"</span>).attr(<span style="color: #006080">"style"</span>, <span style="color: #006080">"display: block"</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                },</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                function() {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                    $(<span style="color: #0000ff">this</span>).children(<span style="color: #006080">"div"</span>).attr(<span style="color: #006080">"style"</span>, <span style="color: #006080">""</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            )</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">     });</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;/script&gt;</pre>
</div>
</div>
<p>Basically we are checking if the browser is IE 6 and if so we add the display:block to the child divs of the any span tags. Exactly like the same thing the CSS does. But since IE 6 doesn’t allow :hover on anything but anchor tags (and even that seems flaky to me), we do it this way.</p>
<p>I’ll leave you with the completed page all together for your copying and pasting pleasure!</p>
<div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;!DOCTYPE html PUBLIC <span style="color: #006080">"-//W3C//DTD XHTML 1.0 Strict//EN"</span> <span style="color: #006080">"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">&lt;html xmlns=<span style="color: #006080">"http://www.w3.org/1999/xhtml"</span> xml:lang=<span style="color: #006080">"en"</span> lang=<span style="color: #006080">"en"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;head&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;title&gt;&lt;/title&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;script src=<span style="color: #006080">"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"</span> type=<span style="color: #006080">"text/javascript"</span>&gt;&lt;/script&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;script type=<span style="color: #006080">"text/javascript"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        $(document).ready(function(){</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            <span style="color: #0000ff">if</span>($.browser.msie &amp;&amp; $.browser.version &lt;= 6.0) {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                $(<span style="color: #006080">".menu span"</span>).hover(</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                    function() {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                        $(<span style="color: #0000ff">this</span>).children(<span style="color: #006080">"div"</span>).attr(<span style="color: #006080">"style"</span>, <span style="color: #006080">"display: block"</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                    },</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                    function() {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                        $(<span style="color: #0000ff">this</span>).children(<span style="color: #006080">"div"</span>).attr(<span style="color: #006080">"style"</span>, <span style="color: #006080">""</span>);</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">                    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">                )</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">         });</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;/script&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;style&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    .menu span {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        <span style="color: #0000ff">float</span>:left;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        margin-right:10px;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        position: relative;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        z-index: 100;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    .menu a {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        text-decoration: none;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        display: block;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    .menu span:hover div, .menu span div:hover {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        display: block;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;"></pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    .menu span div {</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        border: 1px solid black;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        padding: 5px;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        background-color: white;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        display: none;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        position: absolute;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        white-space: nowrap;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    }</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;/style&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">&lt;/head&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;body&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">&lt;div <span style="color: #0000ff">class</span>=<span style="color: #006080">"menu"</span>&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        &lt;a href=<span style="color: #006080">"#"</span>&gt;Lorem&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;/span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        &lt;a href=<span style="color: #006080">"#"</span>&gt;Ipsum&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        &lt;div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Dolor sit amet&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Consectetur adipisicing&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Eiusmod tempor&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;/span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">    &lt;span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">        &lt;a href=<span style="color: #006080">"#"</span>&gt;Officia&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        &lt;div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Nemo enim ipsam&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Dolore magnam&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">            &lt;a href=<span style="color: #006080">"#"</span>&gt;Suscipit laboriosam&lt;/a&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">        &lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">    &lt;/span&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">&lt;/div&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;">&lt;/body&gt;</pre>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: #f4f4f4;">&lt;/html&gt;</pre>
</div>
</div>
<p>Suggestions, comments and questions are always welcome…</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity&amp;bodytext=One%20of%20those%20things%20that%20I%E2%80%99m%20often%20asked%20for%20by%20clients%20is%20%E2%80%9CCan%20we%20have%20a%20drop%20down%20menu%20across%20the%20top%3F%E2%80%9D%20To%20which%20I%20answer%20%E2%80%9CSure%21%E2%80%9D.%20And%20then%20once%20I%20start%20trying%20to%20work%20their%20look%20and%20feel%20into%20some%20jquery%2C%20javascript%20and%20CSS%20menuing%20plug-" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity&amp;notes=One%20of%20those%20things%20that%20I%E2%80%99m%20often%20asked%20for%20by%20clients%20is%20%E2%80%9CCan%20we%20have%20a%20drop%20down%20menu%20across%20the%20top%3F%E2%80%9D%20To%20which%20I%20answer%20%E2%80%9CSure%21%E2%80%9D.%20And%20then%20once%20I%20start%20trying%20to%20work%20their%20look%20and%20feel%20into%20some%20jquery%2C%20javascript%20and%20CSS%20menuing%20plug-" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;t=Dropdown%20Menus%20of%20Simplicity" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity&amp;annotation=One%20of%20those%20things%20that%20I%E2%80%99m%20often%20asked%20for%20by%20clients%20is%20%E2%80%9CCan%20we%20have%20a%20drop%20down%20menu%20across%20the%20top%3F%E2%80%9D%20To%20which%20I%20answer%20%E2%80%9CSure%21%E2%80%9D.%20And%20then%20once%20I%20start%20trying%20to%20work%20their%20look%20and%20feel%20into%20some%20jquery%2C%20javascript%20and%20CSS%20menuing%20plug-" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=One%20of%20those%20things%20that%20I%E2%80%99m%20often%20asked%20for%20by%20clients%20is%20%E2%80%9CCan%20we%20have%20a%20drop%20down%20menu%20across%20the%20top%3F%E2%80%9D%20To%20which%20I%20answer%20%E2%80%9CSure%21%E2%80%9D.%20And%20then%20once%20I%20start%20trying%20to%20work%20their%20look%20and%20feel%20into%20some%20jquery%2C%20javascript%20and%20CSS%20menuing%20plug-" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity&amp;body=One%20of%20those%20things%20that%20I%E2%80%99m%20often%20asked%20for%20by%20clients%20is%20%E2%80%9CCan%20we%20have%20a%20drop%20down%20menu%20across%20the%20top%3F%E2%80%9D%20To%20which%20I%20answer%20%E2%80%9CSure%21%E2%80%9D.%20And%20then%20once%20I%20start%20trying%20to%20work%20their%20look%20and%20feel%20into%20some%20jquery%2C%20javascript%20and%20CSS%20menuing%20plug-" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F&amp;title=Dropdown%20Menus%20of%20Simplicity" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Dropdown%20Menus%20of%20Simplicity%20-%20http%3A%2F%2Fwww.ilude.com%2F2009%2F04%2F30%2Fdropdown-menus-of-simplicity%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2009/04/30/dropdown-menus-of-simplicity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What’s in your wallet? – Part 2</title>
		<link>http://www.ilude.com/2009/03/01/whats-in-your-wallet-part-2/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2009/03/01/whats-in-your-wallet-part-2/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 19:30:36 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2009/03/01/whats-in-your-wallet-part-2/</guid>
		<description><![CDATA[I felt I should follow up on my post from yesterday. First I want to say that I’m not trying to bash Jeff or otherwise rub his nose in it. Jeff has stated that he learns best from the “Smackdown”. And I’m nothing if not confrontational  
As I stated, my first dealings with Ayende [...]]]></description>
			<content:encoded><![CDATA[<p>I felt I should follow up on my <a href="http://www.ilude.com/2009/02/28/whats-in-your-wallet/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed" target="_blank">post from yesterday</a>. First I want to say that I’m not trying to bash Jeff or otherwise rub his nose in it. Jeff has stated that he learns best from the “<a href="http://www.codinghorror.com/blog/archives/000630.html" target="_blank">Smackdown</a>”. And I’m nothing if not confrontational <img src='http://www.ilude.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>As I stated, my first dealings with Ayende were back around 2003 or so when the company I worked for tasked me with developing a new webmail program. The previous version had been written in java and functioned but lacked many features that our customers were asking for. At the time the company had the grand idea of the “standard language”, and following the “no one ever got fired for buying Microsoft” logic mandated that C# was to be that language.</p>
<p>One of the major hurdles I ran into was the lack of a performant pop3/mime library. Many were tried but most relied on regular expressions to parse the messages and this would bring the server to its knees if more than one or two users attempted to open their mailbox at the same time. So off I went to write a mime parser.  <span id="more-70"></span></p>
<p>At the same time I was also submitting patches to <a href="http://www.castleproject.org/MonoRail/" target="_blank">Monorail</a> to get the <a href="http://www.castleproject.org/others/nvelocity/index.html" target="_blank">NVelocity</a> engine working on mono. Hammett gladly accepted those patched and even gave me commit privileges. But both he and Ayende endlessly encouraged me to create tests for the functionality I was patching. Sadly I knew nothing of how to write a unit test or even how to run one if I were to write one.  And so patches were created and applied and mime parsers were written and used all without a single unit test.</p>
<p>At first my world was a fairly happy place, but then came the spammers. One of a spammers favorite tricks is to mess with the headers of an email in an attempt to create a header that is read by the client but which can slip past spam detection software. Having a homegrown mime parser deal with these types of emails can quickly takeover ones life. And since the parser had been written fairly quickly and I’m a self taught programmer the parser had, shall we say, a significant amount of <a href="http://martinfowler.com/bliki/TechnicalDebt.html" target="_blank">technical debt</a>!</p>
<p>I was about to take the road so often traveled and start over from scratch on a new mime parser. But this time I decided that after reading up on TDD I would start this attempt writing tests. So I downloaded <a href="http://www.nunit.org/index.php" target="_blank">Nunit</a> and <a href="http://testdriven.net/" target="_blank">TestDriven.Net</a> and started coding.</p>
<p>At first it was awkward. But very soon I fell into a rhythm and within a few hours had a basic working parser and a fair number of tests to go with it. I created tests that called the new parser in the same way the existing code called the old one.  Then I began working with the library of spam messages I had build up for debugging the current engine, creating a unit test for each message. I would compare the output of my parser against the output of another known parser to assure that I was getting the correct data into the correct places in my object model. Soon I was even parsing messages that several of the known parser would fail on. And as new messages came in that failed with the old parser I was able in a matter of minutes to create a new unit test for that message on the new parser.</p>
<p>Sometimes a message would cause the tests to fail, and so I would make changes and get the tests to pass. Then I would rerun the entire test suite and find that the changes I’d made to would cause an old message to be parsed incorrectly. And so further changes were made until all the tests passed. And it was at one of those times that I became a TDD believer. I realized the incredible value that TDD brought to my development.  I had created a zero friction environment to code this parser in.</p>
<p>But there was more to it than just the tests. The code I was writing was cleaner and had far better separation of concerns. The changes I needed to make were easier to make. The other principles that Ayende and other members of the <a href="http://www.castleproject.org/" target="_blank">Castle Project</a> were talking about, like <a href="http://www.objectmentor.com/resources/articles/srp.pdf" target="_blank">SRP</a> and <a href="http://codebetter.com/blogs/jeremy.miller/archive/2005/11/18/134816.aspx" target="_blank">IOC</a>, were much easier to implement and the value of those patterns were much clearer.  This one project by no means made me an expert, but it certainly showed me that there was more value to these principles than I had previously thought. And that encouraged me to continue learning about those principles. That learning has continued to this day I firmly believe that I am a much better programmer for it.</p>
<p>In my next post I’ll try and address why any of this matters and how Jeff’s response is shortsighted at least and incredibly destructive at worst.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202&amp;bodytext=I%20felt%20I%20should%20follow%20up%20on%20my%20post%20from%20yesterday.%20First%20I%20want%20to%20say%20that%20I%E2%80%99m%20not%20trying%20to%20bash%20Jeff%20or%20otherwise%20rub%20his%20nose%20in%20it.%20Jeff%20has%20stated%20that%20he%20learns%20best%20from%20the%20%E2%80%9CSmackdown%E2%80%9D.%20And%20I%E2%80%99m%20nothing%20if%20not%20confrontational%20%3A-%29%0D%0A%0D" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202&amp;notes=I%20felt%20I%20should%20follow%20up%20on%20my%20post%20from%20yesterday.%20First%20I%20want%20to%20say%20that%20I%E2%80%99m%20not%20trying%20to%20bash%20Jeff%20or%20otherwise%20rub%20his%20nose%20in%20it.%20Jeff%20has%20stated%20that%20he%20learns%20best%20from%20the%20%E2%80%9CSmackdown%E2%80%9D.%20And%20I%E2%80%99m%20nothing%20if%20not%20confrontational%20%3A-%29%0D%0A%0D" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;t=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202&amp;annotation=I%20felt%20I%20should%20follow%20up%20on%20my%20post%20from%20yesterday.%20First%20I%20want%20to%20say%20that%20I%E2%80%99m%20not%20trying%20to%20bash%20Jeff%20or%20otherwise%20rub%20his%20nose%20in%20it.%20Jeff%20has%20stated%20that%20he%20learns%20best%20from%20the%20%E2%80%9CSmackdown%E2%80%9D.%20And%20I%E2%80%99m%20nothing%20if%20not%20confrontational%20%3A-%29%0D%0A%0D" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=I%20felt%20I%20should%20follow%20up%20on%20my%20post%20from%20yesterday.%20First%20I%20want%20to%20say%20that%20I%E2%80%99m%20not%20trying%20to%20bash%20Jeff%20or%20otherwise%20rub%20his%20nose%20in%20it.%20Jeff%20has%20stated%20that%20he%20learns%20best%20from%20the%20%E2%80%9CSmackdown%E2%80%9D.%20And%20I%E2%80%99m%20nothing%20if%20not%20confrontational%20%3A-%29%0D%0A%0D" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202&amp;body=I%20felt%20I%20should%20follow%20up%20on%20my%20post%20from%20yesterday.%20First%20I%20want%20to%20say%20that%20I%E2%80%99m%20not%20trying%20to%20bash%20Jeff%20or%20otherwise%20rub%20his%20nose%20in%20it.%20Jeff%20has%20stated%20that%20he%20learns%20best%20from%20the%20%E2%80%9CSmackdown%E2%80%9D.%20And%20I%E2%80%99m%20nothing%20if%20not%20confrontational%20%3A-%29%0D%0A%0D" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=What%E2%80%99s%20in%20your%20wallet%3F%20%E2%80%93%20Part%202%20-%20http%3A%2F%2Fwww.ilude.com%2F2009%2F03%2F01%2Fwhats-in-your-wallet-part-2%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2009/03/01/whats-in-your-wallet-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What’s in your wallet?</title>
		<link>http://www.ilude.com/2009/02/28/whats-in-your-wallet/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2009/02/28/whats-in-your-wallet/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 05:23:50 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2009/02/28/whats-in-your-wallet/</guid>
		<description><![CDATA[I’ve refrained from posting on the stir that occurred after Stack Overflow #38. I’m firmly on the side of the apparent “SOLID”-nista’s. The reasons for this is that learning and applying them has made me a better programmer.  I’ve used TDD and SOLID principles on large codebases and found that this has allowed significant changes [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve refrained from posting on the stir that occurred after <a href="http://itc.conversationsnetwork.org/shows/detail3982.html" target="_blank">Stack Overflow #38</a>. I’m firmly on the side of the apparent “<a href="http://www.noctovis.net/blog/index.php/2009/01/15/design-principles/" target="_blank">SOLID</a>”-nista’s. The reasons for this is that learning and applying them has made me a better programmer.  I’ve used TDD and <a href="http://www.noctovis.net/blog/index.php/2009/01/15/design-principles/" target="_blank">SOLID</a> principles on large codebases and found that this has allowed significant changes and evolutions to happen to these libraries and have them rolled out into numerous separate projects with absolutely no issues.  Why? Because there are several hundred tests surrounding each of these projects. And the use of the <a href="http://www.noctovis.net/blog/index.php/2009/01/15/design-principles/" target="_blank">SOLID</a> principles has allowed me to swap out large sections of code with better implementations and add new functionality with little effort thanks to the reduced dependencies.<span id="more-68"></span></p>
<p>So today when I opened my Google Reader I was confronted with <a href="http://www.codinghorror.com/blog/archives/001230.html" target="_blank">Jeff Attwood&#8217;s latest post</a> where discusses technical debt and he states:</p>
<blockquote><p>After six solid months working on the Stack Overflow codebase … We have to <strong>stop working on new features for a while and pay down some of our technical debt</strong>.</p></blockquote>
<p>What I hear is that he and his team must stop delivering software and start thinking about code quality.  His reasons for needing to do this are:</p>
<blockquote><p>…that <strong>accumulated technical debt becomes a major disincentive to work on a project.</strong> It&#8217;s a collection of small but annoying things that you have to deal with every time you sit down to write code. But it&#8217;s exactly these small annoyances, this sand grinding away in the gears of your workday, that eventually causes you to stop enjoying the project.</p></blockquote>
<p>Back in the day I was granted commit rights to the <a href="http://www.castleproject.org/" target="_blank">Castle Project</a> which is where I came to know <a href="http://ayende.com/Blog/" target="_blank">Oren “Ayende” Eini</a>. I’ve never heard him say it but its my belief that he eats, lives and breaths the <a href="http://www.noctovis.net/blog/index.php/2009/01/15/design-principles/" target="_blank">SOLID</a> principles ( I didn’t say sleeps them, because everyone knows Oren doesn’t sleep! ).  He shares the prize with <a href="http://hammett.castleproject.org/" target="_blank">Hammett</a> for introducing me to TDD and starting me on the long path to <a href="http://www.noctovis.net/blog/index.php/2009/01/15/design-principles/" target="_blank">SOLID</a> Zen.  Ayende sums up the solution to Jeff’s problem <a href="http://ayende.com/Blog/archive/2008/05/16/Zero-Friction--Maintainability.aspx" target="_blank">here</a>:</p>
<blockquote><p>If you have an environment that has friction in it, there is an incentive for the developers to subvert the design in order to produce a quick fix or hack a solution to solve a problem. Creating a zero friction environment will produce a system where there is no incentive to corrupt the design, the easiest thing to do is the right thing to do.</p>
<p>By reducing the friction in the environment, you increase the system maintainability</p></blockquote>
<p>TDD and SOLID are not “bureaucratic programming”. They are refined wisdom of many <a href="http://twitter.com/unclebobmartin" target="_blank">master craftsmen</a> to help reduce friction and keep you focused on that pesky “<em>revenue generation</em>” code.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F&amp;bodytext=I%E2%80%99ve%20refrained%20from%20posting%20on%20the%20stir%20that%20occurred%20after%20Stack%20Overflow%20%2338.%20I%E2%80%99m%20firmly%20on%20the%20side%20of%20the%20apparent%20%E2%80%9CSOLID%E2%80%9D-nista%E2%80%99s.%20The%20reasons%20for%20this%20is%20that%20learning%20and%20applying%20them%20has%20made%20me%20a%20better%20programmer.%C2%A0%20I%E2%80%99ve%20used%20T" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F&amp;notes=I%E2%80%99ve%20refrained%20from%20posting%20on%20the%20stir%20that%20occurred%20after%20Stack%20Overflow%20%2338.%20I%E2%80%99m%20firmly%20on%20the%20side%20of%20the%20apparent%20%E2%80%9CSOLID%E2%80%9D-nista%E2%80%99s.%20The%20reasons%20for%20this%20is%20that%20learning%20and%20applying%20them%20has%20made%20me%20a%20better%20programmer.%C2%A0%20I%E2%80%99ve%20used%20T" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;t=What%E2%80%99s%20in%20your%20wallet%3F" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F&amp;annotation=I%E2%80%99ve%20refrained%20from%20posting%20on%20the%20stir%20that%20occurred%20after%20Stack%20Overflow%20%2338.%20I%E2%80%99m%20firmly%20on%20the%20side%20of%20the%20apparent%20%E2%80%9CSOLID%E2%80%9D-nista%E2%80%99s.%20The%20reasons%20for%20this%20is%20that%20learning%20and%20applying%20them%20has%20made%20me%20a%20better%20programmer.%C2%A0%20I%E2%80%99ve%20used%20T" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=I%E2%80%99ve%20refrained%20from%20posting%20on%20the%20stir%20that%20occurred%20after%20Stack%20Overflow%20%2338.%20I%E2%80%99m%20firmly%20on%20the%20side%20of%20the%20apparent%20%E2%80%9CSOLID%E2%80%9D-nista%E2%80%99s.%20The%20reasons%20for%20this%20is%20that%20learning%20and%20applying%20them%20has%20made%20me%20a%20better%20programmer.%C2%A0%20I%E2%80%99ve%20used%20T" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F&amp;body=I%E2%80%99ve%20refrained%20from%20posting%20on%20the%20stir%20that%20occurred%20after%20Stack%20Overflow%20%2338.%20I%E2%80%99m%20firmly%20on%20the%20side%20of%20the%20apparent%20%E2%80%9CSOLID%E2%80%9D-nista%E2%80%99s.%20The%20reasons%20for%20this%20is%20that%20learning%20and%20applying%20them%20has%20made%20me%20a%20better%20programmer.%C2%A0%20I%E2%80%99ve%20used%20T" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F&amp;title=What%E2%80%99s%20in%20your%20wallet%3F" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=What%E2%80%99s%20in%20your%20wallet%3F%20-%20http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F28%2Fwhats-in-your-wallet%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2009/02/28/whats-in-your-wallet/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Custom LINQ Operator?</title>
		<link>http://www.ilude.com/2009/02/14/custom-linq-operator/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2009/02/14/custom-linq-operator/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 06:47:40 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2009/02/14/custom-linq-operator/</guid>
		<description><![CDATA[K. Scott Allen has a great post up titled Why Would I Create A Custom LINQ Operator? I figured I’d add my minor addition to the discussion.


public static bool Contains&#60;T&#62;(this IEnumerable&#60;T&#62; enumerator, Predicate&#60;T&#62; predicate)
{
    if(enumerator == null)
        throw new ArgumentNullException(&#34;enumerator&#34;);
&#160;
    if(predicate == [...]]]></description>
			<content:encoded><![CDATA[<p>K. Scott Allen has a great post up titled <a href="http://odetocode.com/Blogs/scott/archive/2009/02/12/12540.aspx">Why Would I Create A Custom LINQ Operator?</a> I figured I’d add my minor addition to the discussion.</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; height: 262px; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">bool</span> Contains&lt;T&gt;(<span style="color: #0000ff">this</span> IEnumerable&lt;T&gt; enumerator, Predicate&lt;T&gt; predicate)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">{</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">if</span>(enumerator == <span style="color: #0000ff">null</span>)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">        <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> ArgumentNullException(<span style="color: #006080">&quot;enumerator&quot;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">&#160;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #0000ff">if</span>(predicate == <span style="color: #0000ff">null</span>)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        <span style="color: #0000ff">throw</span> <span style="color: #0000ff">new</span> ArgumentNullException(<span style="color: #006080">&quot;predicate&quot;</span>);  </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&#160;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">foreach</span>(T item <span style="color: #0000ff">in</span> enumerator)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">        <span style="color: #0000ff">if</span>(predicate(item))</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">            <span style="color: #0000ff">return</span> <span style="color: #0000ff">true</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">&#160;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #0000ff">return</span> <span style="color: #0000ff">false</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre>
</p></div>
</div>
<p>This allows you to do this: </p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #0000ff">if</span>(tags.Contains(x =&gt; x.Name == <span style="color: #006080">&quot;Coolest Blog Ever&quot;</span>)) {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">    <span style="color: #008000">// we found a matching tag</span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">}</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">else</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none">    <span style="color: #008000">// no tag found <img src='http://www.ilude.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </span></pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">}</pre>
</p></div>
</div>
<p>Nothing special I know, but hopefully it helps someone out.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F&amp;bodytext=K.%20Scott%20Allen%20has%20a%20great%20post%20up%20titled%20Why%20Would%20I%20Create%20A%20Custom%20LINQ%20Operator%3F%20I%20figured%20I%E2%80%99d%20add%20my%20minor%20addition%20to%20the%20discussion.%20%20%20%20%20%20%20%20%20%20public%20static%20bool%20Contains%26lt%3BT%26gt%3B%28this%20IEnumerable%26lt%3BT%26gt%3B%20enumerator%2C%20Predicate%26lt%3BT%26gt%3B%20predi" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F&amp;notes=K.%20Scott%20Allen%20has%20a%20great%20post%20up%20titled%20Why%20Would%20I%20Create%20A%20Custom%20LINQ%20Operator%3F%20I%20figured%20I%E2%80%99d%20add%20my%20minor%20addition%20to%20the%20discussion.%20%20%20%20%20%20%20%20%20%20public%20static%20bool%20Contains%26lt%3BT%26gt%3B%28this%20IEnumerable%26lt%3BT%26gt%3B%20enumerator%2C%20Predicate%26lt%3BT%26gt%3B%20predi" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;t=Custom%20LINQ%20Operator%3F" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F&amp;annotation=K.%20Scott%20Allen%20has%20a%20great%20post%20up%20titled%20Why%20Would%20I%20Create%20A%20Custom%20LINQ%20Operator%3F%20I%20figured%20I%E2%80%99d%20add%20my%20minor%20addition%20to%20the%20discussion.%20%20%20%20%20%20%20%20%20%20public%20static%20bool%20Contains%26lt%3BT%26gt%3B%28this%20IEnumerable%26lt%3BT%26gt%3B%20enumerator%2C%20Predicate%26lt%3BT%26gt%3B%20predi" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=K.%20Scott%20Allen%20has%20a%20great%20post%20up%20titled%20Why%20Would%20I%20Create%20A%20Custom%20LINQ%20Operator%3F%20I%20figured%20I%E2%80%99d%20add%20my%20minor%20addition%20to%20the%20discussion.%20%20%20%20%20%20%20%20%20%20public%20static%20bool%20Contains%26lt%3BT%26gt%3B%28this%20IEnumerable%26lt%3BT%26gt%3B%20enumerator%2C%20Predicate%26lt%3BT%26gt%3B%20predi" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F&amp;body=K.%20Scott%20Allen%20has%20a%20great%20post%20up%20titled%20Why%20Would%20I%20Create%20A%20Custom%20LINQ%20Operator%3F%20I%20figured%20I%E2%80%99d%20add%20my%20minor%20addition%20to%20the%20discussion.%20%20%20%20%20%20%20%20%20%20public%20static%20bool%20Contains%26lt%3BT%26gt%3B%28this%20IEnumerable%26lt%3BT%26gt%3B%20enumerator%2C%20Predicate%26lt%3BT%26gt%3B%20predi" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F&amp;title=Custom%20LINQ%20Operator%3F" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Custom%20LINQ%20Operator%3F%20-%20http%3A%2F%2Fwww.ilude.com%2F2009%2F02%2F14%2Fcustom-linq-operator%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2009/02/14/custom-linq-operator/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Refactoring the ASP.NET MVC project template &#8211; Part 4</title>
		<link>http://www.ilude.com/2009/01/28/refactoring-the-aspnet-mvc-project-template-part-4/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2009/01/28/refactoring-the-aspnet-mvc-project-template-part-4/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 20:20:03 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2009/01/28/refactoring-the-aspnet-mvc-project-template-part-4/</guid>
		<description><![CDATA[I wasn’t planning on continuing this series until I’d had a chance to play with the new RC1 release of the MVC framework, but Phil Haack has a post up that I’d like to touch on. To summarize with the latest release the MVC team has added a ContentPlaceHolder to the head section of the [...]]]></description>
			<content:encoded><![CDATA[<p>I wasn’t planning on continuing this series until I’d had a chance to play with the <a href="http://weblogs.asp.net/scottgu/archive/2009/01/27/asp-net-mvc-1-0-release-candidate-now-available.aspx" target="_blank">new RC1 release</a> of the MVC framework, but Phil Haack has <a href="http://haacked.com/archive/2009/01/27/controls-collection-cannot-be-modified-issue-with-asp.net-mvc-rc1.aspx" target="_blank">a post up</a> that I’d like to touch on. To summarize with the latest release the MVC team has added a ContentPlaceHolder to the head section of the Site.Master file. This is a good thing and has been recommended by others as an excellent way to control the page title, scripts and css files from within your views. The issue is that the head tag has the runat=”server” attribute. So while the page is being rendered by the server the view engine parses this tag and runs some asp.net code to “help” you.&#160; In this case one thing it helps you with is adding a title tag if you didn’t provide one. If you construct your head section improperly you end up getting an error :</p>
<p> <span id="more-48"></span><br />
<blockquote>
<p>The Controls collection cannot be modified because the control contains code blocks (i.e. &lt;% &#8230; %&gt;).</p>
</blockquote>
<p>Looking around the closest reason I can find for why the head tag has the runat=”server” attribute is a comment from Phil to <a href="http://stackoverflow.com/questions/446533/what-is-the-status-of-runatserver-tags-in-asp-net-mvc#446602" target="_blank">this answer on StackOverflow.com</a> where he states:</p>
<blockquote><p>the head runat=&quot;server&quot; (aka HeaderControl) makes it easy to reference .css and .js files in the head section. It will rewrite the Href value.</p>
</blockquote>
<p>Ok valid point, but I’m not sure its needed just to do that. </p>
<p>First, outside of ContentPlaceHolder tags in the masterpage anywhere else I see runat=”server” it’s considered <a href="http://en.wikipedia.org/wiki/Code_smell" target="_blank">code smell</a>. There are just far too many ways that server/user controls can mess with the final rendered page by adding viewstate, mangled id’s and a host other issues. There is too much black magic going on for my tastes. Better to use Html helper methods to do the magic and display that methods results using &lt;%= %&gt; code blocks. This way we know that the method can only output its results in a specific location in the view and if we find an issue with that output we know what code is responsible for it. Controls have access to the entire page and can do things that I may or may not want them to do and those changes can be very difficult to trace back to the code responsible.&#160; ( Yes I know there are ways to get access to the Page instance from helpers but I’ve got a solution to that too: DON’T DO IT! <img src='http://www.ilude.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So what we need are some helpers for linking in our javascript and stylesheets. The <a href="http://www.codeplex.com/MVCContrib/" target="_blank">MvcContrib project</a> has helpers to do this but the method names are inconsistent and I wanted some more control over the <a href="http://en.wikipedia.org/wiki/Convention_over_configuration" target="_blank">conventions</a> used. </p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; height: 291px; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">class</span> IncludeExtensions {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">string</span> IncludeCSS(<span style="color: #0000ff">this</span> HtmlHelper html, <span style="color: #0000ff">string</span> cssFile)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>         <span style="color: #0000ff">string</span> cssPath = cssFile.Contains(<span style="color: #006080">&quot;~&quot;</span>) ? cssFile : (<span style="color: #006080">&quot;~/content/css/&quot;</span> + cssFile);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>         <span style="color: #0000ff">string</span> url = html.ResolveUrl(cssPath);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;&lt;link type=\&quot;text/css\&quot; rel=\&quot;stylesheet\&quot; href=\&quot;{0}\&quot; /&gt;\n&quot;</span>, url);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">string</span> IncludeJS(<span style="color: #0000ff">this</span> HtmlHelper html, <span style="color: #0000ff">string</span> jsFile)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>     {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span>         <span style="color: #0000ff">string</span> jsPath = jsFile.Contains(<span style="color: #006080">&quot;~&quot;</span>) ? jsFile : (<span style="color: #006080">&quot;~/content/js/&quot;</span> + jsFile);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span>         <span style="color: #0000ff">string</span> url = html.ResolveUrl(jsPath);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">string</span>.Format(<span style="color: #006080">&quot;&lt;script type=\&quot;text/javascript\&quot; src=\&quot;{0}\&quot; &gt;&lt;/script&gt;\n&quot;</span>, url);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  15:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  16:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">string</span> ResolveUrl(<span style="color: #0000ff">this</span> HtmlHelper html, <span style="color: #0000ff">string</span> relativeUrl)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  17:</span>     {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  18:</span>         <span style="color: #0000ff">if</span>(relativeUrl == <span style="color: #0000ff">null</span>) { <span style="color: #0000ff">return</span> <span style="color: #0000ff">null</span>; }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  19:</span>         <span style="color: #0000ff">if</span>(!relativeUrl.StartsWith(<span style="color: #006080">&quot;~&quot;</span>)) { <span style="color: #0000ff">return</span> relativeUrl; }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  20:</span>         <span style="color: #0000ff">return</span> (html.ViewContext.HttpContext.Request.ApplicationPath + relativeUrl.Substring(1)).Replace(<span style="color: #006080">&quot;//&quot;</span>, <span style="color: #006080">&quot;/&quot;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  21:</span>     }</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  22:</span> }</pre>
</p></div>
</div>
<p>and now I can have the following in my site.master file:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> &lt;head&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     &lt;meta http-equiv=<span style="color: #006080">&quot;Content-Type&quot;</span> content=<span style="color: #006080">&quot;text/html; charset=iso-8859-1&quot;</span> /&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     &lt;%= Html.IncludeCSS(<span style="color: #006080">&quot;site.css&quot;</span>) %&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     &lt;%= Html.IncludeJS(<span style="color: #006080">&quot;jquery-1.2.6.js&quot;</span>) %&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     &lt;asp:ContentPlaceHolder ID=<span style="color: #006080">&quot;HeaderContent&quot;</span> runat=<span style="color: #006080">&quot;server&quot;</span> /&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> &lt;/head&gt;</pre>
</p></div>
</div>
<p>Here is the head section of my login view:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> &lt;asp:Content ContentPlaceHolderID=<span style="color: #006080">&quot;HeaderContent&quot;</span> runat=<span style="color: #006080">&quot;server&quot;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>     &lt;title&gt;Login&lt;/title&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span>     &lt;script type=<span style="color: #006080">&quot;text/javascript&quot;</span>&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>         $(document).ready(function() {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>             $(<span style="color: #006080">&quot;input#username&quot;</span>).focus();</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span>         });</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>     &lt;/script&gt;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span> &lt;/asp:Content&gt;</pre>
</p></div>
</div>
<p>No runat attributes, mystery errors or work arounds. Just clean easy to follow markup.</p>
<p>Please let me know what you think.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204&amp;bodytext=I%20wasn%E2%80%99t%20planning%20on%20continuing%20this%20series%20until%20I%E2%80%99d%20had%20a%20chance%20to%20play%20with%20the%20new%20RC1%20release%20of%20the%20MVC%20framework%2C%20but%20Phil%20Haack%20has%20a%20post%20up%20that%20I%E2%80%99d%20like%20to%20touch%20on.%20To%20summarize%20with%20the%20latest%20release%20the%20MVC%20team%20has%20added%20a%20Cont" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204&amp;notes=I%20wasn%E2%80%99t%20planning%20on%20continuing%20this%20series%20until%20I%E2%80%99d%20had%20a%20chance%20to%20play%20with%20the%20new%20RC1%20release%20of%20the%20MVC%20framework%2C%20but%20Phil%20Haack%20has%20a%20post%20up%20that%20I%E2%80%99d%20like%20to%20touch%20on.%20To%20summarize%20with%20the%20latest%20release%20the%20MVC%20team%20has%20added%20a%20Cont" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;t=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204&amp;annotation=I%20wasn%E2%80%99t%20planning%20on%20continuing%20this%20series%20until%20I%E2%80%99d%20had%20a%20chance%20to%20play%20with%20the%20new%20RC1%20release%20of%20the%20MVC%20framework%2C%20but%20Phil%20Haack%20has%20a%20post%20up%20that%20I%E2%80%99d%20like%20to%20touch%20on.%20To%20summarize%20with%20the%20latest%20release%20the%20MVC%20team%20has%20added%20a%20Cont" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=I%20wasn%E2%80%99t%20planning%20on%20continuing%20this%20series%20until%20I%E2%80%99d%20had%20a%20chance%20to%20play%20with%20the%20new%20RC1%20release%20of%20the%20MVC%20framework%2C%20but%20Phil%20Haack%20has%20a%20post%20up%20that%20I%E2%80%99d%20like%20to%20touch%20on.%20To%20summarize%20with%20the%20latest%20release%20the%20MVC%20team%20has%20added%20a%20Cont" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204&amp;body=I%20wasn%E2%80%99t%20planning%20on%20continuing%20this%20series%20until%20I%E2%80%99d%20had%20a%20chance%20to%20play%20with%20the%20new%20RC1%20release%20of%20the%20MVC%20framework%2C%20but%20Phil%20Haack%20has%20a%20post%20up%20that%20I%E2%80%99d%20like%20to%20touch%20on.%20To%20summarize%20with%20the%20latest%20release%20the%20MVC%20team%20has%20added%20a%20Cont" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F&amp;title=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Refactoring%20the%20ASP.NET%20MVC%20project%20template%20%26ndash%3B%20Part%204%20-%20http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Frefactoring-the-aspnet-mvc-project-template-part-4%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2009/01/28/refactoring-the-aspnet-mvc-project-template-part-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mechanical Engineering Vs. Software Engineering</title>
		<link>http://www.ilude.com/2009/01/28/mechanical-engineering-vs-software-engineering/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2009/01/28/mechanical-engineering-vs-software-engineering/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 05:05:57 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://www.ilude.com/2009/01/28/mechanical-engineering-vs-software-engineering/</guid>
		<description><![CDATA[Mike Taulty has an interesting post up titled Why is Deleting Code so Satisfying? where he compares a plumber and a software developer. (Its a very short post, please go read it… I’ll wait).
Now I may have a bit of a unique view on the subject as I’m a developer and my brother is an [...]]]></description>
			<content:encoded><![CDATA[<p>Mike Taulty has an interesting post up titled <a href="http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/01/27/why-is-deleting-code-so-satisfying.aspx" target="_blank">Why is Deleting Code so Satisfying?</a> where he compares a plumber and a software developer. (Its a very short post, please go read it… I’ll wait).</p>
<p>Now I may have a bit of a unique view on the subject as I’m a developer and my brother is an Mechanical Engineer for <a href="http://www.conway-owen.com/" target="_blank">Conway &amp; Owen</a>.  So please bear with me. Mike’s post asks if a plumber would rip out his work if they found a better way after they already started. The fact that he mentions a plumber, I would speculate, causes most people to think of plumbing a single family home. This type of plumbing is the  software development equivalent of <a href="http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/" target="_blank">FizzBuzz</a>. Which is to say that it takes some skill and understanding to do it correctly but overall its not a difficult problem.</p>
<p><span id="more-44"></span></p>
<p>Now compare plumbing a single family home to plumbing a modern office high rise, cruise ship or nuclear submarine and I think you are starting to compare apples to apples when comparing them to designing today&#8217;s business systems. Where your home plumbing contractor can walk in to most homes and plumb them with little planning, weeks and months of planning and design go into figuring out how to hook up the mechanical systems of such buildings and vessels.  And like software engineers sometimes mechanical engineers have to throw away large sections of your CADD designs when they see a better way.  But like us they have engineering principles similar to our  <a href="http://www.hanselminutes.com/default.aspx?showID=163" target="_blank">SOLID Principles</a> that guide them and allow them to strip away the minimum possible to implement their changes.  But even after things are built you sometimes need to make changes and upgrades. I’m reminded of a television show I watched not to long ago about one of the passenger cruise lines performing and engine replacement on one of their ships.  They literally had to cut a hole in the side of the ship and remove all the piping and bulkheads between the engine and the outside so that they could get the old diesel engine out and the new, more efficient one back into the same place.  The new engine was smaller and had different requirements for intakes and exhaust and the amount of work to remove all that piping and then reinstall it and make it work with the new engine was impressive to say the least. Now compare that with having to do something similar to a complex software system. The problems are not always equivalent but I would have to say they seem like that would be very similar.  </p>
<p>Anyway to pose and answer to Mike’s question I think that mechanical engineers work in ways that are very similar to they way we as software engineers work. Sometimes they throw it all out and start over too.</p>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering&amp;bodytext=Mike%20Taulty%20has%20an%20interesting%20post%20up%20titled%20Why%20is%20Deleting%20Code%20so%20Satisfying%3F%20where%20he%20compares%20a%20plumber%20and%20a%20software%20developer.%20%28Its%20a%20very%20short%20post%2C%20please%20go%20read%20it%E2%80%A6%20I%E2%80%99ll%20wait%29.%0D%0A%0D%0ANow%20I%20may%20have%20a%20bit%20of%20a%20unique%20view%20on%20the%20subject" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering&amp;notes=Mike%20Taulty%20has%20an%20interesting%20post%20up%20titled%20Why%20is%20Deleting%20Code%20so%20Satisfying%3F%20where%20he%20compares%20a%20plumber%20and%20a%20software%20developer.%20%28Its%20a%20very%20short%20post%2C%20please%20go%20read%20it%E2%80%A6%20I%E2%80%99ll%20wait%29.%0D%0A%0D%0ANow%20I%20may%20have%20a%20bit%20of%20a%20unique%20view%20on%20the%20subject" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;t=Mechanical%20Engineering%20Vs.%20Software%20Engineering" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering&amp;annotation=Mike%20Taulty%20has%20an%20interesting%20post%20up%20titled%20Why%20is%20Deleting%20Code%20so%20Satisfying%3F%20where%20he%20compares%20a%20plumber%20and%20a%20software%20developer.%20%28Its%20a%20very%20short%20post%2C%20please%20go%20read%20it%E2%80%A6%20I%E2%80%99ll%20wait%29.%0D%0A%0D%0ANow%20I%20may%20have%20a%20bit%20of%20a%20unique%20view%20on%20the%20subject" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=Mike%20Taulty%20has%20an%20interesting%20post%20up%20titled%20Why%20is%20Deleting%20Code%20so%20Satisfying%3F%20where%20he%20compares%20a%20plumber%20and%20a%20software%20developer.%20%28Its%20a%20very%20short%20post%2C%20please%20go%20read%20it%E2%80%A6%20I%E2%80%99ll%20wait%29.%0D%0A%0D%0ANow%20I%20may%20have%20a%20bit%20of%20a%20unique%20view%20on%20the%20subject" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering&amp;body=Mike%20Taulty%20has%20an%20interesting%20post%20up%20titled%20Why%20is%20Deleting%20Code%20so%20Satisfying%3F%20where%20he%20compares%20a%20plumber%20and%20a%20software%20developer.%20%28Its%20a%20very%20short%20post%2C%20please%20go%20read%20it%E2%80%A6%20I%E2%80%99ll%20wait%29.%0D%0A%0D%0ANow%20I%20may%20have%20a%20bit%20of%20a%20unique%20view%20on%20the%20subject" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F&amp;title=Mechanical%20Engineering%20Vs.%20Software%20Engineering" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Mechanical%20Engineering%20Vs.%20Software%20Engineering%20-%20http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F28%2Fmechanical-engineering-vs-software-engineering%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2009/01/28/mechanical-engineering-vs-software-engineering/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lucene.Net Analyzer Tool update</title>
		<link>http://www.ilude.com/2009/01/26/lucenenet-analyzer-tool-update/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://www.ilude.com/2009/01/26/lucenenet-analyzer-tool-update/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 03:39:10 +0000</pubDate>
		<dc:creator>iLude</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[lucene.net]]></category>

		<guid isPermaLink="false">http://www.ilude.com/?p=35</guid>
		<description><![CDATA[I&#8217;ve recently been working with lucene.net and one of the things I needed was a custom analyzer. Luckily Andrew Smith has written up two articles about doing just that:

Lucene.Net &#8211; Text Analysis 
Lucene.Net &#8211; Custom Synonym Analyzer 

In those articles Andrew provides a nice tool to test lucene&#8217;s analyzers. The tool loads the analyzers from [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently been working with <a href="http://incubator.apache.org/lucene.net/" target="_blank">lucene.net</a> and one of the things I needed was a custom analyzer. Luckily <a href="http://asmith-journal.blogspot.com/" target="_blank">Andrew Smith</a> has written up two articles about doing just that:</p>
<ul>
<li><a href="http://www.codeproject.com/KB/cs/lucene_analysis.aspx" target="_blank">Lucene.Net &#8211; Text Analysis</a> </li>
<li><a href="http://www.codeproject.com/KB/cs/lucene_custom_analyzer.aspx" target="_blank">Lucene.Net &#8211; Custom Synonym Analyzer</a> </li>
</ul>
<p>In those articles Andrew provides a nice tool to test lucene&#8217;s analyzers. The tool loads the analyzers from the lucene dll and allows you to select from the provided analyzers and see how they process entered text. I&#8217;ve made a few minor updates to the code so that it can load analyzers from dll&#8217;s selected at runtime, so that you can test them and see their output. You can get the updated project source code here:</p>
<ul>
<li><a href="http://cid-386a61fa810f6a94.skydrive.live.com/self.aspx/Public/AnalyzerViewer.zip">AnalyzerViewer.zip</a> </li>
</ul>



Share and Enjoy:


	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update&amp;bodytext=I%27ve%20recently%20been%20working%20with%20lucene.net%20and%20one%20of%20the%20things%20I%20needed%20was%20a%20custom%20analyzer.%20Luckily%20Andrew%20Smith%20has%20written%20up%20two%20articles%20about%20doing%20just%20that%3A%20%20%20%20%20Lucene.Net%20-%20Text%20Analysis%20%20%20%20%20Lucene.Net%20-%20Custom%20Synonym%20Analyzer%20%20%20%20In%20tho" title="Digg"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update&amp;notes=I%27ve%20recently%20been%20working%20with%20lucene.net%20and%20one%20of%20the%20things%20I%20needed%20was%20a%20custom%20analyzer.%20Luckily%20Andrew%20Smith%20has%20written%20up%20two%20articles%20about%20doing%20just%20that%3A%20%20%20%20%20Lucene.Net%20-%20Text%20Analysis%20%20%20%20%20Lucene.Net%20-%20Custom%20Synonym%20Analyzer%20%20%20%20In%20tho" title="del.icio.us"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;t=Lucene.Net%20Analyzer%20Tool%20update" title="Facebook"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update&amp;annotation=I%27ve%20recently%20been%20working%20with%20lucene.net%20and%20one%20of%20the%20things%20I%20needed%20was%20a%20custom%20analyzer.%20Luckily%20Andrew%20Smith%20has%20written%20up%20two%20articles%20about%20doing%20just%20that%3A%20%20%20%20%20Lucene.Net%20-%20Text%20Analysis%20%20%20%20%20Lucene.Net%20-%20Custom%20Synonym%20Analyzer%20%20%20%20In%20tho" title="Google Bookmarks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dotnetkicks.com/kick/?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update" title="DotNetKicks"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dotnetkicks.png" title="DotNetKicks" alt="DotNetKicks" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.dzone.com/links/add.html?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update" title="DZone"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/dzone.png" title="DZone" alt="DZone" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update&amp;source=iLude+Any+normal+person+would+have+stopped+at+this+point%2C+but+I%27m+not+a+normal+person%2C+I%27m+a+geek%2C+a+geek+beyond+reason.&amp;summary=I%27ve%20recently%20been%20working%20with%20lucene.net%20and%20one%20of%20the%20things%20I%20needed%20was%20a%20custom%20analyzer.%20Luckily%20Andrew%20Smith%20has%20written%20up%20two%20articles%20about%20doing%20just%20that%3A%20%20%20%20%20Lucene.Net%20-%20Text%20Analysis%20%20%20%20%20Lucene.Net%20-%20Custom%20Synonym%20Analyzer%20%20%20%20In%20tho" title="LinkedIn"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://ping.fm/ref/?link=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update&amp;body=I%27ve%20recently%20been%20working%20with%20lucene.net%20and%20one%20of%20the%20things%20I%20needed%20was%20a%20custom%20analyzer.%20Luckily%20Andrew%20Smith%20has%20written%20up%20two%20articles%20about%20doing%20just%20that%3A%20%20%20%20%20Lucene.Net%20-%20Text%20Analysis%20%20%20%20%20Lucene.Net%20-%20Custom%20Synonym%20Analyzer%20%20%20%20In%20tho" title="Ping.fm"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/ping.png" title="Ping.fm" alt="Ping.fm" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update" title="Reddit"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F&amp;title=Lucene.Net%20Analyzer%20Tool%20update" title="StumbleUpon"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F" title="Technorati"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Lucene.Net%20Analyzer%20Tool%20update%20-%20http%3A%2F%2Fwww.ilude.com%2F2009%2F01%2F26%2Flucenenet-analyzer-tool-update%2F" title="Twitter"><img src="http://www.ilude.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.ilude.com/2009/01/26/lucenenet-analyzer-tool-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
