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

<channel>
	<title>Michael Kennedy on Technology</title>
	<atom:link href="http://blog.michaelckennedy.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.michaelckennedy.net</link>
	<description>Cutting-Edge Developer and Technology Writing with a .NET Accent</description>
	<lastBuildDate>Tue, 15 May 2012 23:53:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.michaelckennedy.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Michael Kennedy on Technology</title>
		<link>http://blog.michaelckennedy.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.michaelckennedy.net/osd.xml" title="Michael Kennedy on Technology" />
	<atom:link rel='hub' href='http://blog.michaelckennedy.net/?pushpress=hub'/>
		<item>
		<title>How Are You Scaling ASP.NET?</title>
		<link>http://blog.michaelckennedy.net/2012/05/01/how-are-you-scaling-asp-net/</link>
		<comments>http://blog.michaelckennedy.net/2012/05/01/how-are-you-scaling-asp-net/#comments</comments>
		<pubDate>Tue, 01 May 2012 18:13:23 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Polls]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[polls]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=531</guid>
		<description><![CDATA[There are some interesting debates out there around scaling ASP.NET.  How do you do it? Please fill out this poll and tell the world: Interested in a blog post on this? Take it to the comments section. Cheers, @mkennedy Filed &#8230; <a href="http://blog.michaelckennedy.net/2012/05/01/how-are-you-scaling-asp-net/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=531&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are some interesting debates out there around scaling ASP.NET.  How do you do it? Please fill out this poll and tell the world:</p>
<a name="pd_a_6189305"></a><div class="PDS_Poll" id="PDI_container6189305" style="display:inline-block;"></div><div id="PD_superContainer"></div><noscript><a href="http://polldaddy.com/poll/6189305">Take Our Poll</a></noscript>
<p>Interested in a blog post on this? Take it to the comments section.</p>
<p>Cheers,<br />
@<a href="https://twitter.com/#!/mkennedy" target="_blank">mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/polls/'>Polls</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/asp-net/'>ASP.NET</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/polls-2/'>polls</a>, <a href='http://blog.michaelckennedy.net/tag/web/'>web</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/531/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/531/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/531/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=531&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/05/01/how-are-you-scaling-asp-net/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Michael&#8217;s .NET Suggested Reading List</title>
		<link>http://blog.michaelckennedy.net/2012/04/27/michaels-net-suggested-reading-list/</link>
		<comments>http://blog.michaelckennedy.net/2012/04/27/michaels-net-suggested-reading-list/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 23:32:57 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=527</guid>
		<description><![CDATA[With Guerrilla .NET from DevelopMentor coming up on May 7th, it&#8217;s time to refresh my .NET reading list. Want to get ready for this class or a class like it or just get a quick-start on .NET? Here&#8217;s what I would recommend. &#8230; <a href="http://blog.michaelckennedy.net/2012/04/27/michaels-net-suggested-reading-list/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=527&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With <a href="http://www.develop.com/training-course/guerrilla-.net" target="_blank">Guerrilla .NET</a> from DevelopMentor coming up on May 7th, it&#8217;s time to refresh my .NET reading list.</p>
<p>Want to get ready for this class or a class like it or just get a quick-start on .NET? Here&#8217;s what I would recommend. There are many books covering the topics (but no small list covering most). Instead of trying to read them all in-depth (a fairly unattainable goal), I would suggest that you read the first 2 &#8211; 3 chapters from all of these books listed below. This would cost about $250 if they buy them all, but they are all available on Safari Books Online.</p>
<p><a href="http://my.safaribooksonline.com/" target="_blank">http://my.safaribooksonline.com/</a></p>
<p>You can get the free trial for 10 days and if you like it you can then pay $19 / month and have access to all these books (see the coupon at the bottom of the trial page on safari online).</p>
<p><strong>CLR via C#, Third Edition (foundational knowledge)</strong><br />
<a href="http://my.safaribooksonline.com/book/programming/csharp/9780735640467" target="_blank">http://my.safaribooksonline.com/book/programming/csharp/9780735640467</a></p>
<p><strong>WPF 4 Unleashed</strong><br />
<a href="http://my.safaribooksonline.com/book/programming/microsoft-wpf/9780132174367" target="_blank">http://my.safaribooksonline.com/book/programming/microsoft-wpf/9780132174367</a></p>
<p><strong>Silverlight 4 in Action</strong><br />
<a href="http://my.safaribooksonline.com/book/web-development/silverlight/9781935182375" target="_blank">http://my.safaribooksonline.com/book/web-development/silverlight/9781935182375</a></p>
<p><strong>Pro ASP.NET MVC 3 Framework, Third Edition:</strong><br />
<a href="http://my.safaribooksonline.com/9781430234043">http://my.safaribooksonline.com/9781430234043</a></p>
<p><strong>Programming Entity Framework</strong><br />
<a href="http://my.safaribooksonline.com/book/software-engineering-and-development/9780596807276" target="_blank">http://my.safaribooksonline.com/book/software-engineering-and-development/9780596807276</a></p>
<p><strong>RESTful .NET</strong><br />
<a href="http://my.safaribooksonline.com/book/programming/microsoft-dotnet/9780596155025" target="_blank">http://my.safaribooksonline.com/book/programming/microsoft-dotnet/9780596155025</a></p>
<p><strong>Learning WCF</strong><br />
<a href="http://my.safaribooksonline.com/book/programming/microsoft-wcf/9780596101626" target="_blank">http://my.safaribooksonline.com/book/programming/microsoft-wcf/9780596101626</a></p>
<p><strong>C# in Depth</strong><br />
<a href="http://my.safaribooksonline.com/book/-/9781935182474" target="_blank">http://my.safaribooksonline.com/book/-/9781935182474</a></p>
<p><strong>jQuery in Action</strong><br />
<a href="http://my.safaribooksonline.com/book/web-development/jquery/9781935182320" target="_blank">http://my.safaribooksonline.com/book/web-development/jquery/9781935182320</a></p>
<p><strong>Host Your Web Site in the Cloud</strong><br />
<a href="http://my.safaribooksonline.com/book/web-development/9780980576832" target="_blank">http://my.safaribooksonline.com/book/web-development/9780980576832</a></p>
<p><strong>MongoDB: The Definitive Guide</strong><br />
<a href="http://my.safaribooksonline.com/book/databases/mongodb/9781449381578" target="_blank">http://my.safaribooksonline.com/book/databases/mongodb/9781449381578</a></p>
<p><strong>Agile Principles, Patterns, and Practices in C#</strong><br />
<a href="http://my.safaribooksonline.com/book/programming/csharp/0131857258" target="_blank">http://my.safaribooksonline.com/book/programming/csharp/0131857258</a></p>
<p><strong>Debugging Applications for Microsoft .NET (sections on WinDBG)</strong><br />
<a href="http://my.safaribooksonline.com/book/programming/microsoft-dotnet/9780735645349" target="_blank">http://my.safaribooksonline.com/book/programming/microsoft-dotnet/9780735645349</a></p>
<p>Cheers,<br />
@<a href="https://twitter.com/#!/mkennedy" target="_blank">mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/developmentor/'>DevelopMentor</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/developmentor/'>DevelopMentor</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/527/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=527&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/04/27/michaels-net-suggested-reading-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Downloads from Building Rich Input Forms in ASP.NET MVC Webcast</title>
		<link>http://blog.michaelckennedy.net/2012/04/11/downloads-from-building-rich-input-forms-in-asp-net-mvc-webcast/</link>
		<comments>http://blog.michaelckennedy.net/2012/04/11/downloads-from-building-rich-input-forms-in-asp-net-mvc-webcast/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 05:27:46 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=509</guid>
		<description><![CDATA[Thanks to all who attended my webcast yesterday. Here is the recorded video, slides, and demo application. Slides: Kennedy-Rich-Forms-with-ASP.NET-MVC-Slides.zip Demo Application: Kennedy-MVC-Forms-Demo.zip Video Recording: Remember, you&#8217;ll need to run MongoDB to make the web app work. Read the readme in the zip &#8230; <a href="http://blog.michaelckennedy.net/2012/04/11/downloads-from-building-rich-input-forms-in-asp-net-mvc-webcast/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=509&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Thanks to all who attended my webcast yesterday. Here is the recorded video, slides, and demo application.</p>
<p><strong><span id="more-509"></span>Slides</strong>: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/MVC-Webcast/Kennedy-Rich-Forms-with-ASP.NET-MVC-Slides.zip">Kennedy-Rich-Forms-with-ASP.NET-MVC-Slides.zip<br />
</a><strong>Demo Application</strong>: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/MVC-Webcast/Kennedy-MVC-Forms-Demo.zip">Kennedy-MVC-Forms-Demo.zip</a></p>
<p><strong>Video Recording</strong>:</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/PDrlzgGSaSk?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Remember, you&#8217;ll need to run MongoDB to make the web app work. Read the readme in the zip file for details (it&#8217;s easy!).</p>
<p>Cheers,<br />
<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/developmentor/'>DevelopMentor</a>, <a href='http://blog.michaelckennedy.net/category/speaking/'>Speaking</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/asp-net/'>ASP.NET</a>, <a href='http://blog.michaelckennedy.net/tag/linq/'>LINQ</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/screencasts/'>Screencasts</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/509/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/509/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/509/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=509&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/04/11/downloads-from-building-rich-input-forms-in-asp-net-mvc-webcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Webcast: Building Rich Input Forms in ASP.NET MVC Tuesday April 10</title>
		<link>http://blog.michaelckennedy.net/2012/04/06/webcast-building-rich-input-forms-in-asp-net-mvc-tuesday-april-10/</link>
		<comments>http://blog.michaelckennedy.net/2012/04/06/webcast-building-rich-input-forms-in-asp-net-mvc-tuesday-april-10/#comments</comments>
		<pubDate>Fri, 06 Apr 2012 19:42:41 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=505</guid>
		<description><![CDATA[[Update: View the recordings and downloads.] Want to learn more about building great forms in MVC? Attend my free DevelopMentor webcast this Tuesday. Webcast: Building Rich Input Forms in ASP.NET MVC https://www3.gotomeeting.com/register/559059054 In this webcast we will explore the powerful &#8230; <a href="http://blog.michaelckennedy.net/2012/04/06/webcast-building-rich-input-forms-in-asp-net-mvc-tuesday-april-10/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=505&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[Update: <a href="http://blog.michaelckennedy.net/2012/04/11/downloads-from-building-rich-input-forms-in-asp-net-mvc-webcast/">View the recordings and downloads</a>.]</p>
<p>Want to learn more about building great forms in MVC? Attend my free DevelopMentor webcast this Tuesday.</p>
<blockquote><p><strong>Webcast: Building Rich Input Forms in ASP.NET MVC</strong></p>
<p><strong></strong><a href="https://www3.gotomeeting.com/register/559059054">https://www3.gotomeeting.com/register/559059054<br />
</a></p>
<p>In this webcast we will explore the powerful features of ASP.NET MVC that allow us to build rich forms that accept user input. We&#8217;ll begin by discussing the built-in HTML Helpers and Model Binding. Next we&#8217;ll add validation and show how we can do both client- and server-side validation using DataAnnotations. Finally, we&#8217;ll see that sometimes using domain models as our form-bound objects doesn&#8217;t make sense. We&#8217;ll look at more advanced scenarios using View Models.</p></blockquote>
<p>Cheers,<br />
<a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/developmentor/'>DevelopMentor</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/asp-net/'>ASP.NET</a>, <a href='http://blog.michaelckennedy.net/tag/developmentor/'>DevelopMentor</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/screencasts/'>Screencasts</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/505/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/505/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/505/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=505&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/04/06/webcast-building-rich-input-forms-in-asp-net-mvc-tuesday-april-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>No, You Don&#8217;t Need A Windows App</title>
		<link>http://blog.michaelckennedy.net/2012/04/04/no-you-dont-need-a-windows-app/</link>
		<comments>http://blog.michaelckennedy.net/2012/04/04/no-you-dont-need-a-windows-app/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 15:03:33 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=462</guid>
		<description><![CDATA[Do you think you need a Window&#8217;s app for your next project? Here&#8217;s a thought: No you don&#8217;t. Let me give you one less reason choose the rocky-road of desktop apps today. You&#8217;ll hear people tell you that if you &#8230; <a href="http://blog.michaelckennedy.net/2012/04/04/no-you-dont-need-a-windows-app/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=462&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Do you think you need a Window&#8217;s app for your next project? Here&#8217;s a thought: No you don&#8217;t.</p>
<p>Let me give you one less reason choose the rocky-road of desktop apps today. You&#8217;ll hear people tell you that if you build applications for business users (so-called LOB apps) that are input heavy or have complex navigation, your only choice is to build a Windows application.</p>
<p>Why? Because your power users will want hot-keys. They don&#8217;t want to use the mouse and navigation and all that stuff that makes the web less usable. They&#8217;ll just want to hit a few keystrokes and jump from place to place and do that quick look-up or data entry.</p>
<p>If you haven&#8217;t looked carefully around the web lately, here&#8217;s a revelation:</p>
<blockquote><p><strong>Real web apps have hot-keys too.</strong></p></blockquote>
<p><span id="more-462"></span>Just look at Twitter, GMail, GitHub, Hotmail, and many more. They all have rich hot-key support (although with GMail you&#8217;ll have to turn it on). Scott Hanselman has a great article on this: <a href="http://www.hanselman.com/blog/TheWebIsTheNewTerminalAreYouUsingTheWebsKeyboardShortcutsAndHotkeys.aspx" rel="bookmark">Are you using the Web&#8217;s Keyboard Shortcuts and Hotkeys?</a></p>
<p>So if Scott&#8217;s is so good, why write this one? His post is meant to open your eyes to how web apps can be. I want to show you, Mr. / Ms. Software Person, how easy it is to get there. You might be thinking to yourself, &#8220;Sure Google &amp; Twitter can do this because they have millions of dollars and a bunch of developers. My project has 2 people and a 1 month deadline.&#8221;</p>
<p>It turns out, adding hot-keys to a web app is crazy easy. Especially with the jQuery plugin <a href="http://blog.michaelckennedy.net/2012/03/15/add-hot-keys-to-web-apps-with-this-jquery-plugin/">jQuery.hotKeyMap.js</a> which I recently wrote. Here&#8217;s the <a href="http://blog.michaelckennedy.net/2012/03/15/add-hot-keys-to-web-apps-with-this-jquery-plugin/">blog post </a>I did on it. You should check out the sample application I built to <a href="http://www.michaelckennedy.net/Samples/blog/HotKeys/" target="_blank">see it in action</a>.</p>
<p>So give hot-keys in your web apps a try. Feel free to use my jQuery plugin and sample application as a starting point. Once you get over the hurtle of teaching your users to use them, you&#8217;ll hear a whole lot less clamoring for desktop apps. All the pain from weird errors on certain versions of Windows, installers, patches, admin rights, .NET Framework versions and other unpleasantries that you&#8217;ve gotten used to, because you had to, will be distant memories.</p>
<p>Cheers,<br />
<a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/jquery/'>jQuery</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/articles/'>Articles</a>, <a href='http://blog.michaelckennedy.net/tag/cloud/'>Cloud</a>, <a href='http://blog.michaelckennedy.net/tag/jquery/'>jQuery</a>, <a href='http://blog.michaelckennedy.net/tag/opinion/'>Opinion</a>, <a href='http://blog.michaelckennedy.net/tag/web/'>web</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/462/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/462/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/462/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=462&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/04/04/no-you-dont-need-a-windows-app/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Make External Links Open in a New Window With This jQuery Plugin</title>
		<link>http://blog.michaelckennedy.net/2012/03/19/make-external-links-open-in-a-new-window-with-this-jquery-plugin/</link>
		<comments>http://blog.michaelckennedy.net/2012/03/19/make-external-links-open-in-a-new-window-with-this-jquery-plugin/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 15:31:41 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=465</guid>
		<description><![CDATA[Here&#8217;s a common problem. You want to make all of your links on your site that would lead visitors away to open in separate tabs. For example, if I wanted to tell you about this cool article by Troy Goode &#8230; <a href="http://blog.michaelckennedy.net/2012/03/19/make-external-links-open-in-a-new-window-with-this-jquery-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=465&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a common problem. You want to make all of your links on your site that would lead visitors away to open in separate tabs. For example, if I wanted to tell you about this <a href="http://www.squaredroot.com/2007/12/05/addupdatedelete-with-linqpad/" target="_blank">cool article by Troy Goode about working with LINQPad</a> as part of a larger conversation, I probably would have it open in a new tab (as the one above does).</p>
<p>Of course, you can do this by adding target=&#8221;_blank&#8221; to all your external links, but that&#8217;s tedious to say the least. So here is a simple jQuery plugin I created to do the trick. (Yes I know there are others, but none seem quite right, so here is yet another.)</p>
<p>Download: <a href="http://www.michaelckennedy.net/Samples/blog/plugins/jQuery.externalLinks/jQuery.externalLinks-1.0.zip">Query.externalLinks</a><a title="http://www.michaelckennedy.net/Samples/blog/plugins/jQuery.externalLinks/jQuery.externalLinks-1.0.zip" href="http://www.michaelckennedy.net/Samples/blog/plugins/jQuery.externalLinks/jQuery.externalLinks-1.0.zip"><br />
</a></p>
<p>The usage is pretty easy. Pick a section to scan for external links and say go:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/external_links_usage.png"><img class="aligncenter size-full wp-image-484" title="external_links_usage" src="http://michaelckennedy.files.wordpress.com/2012/03/external_links_usage.png?w=584&h=138" alt="" width="584" height="138" /></a></p>
<p>Here is <a href="http://www.michaelckennedy.net/Samples/blog/HotKeys/" target="_blank">a simple example </a>(from my <a href="http://blog.michaelckennedy.net/2012/03/15/add-hot-keys-to-web-apps-with-this-jquery-plugin/" target="_blank">previous post on hotkeys</a>). Click on the title or the twitter icon in the lower right to see it in action.</p>
<p>Currently, it works by adding target=&#8221;_blank&#8221; to all fully-qualified links. For example, the first link will be a new window, the second won&#8217;t:</p>
<p>&lt;a href=&#8221;http://www.google.com&#8221;&gt;google&lt;/a&gt;<br />
&lt;a href=&#8221;/contact&#8221;&gt;contact me&lt;/a&gt;</p>
<p>Hope you find it helpful.</p>
<p>Cheers,<br />
<a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/jquery/'>jQuery</a>, <a href='http://blog.michaelckennedy.net/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/plugins/'>Plugins</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/465/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/465/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/465/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=465&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/03/19/make-external-links-open-in-a-new-window-with-this-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/external_links_usage.png" medium="image">
			<media:title type="html">external_links_usage</media:title>
		</media:content>
	</item>
		<item>
		<title>Add Hot Keys to Web Apps With jQuery.hotKeyMap.js</title>
		<link>http://blog.michaelckennedy.net/2012/03/15/add-hot-keys-to-web-apps-with-this-jquery-plugin/</link>
		<comments>http://blog.michaelckennedy.net/2012/03/15/add-hot-keys-to-web-apps-with-this-jquery-plugin/#comments</comments>
		<pubDate>Thu, 15 Mar 2012 19:10:46 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=471</guid>
		<description><![CDATA[Hot keys (or accelerator keys) have been an important navigational tool for desktop applications for many years. Finally, web applications are adopting this functionality too. Check out this simple example of a web app with hotkeys. Expect a more general &#8230; <a href="http://blog.michaelckennedy.net/2012/03/15/add-hot-keys-to-web-apps-with-this-jquery-plugin/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=471&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hot keys (or accelerator keys) have been an important navigational tool for desktop applications for many years. Finally, web applications are adopting this functionality too. Check out this <a href="http://www.michaelckennedy.net/Samples/blog/HotKeys/" target="_blank">simple example of a web app with hotkeys</a>.</p>
<p>Expect a more general blog post on the topic soon. For now, I&#8217;d like to share my jQuery plugin that enables this capability with you.</p>
<p><strong>Announcing jQuery.hotKeyMap.js</strong>: A jQuery plugin that allows you to add complex hot-key functionality and navigation to your web apps with very little effort.</p>
<p><span id="more-471"></span>You can download it here:</p>
<p style="padding-left:30px;"><a href="http://www.michaelckennedy.net/Samples/blog/plugins/jQuery.hotKeyMap/jQuery.hotKeyMap.zip"> jQuery.hotKeyMap</a></p>
<p>It&#8217;s built on top of John Resig&#8217;s <a href="https://github.com/jeresig/jquery.hotkeys" target="_blank">jQuery.hotKeys</a>. His plugin is great (as you&#8217;d expect), but as far as I know doesn&#8217;t support complex series of keys. For example, if you want to GMail style navigation (press &#8216;g&#8217; then press &#8216;t&#8217; to go to sent mail), that&#8217;s fairly difficult using his plugin. Here&#8217;s how you accomplish this with my plugin:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/usage_sm.png"><img class="aligncenter size-full wp-image-476" title="Usage" src="http://michaelckennedy.files.wordpress.com/2012/03/usage_sm.png?w=584&h=199" alt="" width="584" height="199" /></a></p>
<p>In the code above, we&#8217;re assigning three immediate key actions (e.g. ctrl+z executes undo). We are also adding one complex sequence: <strong>g, h</strong> =&gt; navigates to the home page (calls navTo, not shown, passing &#8216;h&#8217;).</p>
<p>Want to see it in action? Check out my sample application:</p>
<p style="padding-left:30px;"><em><strong>Web Apps Have Hot Keys Too!</strong></em><br />
<a href="http://www.michaelckennedy.net/Samples/blog/HotKeys/" target="_blank">http://www.michaelckennedy.net/Samples/blog/HotKeys/</a></p>
<p>It even comes with Visual Studio intellisense:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/usage_intellisense.png"><img class="aligncenter size-full wp-image-479" title="usage_intellisense" src="http://michaelckennedy.files.wordpress.com/2012/03/usage_intellisense.png?w=584&h=113" alt="" width="584" height="113" /></a></p>
<p>I hope you find it useful!</p>
<p>Cheers,<br />
<a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/jquery/'>jQuery</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/asp-net/'>ASP.NET</a>, <a href='http://blog.michaelckennedy.net/tag/jquery/'>jQuery</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/open-source/'>Open Source</a>, <a href='http://blog.michaelckennedy.net/tag/plugins/'>Plugins</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/471/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/471/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/471/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=471&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/03/15/add-hot-keys-to-web-apps-with-this-jquery-plugin/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/usage_sm.png" medium="image">
			<media:title type="html">Usage</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/usage_intellisense.png" medium="image">
			<media:title type="html">usage_intellisense</media:title>
		</media:content>
	</item>
		<item>
		<title>Speaking on NoSQL and MVC at the South Sound .NET User Group (Near Seattle, WA)</title>
		<link>http://blog.michaelckennedy.net/2012/03/13/speaking-on-nosql-and-mvc-at-the-south-sound-net-user-group-near-seattle-wa/</link>
		<comments>http://blog.michaelckennedy.net/2012/03/13/speaking-on-nosql-and-mvc-at-the-south-sound-net-user-group-near-seattle-wa/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 15:15:22 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[User Groups]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=406</guid>
		<description><![CDATA[Update: Thanks to everyone who came. You can download the sample application we build here and slides below:    Kennedy-Demo-Amazoon-Sound-Sound-Usergroup.zip    BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL View my profile on SlideShare. I&#8217;m excited to announce that I&#8217;ll be &#8230; <a href="http://blog.michaelckennedy.net/2012/03/13/speaking-on-nosql-and-mvc-at-the-south-sound-net-user-group-near-seattle-wa/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=406&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">Update: Thanks to everyone who came. You can download the sample application we build here and slides below:</p>
<p style="text-align:left;">   <a href="http://s3.amazonaws.com/michael-kennedy/downloads/SouthSoundUG/Kennedy-Demo-Amazoon-Sound-Sound-Usergroup.zip">Kennedy-Demo-Amazoon-Sound-Sound-Usergroup.zip</a></p>
<div id="__ss_12563114" style="width:425px;"><strong>   <a title="BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL" href="http://www.slideshare.net/mkennedy66996693/building-web-apps-with-aspnet-mvc-and-nosql" target="_blank">BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL</a></strong><iframe src='http://www.slideshare.net/slideshow/embed_code/12563114' width='425' height='348' scrolling='no'></iframe></p>
<div style="padding:5px 0 12px;"><strong>View <a href="http://www.slideshare.net/mkennedy66996693" target="_blank">my profile</a> on SlideShare.<span id="more-406"></span></strong></div>
<div style="padding:5px 0 12px;"><span style="text-align:left;">I&#8217;m excited to announce that I&#8217;ll be speaking at the </span><a style="text-align:left;" href="http://www.ssdotnet.org/" target="_blank">South Sound .NET User Group</a><span style="text-align:left;"> on April 12th in Olympia, WA.</span></div>
</div>
<p style="text-align:left;">The topic will be:</p>
<p style="padding-left:30px;"><em>BUILDING WEB APPS WITH ASP.NET MVC AND NOSQL</em></p>
<p style="padding-left:30px;"><em>This talk guides you through building modern web applications using ASP.NET MVC and <em> MongoDB</em>, one of the most popular NoSQL databases.</em></p>
<p style="padding-left:30px;"><em>You will learn some best practices for getting started with MVC. We&#8217;ll cover building rich-forms to accept user input. And if time permits, we might even add some client-side techniques using jQuery and MVC.</em></p>
<p style="padding-left:30px;"><em>All of this will be built upon the powerful non-relational database MongoDB. We will discuss the origins of the so-called NoSQL movement and why you might choose a non-relational database over SQL Server. You&#8217;ll also see our data access layer will be built using LINQ to MongoDB.</em></p>
<p style="padding-left:30px;"><em>Of course, you won&#8217;t be in for a night of PowerPoint. This talk is a series of interactive demos using <strong>Visual Studio 11, Windows 8,</strong> and C#.</em></p>
<p>I hope to see you there! There is a chance I&#8217;ll have some <a href="http://www.develop.com/" target="_blank">prizes from DevelopMentor</a> to hand out while I&#8217;m there too.</p>
<p>Cheers,<br />
<a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/speaking/'>Speaking</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/developmentor/'>DevelopMentor</a>, <a href='http://blog.michaelckennedy.net/tag/linq/'>LINQ</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/open-source/'>Open Source</a>, <a href='http://blog.michaelckennedy.net/tag/speaking/'>Speaking</a>, <a href='http://blog.michaelckennedy.net/tag/user-groups/'>User Groups</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/406/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/406/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/406/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=406&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/03/13/speaking-on-nosql-and-mvc-at-the-south-sound-net-user-group-near-seattle-wa/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>iPad 4G Doesn&#8217;t Mean What You Think It Means</title>
		<link>http://blog.michaelckennedy.net/2012/03/12/ipad-4g-doesnt-mean-what-you-think-it-means/</link>
		<comments>http://blog.michaelckennedy.net/2012/03/12/ipad-4g-doesnt-mean-what-you-think-it-means/#comments</comments>
		<pubDate>Mon, 12 Mar 2012 16:24:39 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=422</guid>
		<description><![CDATA[We&#8217;re all psyched about the new iPad 3 (even though it&#8217;s not called iPad 3). It&#8217;s filled with killer features: HD Video, Retina Display, and every conceivable type of wireless connectivity including 4G. Apple touts 4G as finally giving you &#8230; <a href="http://blog.michaelckennedy.net/2012/03/12/ipad-4g-doesnt-mean-what-you-think-it-means/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=422&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re all psyched about the new iPad 3 (even though it&#8217;s <a href="http://www.ibtimes.com/articles/311239/20120308/new-ipad-release-name-confusion-3-hd.htm" target="_blank">not called iPad 3</a>). It&#8217;s filled with <a href="http://www.apple.com/ipad/" target="_blank">killer features</a>: HD Video, Retina Display, and every conceivable type of wireless connectivity including <strong>4G</strong>.</p>
<p>Apple touts 4G as finally giving you the ability to watch HD video streaming on the go. They&#8217;re implying that finally you are free of 3G slowness and now you have high-speed Internet. You can do normal high-speed Internet things on the go. You can even tether up to 5 devices to that connection.</p>
<p>But I wouldn&#8217;t do too much of that if I were you! <span id="more-422"></span>You see, this capability (while awesome) reminds me of that <a href="http://www.imdb.com/character/ch0003786/quotes" target="_blank">Prince Bride quote</a>:</p>
<blockquote><p>You keep using that word.<br />
I do not think it means what you think it means.</p></blockquote>
<p>Yes, you can watch HD video. But only 3 hours of it, per month. And that&#8217;s it. At the highest premium plan ($50/month). The starter plan gives you maybe 30 minutes / month. That had better be pretty good video, because it&#8217;s not cheap.</p>
<p>Here&#8217;s the relevant excerpt from the apple order page:</p>
<p><img class="aligncenter size-full wp-image-427" title="4G Plans for iPad" src="http://michaelckennedy.files.wordpress.com/2012/03/4g-rules.png?w=584&h=344" alt="" width="584" height="344" />Yikes! Don&#8217;t despair though. There are other options. I&#8217;m currently using <a href="http://www.clear.com" target="_blank">Clear.net</a>. For $40/month they give you UNLIMITED data plans.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/device-list-4g-spot-apollo-thumb.png"><img class="aligncenter size-full wp-image-428" title="device-list-4g-spot-apollo-thumb" src="http://michaelckennedy.files.wordpress.com/2012/03/device-list-4g-spot-apollo-thumb.png?w=584" alt=""   /></a>Here&#8217;s my recent usage graph. I usually do not use my clear at home, but do use it when I&#8217;m working out at Starbucks or elsewhere. Keep in mind, this graph is <strong>PER DAY USAGE </strong>and<strong> </strong>only counts 8 days of this period<strong></strong>. I&#8217;ve also highlighted where the <strong>MONTHLY</strong> iPad 4G plans would land:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/clear-usage3.png"><img class="aligncenter size-full wp-image-444" title="clear-usage3" src="http://michaelckennedy.files.wordpress.com/2012/03/clear-usage3.png?w=584&h=188" alt="" width="584" height="188" /></a>You can see several days of normal usage would bust the monthly limit of the premium plans. Most days that I have used the device all day would bust the mid-grade plan (not the cheapest, which is 250 MB, but the 3 GB plan).</p>
<p>Yes, there is the draw-back of carrying an extra device (even though it&#8217;s very small &#8211; credit card sized). But you get 4G and you get to use the Internet as if you really had high-speed Internet. Plus, you get a wireless network supporting up to 8 devices at once (maybe 9 with a hack).</p>
<p>Here&#8217;s a speed test from a random day on clear 4G. You can see it&#8217;s pretty speedy, but I have seen it above 10 Mbps.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/clear-speed.png"><img class="aligncenter size-full wp-image-435" title="clear-speed" src="http://michaelckennedy.files.wordpress.com/2012/03/clear-speed.png?w=584&h=466" alt="" width="584" height="466" /></a>So like many of you, I&#8217;m eagerly awaiting March 16th when the new iPad ships. But I&#8217;m just as happy it comes with WiFi and not 4G. I already have the covered.</p>
<p>Cheers!<br />
<a href="http://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/mobile/'>Mobile</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/mobile-2/'>mobile</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/422/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/422/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/422/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=422&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/03/12/ipad-4g-doesnt-mean-what-you-think-it-means/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/4g-rules.png" medium="image">
			<media:title type="html">4G Plans for iPad</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/device-list-4g-spot-apollo-thumb.png" medium="image">
			<media:title type="html">device-list-4g-spot-apollo-thumb</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/clear-usage3.png" medium="image">
			<media:title type="html">clear-usage3</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/clear-speed.png" medium="image">
			<media:title type="html">clear-speed</media:title>
		</media:content>
	</item>
		<item>
		<title>9 Ways Your Brand New ASP.NET MVC Project Can Be Better</title>
		<link>http://blog.michaelckennedy.net/2012/03/07/9-ways-your-brand-new-mvc-project-can-be-better/</link>
		<comments>http://blog.michaelckennedy.net/2012/03/07/9-ways-your-brand-new-mvc-project-can-be-better/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 14:55:51 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=329</guid>
		<description><![CDATA[So you&#8217;re ready to start that new and ambitious ASP.NET MVC project. Maybe you&#8217;re kicking off a new startup or just finally moving that old-and-crusty webforms project into modern development world. Either way, here are a few very simple things you &#8230; <a href="http://blog.michaelckennedy.net/2012/03/07/9-ways-your-brand-new-mvc-project-can-be-better/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=329&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;re ready to start that new and ambitious ASP.NET MVC project. Maybe you&#8217;re kicking off a new startup or just <em>finally</em> moving that old-and-crusty webforms project into modern development world. Either way, here are a few very simple things you can do immediately after creating that new MVC project that you will thank yourself for as your project grows in complexity.</p>
<p><strong>1.</strong> First of all, even MVC 3 has old-and-crusty aspects lurking in its projects. There are old MicrosoftMvc*.js AJAX and validation libraries that have be replaced with <a href="http://bradwilson.typepad.com/blog/2010/10/mvc3-unobtrusive-ajax.html" target="_blank">new jQuery hotness</a>. These *.js files aren&#8217;t used so just delete them.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/msmvcjs_annotated.png"><img class="aligncenter size-full wp-image-365" title="Unused MicrosoftMVC*.js files" src="http://michaelckennedy.files.wordpress.com/2012/03/msmvcjs_annotated.png?w=584" alt=""   /></a></p>
<p><strong>2.</strong> Many of the dependencies of your MVC project are out-of-date as soon as you create your project. You have an old version of jQuery, Entity Framework, etc. Luckily <a href="http://haacked.com/" target="_blank">Phil Haack</a> and <a href="http://weblogs.asp.net/scottgu/" target="_blank">crew </a>had the brilliant insight to link these to NuGet. So the next thing you do is just run NuGet and choose the Updates tab.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/start_nuget_sm_2.png"><span id="more-329"></span><img class="aligncenter size-full wp-image-367" title="start_nuget_sm_2" src="http://michaelckennedy.files.wordpress.com/2012/03/start_nuget_sm_2.png?w=584" alt=""   /></a></p>
<p>What&#8217;s that, you don&#8217;t have NuGet? Oh, you need to <a href="http://nuget.org/" target="_blank">fix that right now</a>!</p>
<p>Here&#8217;s what you can expect under the NuGet updates page:</p>
<p><a title="Click for full image" href="http://michaelckennedy.files.wordpress.com/2012/03/nuget_update_annotated_full.png" target="_blank"><img class="aligncenter size-full wp-image-368" title="nuget_update_annotated_small" src="http://michaelckennedy.files.wordpress.com/2012/03/nuget_update_annotated_small.png?w=584&h=396" alt="" width="584" height="396" /></a></p>
<p><strong>3. </strong>Speaking of NuGet, by default all the external, NuGet-based JavaScript files get mixed in with your few JS files you always need to go back to for editing. So this is what you do:</p>
<p style="padding-left:30px;">Create a separate folder called <strong>js</strong> and put your JavaScript files in there.</p>
<p>Don&#8217;t forget to import site.js into your _Layout.cshtml file.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/sol_with_sitejs.png"><img class="aligncenter size-full wp-image-372" title="sol_with_sitejs" src="http://michaelckennedy.files.wordpress.com/2012/03/sol_with_sitejs.png?w=584" alt=""   /></a></p>
<p><strong>4.</strong> You like intellisense, yes? You also like fast-loading pages yes? So on one hand, you want to use <strong>jquery-1.7.1-vsdoc.js</strong> for intellisense, but you want <strong>jquery-1.7.1.min.js</strong> for performance. Here&#8217;s what you do. Import the minified version into your layout page (see later in the article) but add a &#8220;reference&#8221; to the vsdoc version in your site.js file. See the /// &lt;reference&gt; at the top? See intellisense? Good!</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/site_js_ref.png"><img class="aligncenter size-full wp-image-374" title="Site.js" src="http://michaelckennedy.files.wordpress.com/2012/03/site_js_ref.png?w=584&h=590" alt="" width="584" height="590" /></a></p>
<p>BTW, you are using namespaces or the prototype pattern or something besides just importing junk into the global namespace aren&#8217;t you? I thought so.</p>
<p><strong>5.</strong> Next, unless you are planning on using jQueryUI you should remove it via NuGet. It has so many files under the content folder that unless you plan on using it. They are just mental weight. Everything in your project should earn its keep. You can always add jQuery UI back via NuGet if you want it.</p>
<p><strong>6.</strong> Web programming is <em>awesome</em>, except when it&#8217;s not. That usual happens when you find your page looks different in IE vs Chrome vs Safari. You can <a href="http://sixrevisions.com/css/css-tips/css-tip-1-resetting-your-styles-with-css-reset/" target="_blank">avoid some of these issues</a> just by referencing <a href="http://meyerweb.com/eric/tools/css/reset/" target="_blank">Eric Meyer&#8217;s reset.css</a>. Be sure to put reset.css as the <strong>*very*</strong> first CSS file.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/reset_css_added_very_first_annotated.png"><img class="aligncenter size-full wp-image-375" title="Using reset.css" src="http://michaelckennedy.files.wordpress.com/2012/03/reset_css_added_very_first_annotated.png?w=584&h=166" alt="" width="584" height="166" /></a></p>
<p><strong>7.</strong> In ASP.NET MVC, there are models, then there are m<em><strong>odels</strong></em>. In MVC, there are domain models that are usually UI independent. Then there are models specifically meant to be tied to views. These view-oriented models are called View Models. I recommend you put view models in their own folder to make this dead-obvious.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/sol_with_viewmodels.png"><img class="aligncenter size-full wp-image-376" title="sol_with_viewmodels" src="http://michaelckennedy.files.wordpress.com/2012/03/sol_with_viewmodels.png?w=584" alt=""   /></a></p>
<p>Stephen Walther has<a href="http://stephenwalther.com/blog/archive/2009/04/13/asp-net-mvc-tip-50-ndash-create-view-models.aspx" target="_blank"> more on View Models</a> if this is the first you&#8217;re hearing of them.</p>
<p><strong>8.</strong> You said you like fast pages before right? Well MVC is <em>&#8220;doing it wrong&#8221;</em> in order to allow you to inline JS which you should not do. Put the <a title="High Performance Web Sites: Rule 6 – Move Scripts to the Bottom" href="http://developer.yahoo.com/blogs/ydn/posts/2007/07/high_performanc_5/" target="_blank">JS imports at the bottom of the page</a>.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/03/js_at_bottom_of_page_with_imports_doing_it_right_annotated.png"><img class="aligncenter size-full wp-image-377" title="js_at_bottom_of_page_with_imports_doing_it_right_annotated" src="http://michaelckennedy.files.wordpress.com/2012/03/js_at_bottom_of_page_with_imports_doing_it_right_annotated.png?w=584&h=116" alt="" width="584" height="116" /></a></p>
<p>Be careful though, modernizr.js needs to stay at the top to work.</p>
<p><strong> 9.</strong> There are times you need to conditionally import JavaScript files from pages. The technique above in #8 makes this adhoc importing difficult. We can easily fix this by adding a <em>layout section</em> called <strong>AdditionalJsImports</strong> and make it optional (see above). This lets pages add more JS *after* jQuery.js and site.js.</p>
<p><strong>Conclusion</strong></p>
<p>If you do these 9 things at the start of your project, you&#8217;ll be on a good path to a well-architected system with some key advantages: It doesn&#8217;t have files in the wrong places, it doesn&#8217;t have unused or outdated files, and it is built for performance.</p>
<p>Hope you find these tips useful! If you have your own, please add them to the comments below.</p>
<p>Cheers!<br />
<a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/articles/'>Articles</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/articles/'>Articles</a>, <a href='http://blog.michaelckennedy.net/tag/asp-net/'>ASP.NET</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/tips/'>tips</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/329/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/329/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/329/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=329&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/03/07/9-ways-your-brand-new-mvc-project-can-be-better/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/msmvcjs_annotated.png" medium="image">
			<media:title type="html">Unused MicrosoftMVC*.js files</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/start_nuget_sm_2.png" medium="image">
			<media:title type="html">start_nuget_sm_2</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/nuget_update_annotated_small.png" medium="image">
			<media:title type="html">nuget_update_annotated_small</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/sol_with_sitejs.png" medium="image">
			<media:title type="html">sol_with_sitejs</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/site_js_ref.png" medium="image">
			<media:title type="html">Site.js</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/reset_css_added_very_first_annotated.png" medium="image">
			<media:title type="html">Using reset.css</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/sol_with_viewmodels.png" medium="image">
			<media:title type="html">sol_with_viewmodels</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/js_at_bottom_of_page_with_imports_doing_it_right_annotated.png" medium="image">
			<media:title type="html">js_at_bottom_of_page_with_imports_doing_it_right_annotated</media:title>
		</media:content>
	</item>
		<item>
		<title>Managing Cumbersome Shared Views Folder for Large Projects in MVC</title>
		<link>http://blog.michaelckennedy.net/2012/03/06/managing-shared-views-folder-for-large-mvc-projects/</link>
		<comments>http://blog.michaelckennedy.net/2012/03/06/managing-shared-views-folder-for-large-mvc-projects/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 12:55:33 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=333</guid>
		<description><![CDATA[While ASP.NET MVC promotes clean separation-of-concerns for your web applications, there are some short comings. A problem you&#8217;ll run into on large ASP.NET MVC projects is the Views section of your web application becomes completely crowded with hundreds or thousands of &#8230; <a href="http://blog.michaelckennedy.net/2012/03/06/managing-shared-views-folder-for-large-mvc-projects/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=333&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While ASP.NET MVC promotes clean separation-of-concerns for your web applications, there are some short comings. A problem you&#8217;ll run into on <strong>large</strong> ASP.NET MVC projects is the Views section of your web application becomes completely crowded with hundreds or thousands of files.</p>
<p>Usually, these view files are organized into sections by controller which keeps this manageable. For example, your solution might look like:<br />
<span id="more-333"></span></p>
<ul>
<li>Controllers</li>
<li>Models</li>
<li><strong>Views</strong>
<ul>
<li>Home
<ul>
<li>Index.cshtml</li>
<li>About.cshtml</li>
</ul>
</li>
<li>Products
<ul>
<li>All.cshtml</li>
<li>Show.cshtml</li>
<li>New.cshtml</li>
</ul>
</li>
<li><span style="text-decoration:underline;"><strong>Shared</strong></span>
<ul>
<li><strong>&#8230;</strong></li>
</ul>
</li>
<li>etc&#8230;</li>
</ul>
</li>
</ul>
<p>So that any one folder might only have 10 cshtml files. But there is one folder that is disproportionately crowed, that <strong>Shared</strong> folder where all the common partial views and layouts are kept. A quick look at one of my recent MVC projects shows <strong>113 files</strong> in that shared folder!</p>
<p>A 113 files tossed into a single folder is painful to manage and difficult to find what you&#8217;re looking for at a glance. If they could be categorized into subfolders, say things like Shared/Navigation, Shared/Accounts, Shared/Users, things would be good again.</p>
<p>Presently MVC doesn&#8217;t look into subfolders of the shared views folder. But with a little open-source library I wrote and a few clicks on NuGet, it will!</p>
<h2>Introducing Enhanced View Locations for MVC</h2>
<p>To address this issue, I&#8217;ve created a project over at CodePlex:</p>
<p style="padding-left:30px;"><strong>Enhanced View Locations for MVC</strong><a href="http://mvcviews.codeplex.com/"></p>
<p>http://mvcviews.codeplex.com/</a></p>
<p>With this library added to your project<span style="color:#333333;font-size:16px;font-style:normal;line-height:20px;"> </span><span style="color:#333333;font-size:16px;font-style:normal;line-height:20px;">(via NuGet),</span> your massive Shared folder can look like this:</p>
<p><img class="alignnone" src="http://www.codeplex.com/Download?ProjectName=mvcviews&amp;DownloadId=279125" alt="" width="272" height="308" /></p>
<p>Here&#8217;s how you use it (from the codeplex project documentation):</p>
<p><em>Enhanced View Locations for MVC</em> allows you to further organize your ASP.NET MVC views without your action methods or Html.RenderPartial / Html.RenderAction elements knowing or caring about how they are organized or re-organized.</p>
<p>1. Begin by adding a reference to <strong>EnhancedViewLocations.dll</strong> to your ASP.NET MVC project via NuGet (<a href="http://nuget.org/List/Packages/EnhancedViewLocations" target="_blank">http://nuget.org/List/Packages/EnhancedViewLocations</a>) or by directly downloading and referencing it.</p>
<p>2. Next, define and register custom view locations in the form partial Uri&#8217;s from within the Global.asax file:</p>
<pre>protected void Application_Start()
{
    AreaRegistration.RegisterAllAreas();
    RegisterGlobalFilters( GlobalFilters.Filters );
    RegisterRoutes( RouteTable.Routes );

    // Register the extra locations for views.
    RegisterCustomViewLocations();
}

private static void RegisterCustomViewLocations()
{
   // We can optionally enable the standard Razor view CS
   // (or VB) locations so we don't always search our
   // extra / custom areas first when searching for a view.
   // EnhancedViewLocator.EnableStandardRazorCSLocations();

   // Next, add two extra locations to store / arrange our views.

   // 1. in the templates folder under the standard shared view
   // folder.
   EnhancedViewLocator.AddFolder( <span style="text-decoration:underline;">"views/shared/templates"</span> );

   // 2. in the navigation folder under the standard
   // shared view folder.
   EnhancedViewLocator.AddFolder( <span style="text-decoration:underline;">"views/shared/navigation"</span> );

   // Finally, have the locator install a custom view
   // engine to manage the lookups.
   EnhancedViewLocator.Install( ControllerBuilder.Current );
}</pre>
<div>Now you can create the to subfolders templates and navigation in the shared views (it can actually be any folder on your site provided you register it but I recommend keeping inside the views folder).</div>
<div></div>
<div>Hope you find it useful!</div>
<div></div>
<div>Cheers,</div>
<div><a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></div>
<div></div>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/articles/'>Articles</a>, <a href='http://blog.michaelckennedy.net/category/open-source/'>Open Source</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/articles/'>Articles</a>, <a href='http://blog.michaelckennedy.net/tag/asp-net/'>ASP.NET</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/333/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/333/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/333/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=333&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/03/06/managing-shared-views-folder-for-large-mvc-projects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.codeplex.com/Download?ProjectName=mvcviews&#38;DownloadId=279125" medium="image" />
	</item>
		<item>
		<title>Now I&#8217;m an INETA Speaker!</title>
		<link>http://blog.michaelckennedy.net/2012/03/05/now-im-an-ineta-speaker/</link>
		<comments>http://blog.michaelckennedy.net/2012/03/05/now-im-an-ineta-speaker/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 15:46:09 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[NoSQL]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=316</guid>
		<description><![CDATA[I&#8217;ve recently signed up as an INETA speaker. If you would like me to speak at your user group or event, check out my INETA Speaker Profile or simply contact me directly. I typically speak on NoSQL, MongoDB, ASP.NET MVC, Modern Web Applications &#8230; <a href="http://blog.michaelckennedy.net/2012/03/05/now-im-an-ineta-speaker/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=316&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://ineta.org/Speakers/SearchCommunitySpeakers.aspx?SpeakerId=b721db70-810c-48c4-aa8a-7b71de90b161" target="_blank"><img class="alignright" title="INETA Speaker" src="http://ineta.org/images/OfficialLogos/InetaCommunitySpeakersRequestMe.png" alt="" width="132" height="132" /></a></p>
<p>I&#8217;ve recently signed up as an INETA speaker. If you would like me to speak at your user group or event, check out my <a href="http://ineta.org/Speakers/SearchCommunitySpeakers.aspx?SpeakerId=b721db70-810c-48c4-aa8a-7b71de90b161" target="_blank">INETA Speaker Profile</a> or simply <a href="http://blog.michaelckennedy.net/contact/">contact me</a> directly.</p>
<p>I typically speak on NoSQL, MongoDB, ASP.NET MVC, Modern Web Applications (whatever that means!) and design patterns but I&#8217;m also open for other requests.</p>
<p>Cheers!<br />
<a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy </a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/speaking/'>Speaking</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/speaking/'>Speaking</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/316/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/316/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/316/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=316&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/03/05/now-im-an-ineta-speaker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://ineta.org/images/OfficialLogos/InetaCommunitySpeakersRequestMe.png" medium="image">
			<media:title type="html">INETA Speaker</media:title>
		</media:content>
	</item>
		<item>
		<title>Introducing MongoDB and LINQ at Mongo Seattle 2011</title>
		<link>http://blog.michaelckennedy.net/2012/03/01/introducing-mongodb-and-linq-at-mongo-seattle-2011/</link>
		<comments>http://blog.michaelckennedy.net/2012/03/01/introducing-mongodb-and-linq-at-mongo-seattle-2011/#comments</comments>
		<pubDate>Thu, 01 Mar 2012 20:16:17 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=243</guid>
		<description><![CDATA[Here&#8217;s a video of a short talk I gave at Mongo Seattle 2011 which is a quick getting started with .NET &#38; MongoDB session. Enjoy! @mkennedy PS &#8211; Yeah, it&#8217;s from last year. I forgot to publish it on my &#8230; <a href="http://blog.michaelckennedy.net/2012/03/01/introducing-mongodb-and-linq-at-mongo-seattle-2011/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=243&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a video of a short talk I gave at Mongo Seattle 2011 which is a quick getting started with .NET &amp; MongoDB session.</p>
<p><a href="http://blip.tv/mongodb/mongodb-_net-and-linq-4021754" target="_blank"><img class="aligncenter size-full wp-image-252" title="Mongo Seattle - Kennedy" src="http://michaelckennedy.files.wordpress.com/2012/03/mongoseattlekennedy.png?w=584&h=389" alt="" width="584" height="389" /></a></p>
<p>Enjoy!<br />
<a href="https://twitter.com/#!/mkennedy" target="_blank">@mkennedy</a></p>
<p>PS &#8211; Yeah, it&#8217;s from last year. I forgot to publish it on my blog so here it is&#8230;</p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/nosql/'>NoSQL</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/conferences/'>Conferences</a>, <a href='http://blog.michaelckennedy.net/tag/linq/'>LINQ</a>, <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/speaking/'>Speaking</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/243/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=243&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/03/01/introducing-mongodb-and-linq-at-mongo-seattle-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/03/mongoseattlekennedy.png" medium="image">
			<media:title type="html">Mongo Seattle - Kennedy</media:title>
		</media:content>
	</item>
		<item>
		<title>Screencast: Building ASP.NET MVC Forms with Razor</title>
		<link>http://blog.michaelckennedy.net/2012/01/23/screencast-building-asp-net-mvc-forms-with-razor/</link>
		<comments>http://blog.michaelckennedy.net/2012/01/23/screencast-building-asp-net-mvc-forms-with-razor/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 18:31:57 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Foundations]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://michaelckennedy.wordpress.com/?p=16</guid>
		<description><![CDATA[[note: This screencast has been adapted from my earlier blog post.] In this ASP.NET MVC Foundations screencast, we’re going to look at building an ASP.NET MVC page which allows users to create and edit objects in our domain. We’ll cover &#8230; <a href="http://blog.michaelckennedy.net/2012/01/23/screencast-building-asp-net-mvc-forms-with-razor/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=16&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[<strong>note</strong>: This screencast has been adapted from my <a href="http://blog.michaelckennedy.net/2012/01/20/building-asp-net-mvc-forms-with-razor/">earlier blog post</a>.]</p>
<div>In this ASP.NET MVC Foundations screencast, we’re going to look at building an ASP.NET MVC page which allows users to create and edit objects in our domain. We’ll cover just the basics of using HTML helpers to map model properties to our HTML form and Model Binding to convert our HTML form back into our rich domain object.We’ll start with a very basic store website which has read-only data and we&#8217;ll add the ability to create and edit products in our store. Be sure to watch in HD mode for a crisp screen.</div>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/2AWVs7SzOXM?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/video/'>Video</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/asp-net/'>ASP.NET</a>, <a href='http://blog.michaelckennedy.net/tag/foundations/'>Foundations</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/screencasts/'>Screencasts</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=16&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/01/23/screencast-building-asp-net-mvc-forms-with-razor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Building ASP.NET MVC Forms with Razor (ASP.NET MVC Foundations Series)</title>
		<link>http://blog.michaelckennedy.net/2012/01/20/building-asp-net-mvc-forms-with-razor/</link>
		<comments>http://blog.michaelckennedy.net/2012/01/20/building-asp-net-mvc-forms-with-razor/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 12:00:11 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://michaelckennedy.wordpress.com/?p=23</guid>
		<description><![CDATA[In this ASP.NET MVC Foundations article, we’re going to look at building an ASP.NET MVC page which allows users to create and edit objects in our domain. We’ll cover just the basics of using HTML helpers to map model properties to our HTML form and Model Binding to convert our HTML form back into our rich domain object.

We’ll start with a very basic store website (downloads here: BasicMvcForms_starter.zip and BasicMvcForms_final.zip)which has a database and some basic products already listed...
 <a href="http://blog.michaelckennedy.net/2012/01/20/building-asp-net-mvc-forms-with-razor/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=23&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p>[<strong>Update</strong>: Want to <a href="http://www.michaelckennedy.net/blog/2012/01/23/ScreencastBuildingASPNETMVCFormsWithRazorASPNETMVCFoundationsSeries.aspx">watch this as a <strong>screencast </strong></a>rather than article?]</p>
<p>In this ASP.NET MVC Foundations article, we’re going to look at building an ASP.NET MVC page which allows users to create and edit objects in our domain. We’ll cover just the basics of using <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.htmlhelper.aspx">HTML helpers </a>to map model properties to our HTML form and <a href="http://msdn.microsoft.com/en-us/library/dd410405.aspx">Model Binding</a> to convert our HTML form back into our rich domain object.</p>
<p>We’ll start with a very basic store website (downloads here: <a href="http://www.michaelckennedy.net/downloads/samples/BasicMvcForms_starter.zip">BasicMvcForms_starter.zip</a> and <a href="http://www.michaelckennedy.net/downloads/samples/BasicMvcForms_final.zip">BasicMvcForms_final.zip</a>)which has a database and some basic products already listed:</p>
<p style="font-size:1.25em;line-height:1.5em;"><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product1.png" alt="" /></p>
<p><span id="more-23"></span>Notice that we have five products. There links to edit and create products. Currently, they don’t do much:</p>
<p style="font-size:1.25em;line-height:1.5em;"><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product2.png" alt="" /></p>
<p><strong><span style="font-size:15px;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;">First we’ll need to add action methods. That’s easy enough. Here’s the create code:<br />
</span></strong><br />
<img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product4.png" alt="" /></p>
<p>And similarly, the edit code:</p>
<p><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product5.png" alt="" /></p>
<p>Now that we have action methods for edit and create, we’ll need the corresponding views. Use the Visual Studio tooling to create two empty views as follows:</p>
<p><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product2.5.png" alt="" /></p>
<p>In the resulting dialog, choose strongly-typed with Product and an empty view without referencing the scripts (we do this globally already). In practice, you might choose “edit” and “create” to help jump-start the Razor code. In this example, we’ll do that from scratch so empty is what we want.</p>
<p><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product3.png" alt="" /></p>
<p>Now our links to edit and create products work. However they don’t have any content in their views. We’ll use the <strong>HTML Helper </strong>methods to convert our product into forms ready for the editing.</p>
<p>It all starts with <strong>Html.BeginForm</strong>(). We’ll define a form using this MVC convention and helper method as follows:</p>
<p><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product6.png" alt="" /></p>
<p>Next, we use the Model property of the view and the HTML helper methods to define the input fields. Note that we’re using <strong>Html.TextBoxFor</strong>() and <strong>Html.LabelFor</strong>() to create the fields. Our <strong>Featured </strong>property is a Boolean, so we’ll use <strong>Html.CheckBoxFor</strong>() on that one.</p>
<p style="font-size:1.25em;line-height:1.5em;"><img style="font-size:1.25em;line-height:1.5em;" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product7.png" alt="" /></p>
<p style="font-size:1.25em;line-height:1.5em;">Once we flesh out the other properties, we’ll be finished with the create view. And it turns out the edit view is identical. There are tricks to share them across actions (e.g. PartialViews) but for our simple example, we’ll just copy / paste between the two views.</p>
<p>Last thing we need is a submit button to submit the form.</p>
<p style="font-size:1.25em;line-height:1.5em;"><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product8.png" alt="" /></p>
<p>Now we should have a nice usable form to create products (or edit them if you copy &amp; pasted that view). Here’s the edit view:</p>
<p style="font-size:1.25em;line-height:1.5em;"><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product9.png" alt="" /></p>
<p>The final step is to capture the form data on the controller methods and update the database. This is where it gets interesting.</p>
<p>We will define a second method for each action (create &amp; edit) which accept the post. We do not want our “show the form to start editing” code to mix with the “save the data and move on” code. We’ll achieve this separation using two attributes <strong>HttpGet </strong>&amp; <strong>HttpPost.<br />
</strong></p>
<p style="font-size:1.25em;line-height:1.5em;"><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product10.png" alt="" /></p>
<p>Notice the original Create method has the GET attribute. This displays the form to begin creating a product. The second one is more interesting. It adds the product to the DB and returns to the product list. It also only accepts POST requests. Notice that it accepts a Product parameter which is populated using model binding by ASP.NET MVC.</p>
<p><em><strong>Learn this pattern!</strong></em> It’s super common in MVC. I’ll call it the <strong>Get+Post+Redirect </strong>pattern.</p>
<p>1. HttpGet method shows form, returns View().<br />
2. HttpPost method accepts the model (which is populated using model binding)<br />
3. HttpPost method then updates the data and redirects to a new view.</p>
<p>Edit is similar. Often, websites use <a href="http://automapper.codeplex.com/">AutoMapper</a> to do the manual copy / update you see here.</p>
<p><span style="font-size:1.25em;line-height:1.5em;"><img src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product11.png" alt="" /></span></p>
<p><span style="font-size:1.25em;line-height:1.5em;">Now we have a fully functioning store (albeit a simple one). One glaring </span><span style="font-size:20px;line-height:28px;">omission</span><span style="font-size:1.25em;line-height:1.5em;"> is validation. We’ll cover that in another post.</span></p>
<p style="font-size:1.25em;line-height:1.5em;"><strong>Conclusion</strong></p>
<p>To wrap up, we took a basic MVC website and went through these steps:</p>
<ul>
<li><span style="font-size:1.25em;line-height:1.5em;"> Added edit and create methods</span></li>
<li><span style="font-size:1.25em;line-height:1.5em;">The new methods returned the correct model</span></li>
<li><span style="font-size:1.25em;line-height:1.5em;">Added strongly-typed views for each method</span></li>
<li><span style="font-size:1.25em;line-height:1.5em;">Used Html.BeginForm() and related Html.XXXXFor() methods to build out the form</span></li>
<li><span style="font-size:1.25em;line-height:1.5em;">Added a submit button</span></li>
<li><span style="font-size:1.25em;line-height:1.5em;">Implemented the Get+Post+Redirect pattern in edit and create.</span></li>
<li><span style="font-size:1.25em;line-height:1.5em;">Take the rest of the day off. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></li>
</ul>
<p><span style="font-size:1.25em;line-height:1.5em;">Good luck with your websites and happy POSTing.</span></p>
<p><span style="font-size:1.25em;line-height:1.5em;">- Cheers</span><br />
<a style="font-size:1.25em;line-height:1.5em;" href="http://twitter.com/mkennedy">@mkennedy</a></p>
</div>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=23&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/01/20/building-asp-net-mvc-forms-with-razor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product1.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product2.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product4.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product5.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product2.5.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product3.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product6.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product7.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product8.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product9.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product10.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product11.png" medium="image" />
	</item>
		<item>
		<title>Building a Cloud OS for .NET Developers &#8211; Part 2</title>
		<link>http://blog.michaelckennedy.net/2011/06/13/building-a-cloud-os-for-net-developers-part-2/</link>
		<comments>http://blog.michaelckennedy.net/2011/06/13/building-a-cloud-os-for-net-developers-part-2/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 18:37:48 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://michaelckennedy.wordpress.com/?p=39</guid>
		<description><![CDATA[In Part 1 of my Building a Cloud OS for .NET Developers series, I talked about setting up a pure cloud OS focused on developers. But the one crucial aspect I left out was the developer tools. In this second &#8230; <a href="http://blog.michaelckennedy.net/2011/06/13/building-a-cloud-os-for-net-developers-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=39&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In <a href="/blog/2011/05/25/BuildingACloudOSForNETDevelopersPart1.aspx">Part 1</a> of my Building a Cloud OS for .NET Developers series, I talked about setting up a pure cloud OS focused on developers. But the one crucial aspect I left out was <strong>the developer tools</strong>.</p>
<p>In this second installment, we’ll be covering exactly that. How do we manage having Visual Studio and associated tools and servers universally accessible in the cloud, even on mobile devices such as iPads?</p>
<p><span id="more-39"></span></p>
<p>We’ll start with the king of the cloud:</p>
<p><em>Amazon Elastic Compute Cloud (Amazon EC2)</em><br />
<a href="http://aws.amazon.com/ec2/">http://aws.amazon.com/ec2/</a></p>
<p>At EC2 we can create a variety of Windows instances, get full admin access via remote desktop, and install anything we want (Visual Studio, SQL Server, MongoDB, etc). We can also run these for just 30 minutes here, 2 hours there and we’ll only be charge for the time we use it.</p>
<p>We are going to setup a Windows Server in EC2 which we can access from our Cloud OS, or any other machine or mobile device, and deck it out with all the developer tools we want. You have to choose your server type based on what you’re planning on doing as well as how much you want to pay. Here are the available options and pricing. You can roughly expect to pay $0.50/hr for a good workstation, or $0.12/hr for an acceptable but small one.</p>
<blockquote><p><em>Amazon EC2 Instance Types</em>: <a href="http://aws.amazon.com/ec2/instance-types/">http://aws.amazon.com/ec2/instance-types/</a><br />
Amazon EC2 Pricing: <a href="//aws.amazon.com/ec2/pricing/">http://aws.amazon.com/ec2/pricing/<br />
</a></p></blockquote>
<p>I’m currently using a Micro Instance for an SVN server which is always running as well as High-Memory Extra Large Instance for my development machine that I start and stop on-demand when I need to get some programming done. Here are the specs for the developer workstation:</p>
<blockquote><p><em>High-Memory Extra Large Instance<br />
</em><br />
17.1 GB of memory<br />
6.5 EC2 Compute Units (2 virtual cores with 3.25 EC2 Compute Units each)<br />
420 GB of instance storage<br />
64-bit platform<br />
I/O Performance: Moderate<br />
API name: m2.xlarge</p></blockquote>
<p>You have to admit, that’s a pretty killer workstation. It’s a overkill on the memory, but has better processors than the cheaper ones which also have decent memory.</p>
<p>The price of the dev machine is $0.69 / hour. I’ve also built some tools which help shut down the machine in case I get distracted. So far I’ve been using it pretty heavily this past few weeks and have spent probably $13 on it. That’s not bad for the possibility of being anywhere in the world (with an Internet connection) and getting my workstation running in an instant. OK, maybe it takes longer than an instant. To be fair, it usually it’s 10-15 seconds <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><strong>Take the Free Lunch</strong></p>
<p>One thing you should do straight away if you’re going to try this is sign up for the EC2 Free Tier:</p>
<blockquote><p><em>AWS Free Usage Tier</em><br />
<a href="http://aws.amazon.com/free/">http://aws.amazon.com/free/</a></p></blockquote>
<p>This won’t cover the EC2 CPU time (that’s Linux only), but it will cover storage, bandwidth, S3 snapshots, etc. You also get a free Linux machine to play with if you like.</p>
<p><strong>Setting up Windows in the Cloud</strong></p>
<p>OK, so if you’re chosen an instance type and are ready to start, you should do the EC2 walk-through I put together here to get your machine up and running and login for the first time.</p>
<blockquote><p><em>Building Windows Machines in Amazon EC2</em><br />
<a href="http://www.michaelckennedy.net/blog/2010/01/31/BuildingWindowsMachinesInAmazonEC2.aspx">http://www.michaelckennedy.net/blog/2010/01/31/BuildingWindowsMachinesInAmazonEC2.aspx</a></p></blockquote>
<p>I’d guess that takes about 15 minutes. When you’re done, come back here&#8230;</p>
<p><strong>Installing Software in EC2 and Windows</strong></p>
<p>So you’ve logged in and you want to install Visual Studio, SQL Server, and other MSDN goodies. The easiest way to get them is to use the ISO DVD images from the MSDN download site. In order to mount them on your EC2 machine (which has no DVD drive), you should install</p>
<blockquote><p><em>Virtual CloneDrive</em><br />
<a href="http://www.slysoft.com/en/virtual-clonedrive.html">http://www.slysoft.com/en/virtual-clonedrive.html</a></p></blockquote>
<p>which lets you mount ISO images as if they were proper DVD drives. Then you can download and install all the MSDN files you need. A good place to start is with Visual Studio:</p>
<blockquote><p><em>Microsoft Visual Studio 2010 Premium Trial &#8211; ISO</em><br />
<a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f81412a2-d48e-4040-9b32-27eaf771c5db&amp;displaylang=en">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=f81412a2-d48e-4040-9b32-27eaf771c5db&amp;displaylang=en</a></p></blockquote>
<p>One word of warning here: I’ve noticed that Chrome can freak out and fail to download very large files inside your EC2 instance. Don’t know why, but it does. So be sure to use IE or Firefox to do the downloads for the ISOs.</p>
<p><strong>Syncing your Files Between your Local Machine and Dev EC2 Machine</strong></p>
<p>There are two techniques we can use to sync files, depending on what category of files we’re sharing and how. For the source files, you can always setup an SVN Server (that’s what my micro instance is about). I’m a fan of Visual SVN. It’s free and easy to setup and admin.</p>
<blockquote><p><em>VISUALSVN SERVER</em><br />
<a href="http://www.visualsvn.com/server/">http://www.visualsvn.com/server/</a></p></blockquote>
<p>Then on your EC2 dev machine (and your others you may have) setup:</p>
<blockquote><p><em>TortoiseSVN</em><br />
<a href="http://tortoisesvn.net/">http://tortoisesvn.net/</a></p></blockquote>
<p>and</p>
<blockquote><p><em>AnkhSVN for Visual Studio Integration</em><br />
<a href="http://ankhsvn.open.collab.net/">http://ankhsvn.open.collab.net/</a></p></blockquote>
<p>Then you have super easy, reliable, and secure sharing of your source files.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/svn-sync.png" alt="" border="0" /></p>
<p>For everything else, you can just setup a Dropbox share between your Cloud OS and you EC2 Dev Machine:</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/dropbox-logo.png" alt="" border="0" /></p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/dropbox-synced.png" alt="" border="0" /></p>
<p>If you don’t have Dropbox and want to try it, use this link to create an account</p>
<blockquote><p><a href="http://db.tt/Qo7m9PA">http://db.tt/Qo7m9PA</a></p></blockquote>
<p>and you’ll get me some extra free space which I always appreciate. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Then if you have a file on your local computer you want accessible on your cloud dev machine, just drop it in your Dropbox folder on the originating computer and it’ll be there as soon as it uploads.</p>
<p><strong>Waste Not, Want Not</strong></p>
<p>Now here is a problem you will encounter:</p>
<p>You’re working on your dev machine in EC2, something comes up and you get distracted and forget about it for the rest of the day. When you come back the next day you see your EC2 system is still running and you’ve wasted $12 by leaving it running idle overnight. That sucks. If it happens on Friday, it might run the whole weekend which is even worse.</p>
<p>To avoid this, I wrote a little tray utility that watches for extended idle times and will shutdown your EC2 instance if it’s idle for too long.<br />
<img src="http://www.michaelckennedy.net/blog/content/binary/Shutdown.png" alt="" border="0" /></p>
<p>Below is how you configure it. Simple, right?</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/Shutdown-options.png" alt="" border="0" /><br />
Add it to your startup menu to make sure it starts when you log in.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/shutdown-start-menu.png" alt="" border="0" /></p>
<p>You can download it here. I may blog about this app in greater detail later, for now feel free to use it.</p>
<blockquote><p><em>Shutdown on Idle</em><br />
<a href="http://www.michaelckennedy.com/Downloads/Tools/ShutdownAfterIdle.zip">http://www.michaelckennedy.com/Downloads/Tools/ShutdownAfterIdle.zip</a></p></blockquote>
<p><strong>Reliable Access to EC2</strong></p>
<p>One annoyance in EC2 is that every time you turn off your EC2 computer, it will take on a new random public DNS name. If you really want to access to your EC2 machine from anywhere, you probably want a reliable DNS name / IP address. That’s where Elastic IPs come into play in EC2:</p>
<blockquote><p><em>Feature Guide: Amazon EC2 Elastic IP Addresses</em><br />
<a href="http://aws.amazon.com/articles/1346">http://aws.amazon.com/articles/1346</a></p></blockquote>
<p>If you create an elastic IP, then you can map it to a sub-domain in your domain and always use that. For example I could register it for <span style="color:#0000ff;">cloud-developer.michaelckennedy.net</span>. Then as long as I have a way to start my machine and re-associate the IP, all my config on my various machines (such as remembered RDP settings and passwords and such) will “stick”.</p>
<p>Be aware that while your EC2 machine is off, you’ll be charged a small fee (few dollars / month) for the address. You can decide whether it’s worth the trouble to save the few dollars.</p>
<p><strong>Mobile / iPad Access</strong></p>
<p>I’m sure when you think of accessing your EC2 dev machines, you’re thinking of doing that form Windows or maybe a Mac (using  <a href="http://www.microsoft.com/mac/remote-desktop-client">http://www.microsoft.com/mac/remote-desktop-client</a>). But the iPad (and even the iPhone) has apps to allow you to use Remote Desktop to EC2. For example, here’s editing the code for <a href="http://chatpast.com">http://chatpast.com</a> in Visual Studio via my iPad:</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/Visual-Studio-On-iPad.png"><img src="http://www.michaelckennedy.net/blog/content/binary/Visual-Studio-On-iPad-thumb.png" alt="" border="0" /></a><br />
(click for full size image)</p>
<p>And you can even bring up the keyboard or attach a Bluetooth keyboard.</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/Visual-Studio-On-iPad-keyboard.png"><img src="http://www.michaelckennedy.net/blog/content/binary/Visual-Studio-On-iPad-keyboard-thumb.png" alt="" border="0" /></a><br />
(click for full size image)</p>
<p>The app I was using is called “Jump”, and you can find it here:</p>
<blockquote><p><em>Jump for iPad</em><br />
<a href="http://jumpdesktop.com/">http://jumpdesktop.com/</a></p></blockquote>
<p><strong>Summary</strong></p>
<p>I hope that gives you some inspiration to try a new way to work in the cloud. You saw that we can create fairly serious EC2 Windows computers which can serve as developer workstations. We can share files via source control and Dropbox and we can access the computers from Windows, from Macs, and even mobile devices like an iPad.</p>
<p>Good luck!<br />
<a href="http://twitter.com/mkennedy">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/cloud/'>Cloud</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/articles/'>Articles</a>, <a href='http://blog.michaelckennedy.net/tag/cloud/'>Cloud</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=39&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2011/06/13/building-a-cloud-os-for-net-developers-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/svn-sync.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/dropbox-logo.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/dropbox-synced.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/Shutdown.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/Shutdown-options.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/shutdown-start-menu.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/Visual-Studio-On-iPad-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/Visual-Studio-On-iPad-keyboard-thumb.png" medium="image" />
	</item>
		<item>
		<title>Building a Cloud OS for .NET Developers &#8211; Part 1</title>
		<link>http://blog.michaelckennedy.net/2011/05/25/building-a-cloud-os-for-net-developers-part-1/</link>
		<comments>http://blog.michaelckennedy.net/2011/05/25/building-a-cloud-os-for-net-developers-part-1/#comments</comments>
		<pubDate>Wed, 25 May 2011 18:43:44 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://michaelckennedy.wordpress.com/?p=43</guid>
		<description><![CDATA[[Update: Read Part 2...] Let’s talk about cloud operating systems. This article explores the options and potential of moving entirely “To The Cloud” for developers who normally demand significant offline power from their applications (IDEs, compilers, debuggers, etc). We’ll focus &#8230; <a href="http://blog.michaelckennedy.net/2011/05/25/building-a-cloud-os-for-net-developers-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=43&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[Update: <a href="2011/06/13/BuildingACloudOSForNETDevelopersPart2.aspx">Read Part 2...</a>]</p>
<p>Let’s talk about cloud operating systems. This article explores the options and potential of moving entirely “To The Cloud” for developers who normally demand significant offline power from their applications (IDEs, compilers, debuggers, etc). We’ll focus on .NET / Visual Studio developers, but I’m sure you can adapt this to your technology of choice.</p>
<p>I’ve been fascinated with what Google is doing with Chrome OS. I think finding a way to fully “live in the cloud” has a lot of promise. However, in practice Chrome OS is entirely unappealing to me. It’s just a single browser window, maximized. Yuck. I don’t mind doing most things in the browser, but I’d like multiple non-maximized browser windows and a desktop to organize things like shortcuts. That’s OK though because Chromebooks aren’t the only option. We have decent operating systems right now that can function largely in the same way if we set them up with discipline.</p>
<p><span id="more-43"></span></p>
<p>What we’re going to do is take a pristine Windows 7 instance and deck it out for the cloud. Even with all the choices these days, Windows 7 is still my favorite OS. I do have a Mac, several iOS devices, and I could always install Linux. Nevertheless, it’s Windows 7 for me so that’s where we’ll start.</p>
<p><strong>Creating a Fresh Windows 7 Instance &#8211; Gently</strong></p>
<p>I want to start from the very beginning. I don’t want old apps I’ve already installed encouraging me to “cheat” and work outside of the cloud more than necessary. At the same time I need to be able to fire up Visual Studio and do some work with an unreliable or nonexistent Internet connection So I’m keeping my current “full” Windows system intact. We’ll install a secondary instance of Windows using the awesome Boot to VHD feature in Windows 7 Ultimate. If you haven’t heard of it, I did a video walk-through here:</p>
<p><em>   Boot to VHD Screencast:</em><br />
<em>   </em><a href="http://www.michaelckennedy.net/blog/2009/10/20/BootToVHDScreencast.aspx">http://www.michaelckennedy.net/blog/2009/10/20/BootToVHDScreencast.aspx</a></p>
<p>Scott Hanselman’s write up is very helpful too.</p>
<p><em>   </em><em>Less Virtual, More Machine &#8211; Windows 7 and the magic of Boot to VHD</em>:<br />
<em>   </em><a href="http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx">http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx</a></p>
<p>This process takes about 15 minutes. Once you’ve got everything setup, I recommend you activate and then snapshot that VHD file (from your main OS) so you can always get back to “clean”. If you’re really living the cloud lifestyle, than paving your system is much easier than before. I always keep a secondary partition around for data files anyway so that can be shared across OSes.</p>
<p>Now that you’ve got a truly fresh Windows 7 copy, it’s time to install just a few apps needed to set you free (and a few you’d rather not live without).</p>
<p><strong>Installing “The Cloud”</strong></p>
<p>While your fresh copy of Windows 7 does have IE 8 installed, that browser is entirely not up to the task of being where you spend 90% of your time. I strongly encourage you to give the latest Chrome beta a shot as your main browser. The “application shortcuts” feature of Chrome makes it much more immersive than anything IE 9 or FireFox 4 are doing (yes, I know they have pinned sites, that’s not even close).</p>
<p><em>   </em><em>Chrome Beta</em><em><br />
</em><a href="http://www.google.com/intl/en/landing/chrome/beta/">http://www.google.com/intl/en/landing/chrome/beta/</a></p>
<p>Got Chrome installed and set as your default browser? Good. Don’t forget to install all your Windows updates and Windows 7 SP1 while you’re at it.</p>
<p><strong>What about Visual Studio? </strong></p>
<p>You may be thinking, “I *<strong>NEED</strong>* Visual Studio 2010”. Yes, we do need it for sure, but stick with me here. We are NOT installing that beast on our fresh Windows 7 system. Remember, this is your Cloud OS. I even named mine Cloud OS in my boot loader to keep that focused in my mind.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/WindowsBoot.JPG" alt="" width="425" border="0" /></p>
<p>We’ll talk about Visual Studio soon.</p>
<p><strong><em>Installing </em>Your Web Applications</strong></p>
<p>You may think that you do not need to install your <span style="text-decoration:line-through;">web apps</span> cloud apps. There are a few installers we’ll be running such as DropBox and ChatPast, but even the plain vanilla websites such as GMail are better if you install them. That’s why Chrome is way better than the other browsers.</p>
<p>Let’s suppose you’ll want to use Google Docs to work with documents, presentations, Excel worksheets and so on (you will want this!). Visit <a href="https://docs.google.com">https://docs.google.com</a>, then choose “Create application shortcut” in Chrome (see image):</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/ToAppShortcut.png" alt="" width="425" border="0" /></p>
<p>This not only gives you start menu items and desktop shortcuts, but it makes your taskbar truly useful and your web apps behave as regular Windows apps.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/AsApp.png" alt="" border="0" /></p>
<p>In addition, you get the true feel of your websites being applications without all the browser toolbars and other junk around it. For example, here’s how this article (barely written) looks in Google Docs right now. Notice, how it looks like an app rather than a tab buried in a busy browser. It remembers its window size and position. In short, it’s more application-like.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/GoogleDocsApp.png" alt="" width="450" border="0" /></p>
<p><strong>What Cloud Apps Should I Install?</strong></p>
<p>OK, so I hope I convinced you that treating your web apps as true applications is worthwhile. Now which ones do I install? Here are a few I recommend. You may have your own favorite sites. We’ll also need a few apps that do cloudy stuff but run MSI installers on our system.</p>
<p><strong>- GMail</strong>: <a href="https://mail.google.com/">https://mail.google.com/</a> (obviously <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )<br />
<strong>- Google Docs</strong>: <a href="https://docs.google.com">https://docs.google.com</a> (good Microsoft Office replacement)<br />
<strong>- Google Calendar</strong>: <a href="https://www.google.com/calendar/">https://www.google.com/calendar/</a><br />
<strong>- Google Contacts</strong>: <a href="http://mail.google.com/mail/contacts/u/0/ui/ContactManager">http://mail.google.com/mail/contacts/u/0/ui/ContactManager</a><br />
<strong>- 37 Signals LaunchPad</strong>: <a href="https://launchpad.37signals.com">https://launchpad.37signals.com</a> (Great web apps for projects)<br />
<strong>- Amazon Web Service</strong>: <a href="https://console.aws.amazon.com/ec2/">https://console.aws.amazon.com/ec2/</a> (You’ll see why soon)<br />
<strong>- Twitter</strong>: <a href="http://twitter.com/">http://twitter.com/</a><br />
<strong>- Office Online</strong>: <a href="http://office.live.com">http://office.live.com</a> (for when Google docs fail you)<br />
<strong>- Pandora</strong>: <a href="http://www.pandora.com/">http://www.pandora.com/</a></p>
<p>Here are a few proper apps that are cloud-based in some way or another that require installers.</p>
<p><strong>- Skype </strong>(obviously <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="http://www.skype.com">http://www.skype.com</a><br />
<strong>- DropBox</strong>: <a href="https://www.dropbox.com">https://www.dropbox.com</a><br />
<strong>- ChatPast Sync Client</strong>: <a href="https://chatpast.com/">https://chatpast.com/</a></p>
<p>By using GMail, Google Contacts, and Google Calendar, you obviously get portability from the web. But if you have a modern phone or tablet, chances are you can keep them 100% in sync using Google’s Exchange support. I do that for both my iPhone and iPad.</p>
<p>There are also a couple of light-weight apps that I just didn’t want to do without and still have a solid use in a Cloud OS. I needed a good image editing app (for writing blog posts like this) and one for screen captures. So we have<br />
<strong><br />
- Paint.NET</strong>: <a href="http://download.cnet.com/Paint-NET/3000-2192_4-10338146.html">http://download.cnet.com/Paint-NET/3000-2192_4-10338146.html</a><br />
<strong>- Window Clippings</strong>: <a href="http://www.windowclippings.com/">http://www.windowclippings.com/</a></p>
<p>Finally, there are a couple that I use to just keep an eye on my system such as</p>
<p><strong>- Process Explorer</strong>: <a href="http://technet.microsoft.com/en-us/sysinternals/bb896653">http://technet.microsoft.com/en-us/sysinternals/bb896653</a></p>
<p>Here is the full list of *everything* I have installed on my system. Just 11 applications installed. Note that I’ve hidden some that Windows installs without asking. For example, using my Microsoft Mouse forces an install of Microsoft’s Intellipoint software when I plug it in. Similarly for the touch-pad on my laptop. To me, those don’t count so I edited them out.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/OptionalInstalls.png" alt="" width="425" border="0" /></p>
<p><strong>Escape from Outlook</strong></p>
<p>You may be thinking that because you still use your company’s email that you’ll need to install Microsoft Office and the 800-lbs gorilla that is Outlook. Chances are you will not need Outlook. I have several “regular” email accounts I have to check that don’t have reasonable web options.</p>
<p>You can setup your GMail account to automatically pull from your other email accounts as if GMail itself was a POP3 client like Outlook. Just go to Gmail &gt; Settings &gt;  Accounts and Import &gt; and configure “Check mail using POP3” as well as “Send mail as”. Here you see my other accounts have recently been checked and received mail.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/GMailToOtherAccounts.png" alt="" width="425" border="0" /></p>
<p>Sometimes having a “Send and Receive” button for these accounts is handy. Visit the Labs section of GMail and install the “Refresh POP accounts” add-on to make the refresh button propagate a refresh off to your other accounts as well.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/mod_poprefresh.png" alt="" border="0" /><br />
While you are in there, you should turn on the keyboard shortcuts and take 5 minutes to learn the important ones. For example, <strong>/</strong> will take you to search, <strong>i</strong> to the inbox, <strong>e</strong> archives, <strong>-c</strong> composes an email in a separate window, etc.</p>
<p><strong>Where Are the Developer Tools?</strong></p>
<p>You probably didn’t see Visual Studio in that list, because it wasn’t there! In the next blog post, I’ll take you through setting up an Visual Studio 2010 instance in the cloud along with all the other developer tools and servers you might need such as SQL Server, and MongoDB, and LINQPad, and so on. Stay tuned.</p>
<p>When I have that post online, I’ll be sure to add a link here. If you just can’t wait, here’s a <a href="http://aws.amazon.com/ec2/">hint</a> of where we&#8217;re going next.</p>
<p>[Update: <a href="http://www.michaelckennedy.net/blog/2011/06/13/BuildingACloudOSForNETDevelopersPart2.aspx">Read Part 2 Now</a>]</p>
<p>Good luck!<br />
<a href="http://twitter.com/#%21/mkennedy">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/cloud/'>Cloud</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/articles/'>Articles</a>, <a href='http://blog.michaelckennedy.net/tag/cloud/'>Cloud</a>, <a href='http://blog.michaelckennedy.net/tag/tools/'>Tools</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=43&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2011/05/25/building-a-cloud-os-for-net-developers-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsBoot.JPG" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/ToAppShortcut.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AsApp.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/GoogleDocsApp.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/OptionalInstalls.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/GMailToOtherAccounts.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/mod_poprefresh.png" medium="image" />
	</item>
		<item>
		<title>Getting Things Done with Backpack and 37Signals</title>
		<link>http://blog.michaelckennedy.net/2011/01/30/getting-things-done-with-backpack-and-37signals/</link>
		<comments>http://blog.michaelckennedy.net/2011/01/30/getting-things-done-with-backpack-and-37signals/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 18:52:59 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://michaelckennedy.wordpress.com/?p=45</guid>
		<description><![CDATA[[Note: You can download this post as a PDF.] Here&#8217;s an article about Getting Things Done and how I use Backpack from 37Signals to make it happen. I&#8217;ve recently taken on some roles where I have a lot more loose-ends in my life and &#8230; <a href="http://blog.michaelckennedy.net/2011/01/30/getting-things-done-with-backpack-and-37signals/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=45&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[Note: You can <a href="http://www.michaelckennedy.com/Downloads/Getting-Things-Done-with-Backpack-and-37Signals.pdf" target="_blank">download this post as a PDF</a>.]</p>
<p>Here&#8217;s an article about <a href="http://www.amazon.com/dp/0142000280?tag=michackennesw-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=0142000280&amp;adid=0G5G4M8QJSSA6FYHG25M" target="_blank">Getting Things Done</a> and how I use <a href="http://backpackit.com/" target="_blank">Backpack</a> from <a href="http://37Signals.com/" target="_blank">37Signals</a> to make it happen.</p>
<p>I&#8217;ve recently taken on some roles where I have a lot more loose-ends in my life and adopting Getting Things Done (GTD) has really helped manage everything. I&#8217;m also a huge fan of the <a href="http://37Signals.com/" target="_blank">37Signals</a> suite of products (<a href="http://backpackit.com" target="_blank">Backpack</a>, <a href="http://basecamphq.com" target="_blank">Basecamp</a>, etc). That should be obvious from what we&#8217;re doing over at <a href="http://chatpast.com" target="_blank">ChatPast</a> with integrating instant messaging and <a href="http://37Signals.com/" target="_blank">37Signals</a> applications.</p>
<p>So using <a href="http://37Signals.com/" target="_blank">37Signals</a> to implement Getting Things Done (GTD) was the obvious choice for me. After looking at both <a href="http://backpackit.com" target="_blank">Backpack</a> and <a href="http://basecamphq.com" target="_blank">Basecamp</a>, it seems that <a href="http://backpackit.com" target="_blank">Backpack</a> is the clear winner for implementing GTD. You&#8217;ll see why shortly.</p>
<p>There have been some articles already written about Backpack + GTD. Brett Kelly wrote a nice one over at <a href="http://blog.crankingwidgets.com/2008/04/28/backpack-gtd-2/" target="_blank">Getting Things Done with 37signals’ Backpack – Why I’m Switching Back</a>. However, while this was helpful in showing me that I *could* implement GTD in Backpack, it didn&#8217;t show me how to do it.</p>
<p>How should I organize my pages? Do I use reminders, the calendar, both or neither? There will be TODO lists, but how do I correlate them to my actual work? What about check lists? Can I have templates for repeated ones? Answering these questions is the purpose of this article.</p>
<h3><strong>A Step-by-step guide to implementing GTD in Backpack</strong></h3>
<p>In this article we&#8217;ll look at the major pieces of GTD and how to fit them into Backpack.</p>
<p><span id="more-45"></span></p>
<table>
<tbody>
<tr>
<td>
<ol>
<li>Inboxes &#8211; not just email, but all of them (there are many)</li>
<li>Check Lists</li>
<li>The Next Action List</li>
<li>&#8220;Open-Loops&#8221; (Projects in GTD parlance &#8211; not to be confused with Basecamp projects)</li>
<li>Reminders &#8211; Actions with Dates</li>
<li>Waiting-For Lists</li>
<li>Reference Material</li>
<li>Taking it with you</li>
<li>What about <a href="http://basecamphq.com" target="_blank">Basecamp</a>?</li>
</ol>
</td>
</tr>
</tbody>
</table>
<h3><strong>First, A Quick Review on GTD</strong></h3>
<p>I&#8217;m not going to give you full summary of GTD. If you haven&#8217;t started using GTD yet, I recommend that you <a href="http://www.amazon.com/dp/0142000280?tag=michackennesw-20&amp;camp=213381&amp;creative=390973&amp;linkCode=as4&amp;creativeASIN=0142000280&amp;adid=0G5G4M8QJSSA6FYHG25M" target="_blank">read the book</a>. Don&#8217;t like reading? Listen to Scott Hanselman <a href="http://hanselminutes.com/default.aspx?showID=253" target="_blank">interview Lane Newsom</a> about it or watch David Allen <a href="http://www.youtube.com/watch?v=Qo7vUdKTlhk" target="_blank">speak about it at Google</a>.</p>
<p>Here&#8217;s enough to start seeing GTD manifest itself in Backpack. First a definition, what is<br />
Getting Things Done:</p>
<p style="padding-left:40px;padding-right:40px;font-style:italic;font-size:1.2em;"><span style="font-size:1.2em;">GTD is a work / life management technique which encourages you to</span><span style="font-size:1.2em;"> </span><span style="font-size:1.2em;">make sure you have absolutely zero open items and actions that you are</span><span style="font-size:1.2em;"> </span><span style="font-size:1.2em;">tracking in your head. You get everything that you are working on or waiting for</span><span style="font-size:1.2em;"> </span><span style="font-size:1.2em;">written down. This frees your mind to be fully &#8220;in the moment&#8221; and</span><span style="font-size:1.2em;"> </span><span style="font-size:1.2em;">focused on what you chose to do now as well as keeps you from forgetting anything</span> <span style="font-size:1.2em;">you committed to doing.</span></p>
<p><strong>At the heart of GTD is this decision-tree model:</strong><br />
<img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/getting_things_done.png" alt="" /></p>
<p>[image credit <a href="http://www.darkcoding.net/society/get-it-done/" target="_blank">Graham King</a>]</p>
<p>In our GTD in Backpack world, the 8 items ringing the workflow will mostly land in Backpack. The &#8220;Do It&#8221; one just gets done and saved nowhere &#8211; although I sometimes track these just for my personal record.</p>
<h3><strong>GTD in Backpack &#8211; The Basic Layout</strong></h3>
<p>In Backpack, I have 5 pages dedicated to GTD, which is convenient because as you see, you get 5 for free. (note: if you aren&#8217;t familiar with Backpack yet, watch these<br />
<a href="http://backpackit.com/tour" target="_blank">short videos</a> before going on.)<br />
<img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-pages.png" alt="" /><br />
You can see that each page corresponded to a major component of GTD. They are further partitioned inside each page &#8211; more on that below.</p>
<h3><strong>1. Inboxes</strong></h3>
<p>With inboxes, I&#8217;m not talking about just your email inbox &#8211; although that&#8217;s probably the biggest one for most people. GTD inboxes represent places that stuff that is new shows up and is waiting to be processed through the decision-tree model above. I think you&#8217;d be surprised to see how many inboxes you truly have if you took a full</p>
<p>account of them. GTD encourages you to do this for all sorts of things &#8211; take a full account and get them out of your mind.</p>
<p>That&#8217;s one of the great uses of check lists in GTD + Backpack.</p>
<h3><strong>2. Check Lists</strong></h3>
<p>A check list is any set of steps you need to remember. Sometimes it&#8217;s for one-off situations, others it&#8217;s repeating. Processing all the new stuff in your varied inboxes is a repetitive action. So I made a check list for that. Check lists, as you can see below, are TODO lists in backpack. When they are repeated, I make a template like the actual list but with the title prefix [template]. Then I make a copy to &#8220;do&#8221; the check list each time.</p>
<p>Here is the check list I use several times a week to make sure that I don&#8217;t forget to &#8220;process&#8221; one of my inboxes, which then feeds the other 8 types of containers ringing the workflow diagram.<br />
<img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-checklists-processing-in.png" alt="" /></p>
<p>You would see a very similar looking TODO list at the bottom of the [GTD] Check Lists page with the title &#8216;[template] Processing &#8220;in&#8221; Checklist&#8217;.</p>
<h3><strong>3. Next Action Lists</strong></h3>
<p>The Next Action Lists are pretty straight forward. As you saw above, there is a page entitled &#8220;[GTD] Next Actions&#8221;. Here I track my next action for each item or project I have open. Again the page is partition internally:</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-next-action.png" alt="" /></p>
<p>Notice that I have a personal and business one (actually several). One rule of GTD is that if your home life is a mess, it&#8217;ll affect your business life and visa versa. So manage it all here. Note also that you can add comments and attach files to the items to track additional info you might need.</p>
<p>If the next action came from an ongoing project (see below), then I&#8217;ve tried to put the name of the project as a prefix, for example <strong>House:</strong> in my personal items.</p>
<p>Finally, you&#8217;ll see that I don&#8217;t use the GTD contexts as most people might. In my world there is so much overlap for the contexts that they become meaningless. Traditional contexts might include calls, at computer, errands, at office, at home, agendas, read / review. However, I work at home with internet always on and a computer at my desk. I also do reading here. So those contexts basically all mean the same thing and thus I don&#8217;t use them.</p>
<h3><strong>4. Projects</strong></h3>
<p>As you saw in the basic structure, projects get their own page (internally partitioned). Thus I have a page entitled &#8216;[GTD] Projects&#8217;. This one is pretty simple. I keep track of all the &#8216;open-loops&#8217; that require 2 or more actions to complete. Each one gets its own TODO list within Backpack and those lists are partitioned by work and personal.</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-projects.png" alt="" /></p>
<h3><strong>5. Reminders</strong></h3>
<p>By far, the biggest GTD &#8220;bang for the buck&#8221; that you get from Backpack come in the form of reminders. However, their effect takes some exploring to see their full potential. First, let&#8217;s look at the reminders I have upcoming. Usually I have more than this, but they seem to have thinned out for the weekend.</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-reminders.png" alt="" /></p>
<p>In my reminders, you&#8217;ll see I need to finalize the home inspection details for a house I&#8217;m buying on Feb 4th. By putting it into my reminders, I can rest assured that I&#8217;ll remember it on the day that I can do something about it.</p>
<p>What about calendars? I make extremely heavy use of calendars for GTD. But not within Backpack. I use Google calendar, which then I sync to Outlook, my iPhone, my iPad, and I can also access via the web. If this had been an appointment, I would have skipped the reminders and just put it on my calendar. But it&#8217;s an action with a date, so it goes in the reminders.</p>
<h3><strong>Getting Notified of Reminders</strong></h3>
<p>The first place to leverage reminders is to have them show up as text messages on your phone. To do this, go to &#8220;My Info&#8221; in backpack, in the section &#8220;Mobile phone reminders&#8221;, check the checkbox for &#8220;Send text message reminders to my mobile phone&#8221;.</p>
<p>Next, you&#8217;ll want to see these reminders in your calendar (but not as appointments!).<br />
That&#8217;s where the crazy URL starting with iCalendar:     webcal://domain.backpackit.com/ical/&#8230;<br />
comes in. You can subscribe to this in Outlook or, as in my case, in Google calendar.</p>
<p>In my calendar, then have all these actions + dates show up alongside my day.</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/google-calendar.png" alt="" /></p>
<p>I think I had to replace &#8216;webcal:&#8217; with &#8216;http:&#8217; in order to add this to Google Calendar though.</p>
<h3><strong>6. Waiting-For Lists</strong></h3>
<p>Waiting lists are for situations where I know I&#8217;ll need to follow up on something but no necessarily by any particular date &#8211; in that case a reminder doesn&#8217;t make sense for me. But several times a week, I&#8217;ll scan the list and close those loops if they other person hasn&#8217;t responded by then. Here&#8217;s how that looks in Backpack:</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-waiting-for.png" alt="" /></p>
<p>Note that the dates I manually typed in are not the due dates. They are the creation dates (Backpack doesn&#8217;t track this). So I know how long I&#8217;ve been waiting.</p>
<h3><strong>7. Reference Material</strong></h3>
<p>One of the huge advantages that Basecamp has over other systems that are just simple TODO lists is the ability to attach rich reference material and additional information to the TODO item that represents a next action, or waiting item, and so on.</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-todo-comment.png" alt="" /></p>
<p>You can add comments to any TODO item. For basic information, this can be simple text. For example, if you needed to renew your insurance, you could attach the phone number and policy number to the TODO item so you don&#8217;t have to look it up.</p>
<p>For non-textual information, you can also attach files (pictures, word docs, whatever) to the TODO item. Note that file attachments are a paid feature, so you can&#8217;t use this option<br />
if you&#8217;re on the free version of Backpack.</p>
<h3><strong>8. Taking it with you</strong></h3>
<p>One of the key tenants of GTD is that you should have your info with you nearly all the time. You might be thinking that using Backpack means you will only be able to get to it when you&#8217;re on the web.</p>
<p>If you have an iPhone, iPad (or even iPod touch), you can always have an offline copy available using an app called Satchel found in the <a href="http://backpackit.com/extras" target="_blank">Extras section</a>.</p>
<p>Here&#8217;s a few screenshots from the <strong>iPhone</strong>:</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-iphone-launch.png" alt="" /><br />
<img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-iphone-checklist-full.png" alt="" /></p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-iphone-checklist-open.png" alt="" /></p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-iphone-reminders.png" alt="" /></p>
<p>Here&#8217;s a few screenshots from the <strong>iPad</strong> (click to enlarge):</p>
<p><a href="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-checklist-full.jpg" target="_blank"><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-checklist-full-thumb.png" alt="" /></a></p>
<p><a href="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-checklist-open.jpg" target="_blank"><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-checklist-open-thumb.png" alt="" /></a></p>
<p><a href="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-reminders.jpg" target="_blank"><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-reminders-thumb.png" alt="" /></a></p>
<h3><strong>9. What about <a href="http://basecamphq.com" target="_blank">Basecamp</a>?</strong></h3>
<p>Some projects are either shared by a team of people or are truly massive with many steps, artifacts, milestones, and files. These projects are better managed outside of Backpack. In that case I use the paid version of Basecamp and simply add a note to the project entry page as you can see here.</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-project-managed-in-basecamp.png" alt="" /></p>
<h3><strong>Conclusion</strong></h3>
<p>If you&#8217;ve been thinking of using Backpack for GTD, I hope this has given you something to work with. I certainly don&#8217;t promise to be a GTD expert. But this setup works well for me and I think it will for you too.</p>
<p>Thanks!<br />
<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/articles/'>Articles</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=45&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2011/01/30/getting-things-done-with-backpack-and-37signals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/getting_things_done.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-pages.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-checklists-processing-in.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-next-action.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-projects.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-reminders.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/google-calendar.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-waiting-for.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-todo-comment.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-iphone-launch.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-iphone-checklist-full.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-iphone-checklist-open.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-iphone-reminders.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-checklist-full-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-checklist-open-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/satchel-ipad-reminders-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/GTD/backpack-project-managed-in-basecamp.png" medium="image" />
	</item>
		<item>
		<title>11 Killer Open Source Projects I Found with NuGet</title>
		<link>http://blog.michaelckennedy.net/2011/01/19/11-killer-open-source-projects-i-found-with-nuget/</link>
		<comments>http://blog.michaelckennedy.net/2011/01/19/11-killer-open-source-projects-i-found-with-nuget/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 20:51:51 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://michaelckennedy.wordpress.com/?p=58</guid>
		<description><![CDATA[So maybe I&#8217;m late to the party, but I recently started playing with NuGet. It&#8217;s a killer new way to find, install, maintain, and manage references to open source libraries in Visual Studio 2010. Plenty of people have written about it (Phil Haack &#8230; <a href="http://blog.michaelckennedy.net/2011/01/19/11-killer-open-source-projects-i-found-with-nuget/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=58&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So maybe I&#8217;m late to the party, but I recently started playing with <a href="http://nuget.org/" target="_blank">NuGet</a>. It&#8217;s a killer new way to find, install, maintain, and manage references to open source libraries in Visual Studio 2010. Plenty of people have written about it (<a href="http://haacked.com/tags/NuGet/default.aspx" target="_blank">Phil Haack</a> and  <a href="http://www.hanselman.com/blog/CategoryView.aspx?category=NuGet">Scott Hanselman</a> for example). Let&#8217;s just say you should learn about NuGet if you don&#8217;t know it already.</p>
<p>What I want to talk about is all the cool open source projects I found just by flipping through the pages of the NuGet directory in the Visual Studio &#8220;Add Library Package Reference&#8221; dialog.</p>
<p><span id="more-58"></span></p>
<p><span style="font-size:x-large;">1</span>. RazorEngine at  <a href="http://razorengine.codeplex.com/" target="_blank">http://razorengine.codeplex.com/</a></p>
<p>RazorEngine is templating engine built upon Microsoft&#8217;s Razor parsing technology. The Razor Templating Engine allows you to use Razor syntax to build robust templates No need to learn a custom clunky API for generating things like HTML and emails and so on. Just use the hot new @Razor syntax from ASP.NET MVC 3.</p>
<p><span style="font-size:x-large;">2</span>. YUI Compressor for .Net at <a href="http://yuicompressor.codeplex.com/" target="_blank">http://yuicompressor.codeplex.com/</a></p>
<p>YUI Compressor for .Net is is a .NET port of the Yahoo! UI Library&#8217;s YUI Compressor Java project. Do you have a bunch of CSS and JavaScript files and you want your page to load faster. This is a great way to do it from ASP.NET.</p>
<p><span style="font-size:x-large;">3</span>. 51degrees.mobi at <a href="http://51degrees.codeplex.com/" target="_blank">http://51degrees.codeplex.com/</a></p>
<p>Want to build an ASP.NET MVC website that has both a desktop and mobile version from the same project? 51degrees.mobi Foundation is an ASP.NET open source module which detects mobile devices and browsers, enhancing the information available to ASP.NET. Mobile handsets can optionally be redirected to a home page designed for mobile phones. Smart phone and feature phones are all supported.</p>
<p><span style="font-size:x-large;">4</span>. Lucene.Net at  <a href="http://lucene.apache.org/lucene.net/" target="_blank">http://lucene.apache.org/lucene.net/</a></p>
<p>Lucene.Net is a source code, class-per-class, API-per-API and algorithmatic port of the Java Lucene search engine to the C# and .NET platform utilizing Microsoft .NET Framework. Want indexed full-text search from .NET? Here you go.</p>
<p><span style="font-size:x-large;">5</span>. MvcMailer at  <a href="http://www.codeproject.com/KB/aspnet/MvcMailerNuGet.aspx" target="_blank">http://www.codeproject.com/KB/aspnet/MvcMailerNuGet.aspx</a></p>
<p>Send a professional looking HTML email from your ASP.NET MVC simply by pointing at a particular view.</p>
<p><span style="font-size:x-large;">6</span>. DotNetZip at <a href="http://dotnetzip.codeplex.com/" target="_blank">http://dotnetzip.codeplex.com/</a></p>
<p>DotNetZip is an easy-to-use, FAST, FREE class library and toolset for manipulating zip files or folders. Zip and Unzip is easy: with DotNetZip, .NET applications written in VB, C# &#8211; any .NET language &#8211; can easily create, read, extract, or update zip files. For Mono or MS .NET.</p>
<p><span style="font-size:x-large;">7</span>. FileDB at <a href="http://filedb.codeplex.com/" target="_blank">http://filedb.codeplex.com/</a></p>
<p>Ever wanted to have a single, simple file that you can access as a basic database without the fuss? FileDB is a free, fast, lightweight C# (v3.5) DLL project to store, retrieve and delete files using a single archive file as a container on disk. It&#8217;s ideal for storing files (all kind, all sizes) without databases and keeping them organized on a single disk file.</p>
<p><span style="font-size:x-large;">8</span>. Chargify.NET at <a href="http://chargify.codeplex.com/" target="_blank">http://chargify.codeplex.com/</a></p>
<p>If you need to do recurring billing, like I need to over at  <a href="http://chatpast.com/" target="_blank">http://chatpast.com</a>, then  Chargify.NET is super handy. It&#8217;s comprehensive C# API wrapper library for accessing <a href="http://chargify.com/" target="_blank">http://chargify.com</a>, using XML or JSON to read/write.</p>
<p><span style="font-size:x-large;">9</span>. Facebook C# SDK at  <a href="http://facebooksdk.codeplex.com/" target="_blank">http://facebooksdk.codeplex.com/</a></p>
<p>Facebook is all the rage these days, and python, well&#8230; Here&#8217;s a .NET SDK for Facebook. The Facebook C# SDK helps .Net developers build web, desktop, Silverlight, and  Windows Phone 7 applications that integrate with Facebook.</p>
<p><span style="font-size:x-large;">10</span>. OpenSearch Toolkit at  <a href="http://opensearchtoolkit.codeplex.com/" target="_blank">http://opensearchtoolkit.codeplex.com/</a></p>
<p>OpenSearch is a great way to &#8220;light-up&#8221; the search features of your site. For example, if you visit <a href="http://chatpast.com/" target="_blank">http://chatpast.com</a> with Firefox and pull down the search engine selector, you&#8217;ll see &#8220;Add ChatPast Search&#8221;. Do the same in Chrome and then type <a href="http://chatpast.com/">chatpast.com</a> in the omnibox and hit tab then you&#8217;re searching directly into your chat history (even when you&#8217;re not on <a href="http://chatpast.com/">chatpast.com</a>). So obviously OpenSearch is awesome. This toolkit makes that easier. The OpenSearch Toolkit provides ASP.NET developers with drop-in support for OpenSearch. This lets you quickly and easily publish valid search suggestions to all the major browsers.</p>
<p><span style="font-size:x-large;">11</span>. NoRM at <a href="http://normproject.org/">http://normproject.org/</a></p>
<p><a href="2010/04/22/TheNoSQLMovementLINQAndMongoDBOhMy.aspx">LINQ, NoSQL and MongoDB</a>, what more could you want? NoRM is how you make it happen. NoRM is a .Net library for connecting to the document-oriented database, <a href="http://www.mongodb.org/">MongoDB</a>.</p>
<p><span style="font-size:x-large;">11.5</span>. Simple MVVM for WPF, SL, and WP7 at <a href="http://simplemvvmtoolkit.codeplex.com/">http://simplemvvmtoolkit.codeplex.com/</a> (added after original post, hence the .5)</p>
<p>Simple MVVM Toolkit makes it easier to develop Silverlight, WPF and WP7 applications using the Model-View-ViewModel design pattern. The purpose of the toolkit is to provide a simple framework and set of tools for getting up to speed quickly with Silverlight applications based on the MVVM design pattern. The emphasis is on simplicity, but it should contain everything you need to implement MVVM for real-world line of business applications.</p>
<p>Keep in mind, that to get the latest version of any of these projects, you can just use the Visual Studio &#8221;Add Library Package Reference&#8221; dialog because of all the NuGet goodness. No need to download and manage these project references at a low level.</p>
<p>Enjoy!<br />
<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/open-source/'>Open Source</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/articles/'>Articles</a>, <a href='http://blog.michaelckennedy.net/tag/asp-net/'>ASP.NET</a>, <a href='http://blog.michaelckennedy.net/tag/open-source/'>Open Source</a>, <a href='http://blog.michaelckennedy.net/tag/tools/'>Tools</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=58&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2011/01/19/11-killer-open-source-projects-i-found-with-nuget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Portland CodeCamp Downloads: Demos and Slides</title>
		<link>http://blog.michaelckennedy.net/2010/05/24/portland-codecamp-downloads-demos-and-slides/</link>
		<comments>http://blog.michaelckennedy.net/2010/05/24/portland-codecamp-downloads-demos-and-slides/#comments</comments>
		<pubDate>Mon, 24 May 2010 20:58:19 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code Camps]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://michaelckennedy.wordpress.com/?p=60</guid>
		<description><![CDATA[Thanks to everyone who came to my two sessions at the Portland CodeCamp this weekend. The NoSQL Movement, LINQ, and MongoDB &#8211; Oh My! Panel Discussion: NoSQL vs. RDBMS You can download the slides, demo code, and the mongoctx code &#8230; <a href="http://blog.michaelckennedy.net/2010/05/24/portland-codecamp-downloads-demos-and-slides/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=60&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="font-size:1.2em;">
<p>Thanks to everyone who came to my two sessions at the Portland CodeCamp this weekend.</p>
<p><a href="http://portlandcodecamp.org/2010/Sessions/Details/52" target="_blank">The NoSQL Movement, LINQ, and MongoDB &#8211; Oh My!</a></p>
<p><a href="http://portlandcodecamp.org/2010/Sessions/Details/120" target="_blank">Panel Discussion: NoSQL vs. RDBMS</a></p>
<p>You can download the slides, demo code, and the mongoctx code snippet for Visual Studio here:</p>
<p><strong>NoSQL + MongoDB + LINQ</strong>:<br />
<a href="http://www.michaelckennedy.com/Talks/Downloads/PortlandCodeCamp/Kennedy-PdxCodeCamp-2010-MongoDB-NoRM-LINQ.zip" target="_blank">http://www.michaelckennedy.com/Talks/Downloads/PortlandCodeCamp/Kennedy-PdxCodeCamp-2010-MongoDB-NoRM-LINQ.zip</a></p>
<p><strong>NoSQL vs. RDBMS Panel</strong>:<br />
<a target="_blank">http://www.michaelckennedy.com/Talks/Downloads/PortlandCodeCamp/Kennedy-PdxCodeCamp-2010-NoSQL-vs-RDBMS-Panel.zip</a></p>
<p>If you missed the sessions and want to see some MongoDB + LINQ or if you would like to recommend this session to a friend, I&#8217;ll be doing a webcast on a very similar talk tomorrow:</p>
<p><a href="http://www.michaelckennedy.net/blog/2010/05/11/WebcastNoSQLMovementLINQAndMongoDB.aspx" target="_blank">NoSQL + MongoDB + LINQ Webcast</a></p>
<p>Cheers!<br />
<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a></p>
</div>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/speaking/'>Speaking</a>, <a href='http://blog.michaelckennedy.net/category/uncategorized/'>Uncategorized</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/code-camps/'>Code Camps</a>, <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/open-source/'>Open Source</a>, <a href='http://blog.michaelckennedy.net/tag/speaking/'>Speaking</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=60&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2010/05/24/portland-codecamp-downloads-demos-and-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Webcast: NoSQL Movement, LINQ, and MongoDB</title>
		<link>http://blog.michaelckennedy.net/2010/05/11/webcast-nosql-movement-linq-and-mongodb/</link>
		<comments>http://blog.michaelckennedy.net/2010/05/11/webcast-nosql-movement-linq-and-mongodb/#comments</comments>
		<pubDate>Tue, 11 May 2010 21:39:06 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=66</guid>
		<description><![CDATA[[Update: This webcast is in the past, but you can download the video and audio recordings.] Download Video (WMV) Download Audio (MP3) I&#8217;m happy to announce I&#8217;ll be doing a free webcast in the DevelopMentor webcast series on MongoDB, .NET, LINQ, and &#8230; <a href="http://blog.michaelckennedy.net/2010/05/11/webcast-nosql-movement-linq-and-mongodb/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=66&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/jdnS9LMocks?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p><img style="float:right;" src="http://www.michaelckennedy.com/Images/BlogPosts/Sql-in-the-trash.png" alt="" /></p>
<p>[Update: This webcast is in the past, but you can download the video and audio recordings.]</p>
<p><a href="http://developmentor.s3.amazonaws.com/webcasts/MongoDB-NoRM-LINQ-Michael-Kennedy-2010-05-25.wmv">Download Video (WMV)</a><br />
<a href="http://developmentor.s3.amazonaws.com/webcasts/MongoDB-NoRM-LINQ-Michael-Kennedy-2010-05-25.mp3">Download Audio (MP3)</a></p>
<p>I&#8217;m happy to announce I&#8217;ll be doing a free webcast in the <a href="http://develop.com" target="_blank">DevelopMentor</a> webcast series on MongoDB, .NET, LINQ, and NoRM.</p>
<p style="padding-left:40px;"><strong>NoSQL Movement, LINQ, and MongoDB </strong><br />
Tuesday May 25th &#8211; 11AM PST<br />
<a href="http://bit.ly/-mongoDB" target="_blank">Register here</a></p>
<p>I hope to see you there. We&#8217;ll be building out a website in ASP.NET MVC with MongoDB as the back-end using LINQ. There will be plenty of code so it should be fun and educational.</p>
<p>Cheers!<br />
<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a></p>
</div>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/nosql/'>NoSQL</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/open-source/'>Open Source</a>, <a href='http://blog.michaelckennedy.net/tag/screencasts/'>Screencasts</a>, <a href='http://blog.michaelckennedy.net/tag/speaking/'>Speaking</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=66&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2010/05/11/webcast-nosql-movement-linq-and-mongodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://developmentor.s3.amazonaws.com/webcasts/MongoDB-NoRM-LINQ-Michael-Kennedy-2010-05-25.wmv" length="657491049" type="video/asf" />
<enclosure url="http://developmentor.s3.amazonaws.com/webcasts/MongoDB-NoRM-LINQ-Michael-Kennedy-2010-05-25.mp3" length="22338486" type="audio/mpeg" />
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Sql-in-the-trash.png" medium="image" />
	</item>
		<item>
		<title>MongoDB vs. SQL Server 2008 Performance Showdown</title>
		<link>http://blog.michaelckennedy.net/2010/04/29/mongodb-vs-sql-server-2008-performance-showdown/</link>
		<comments>http://blog.michaelckennedy.net/2010/04/29/mongodb-vs-sql-server-2008-performance-showdown/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 21:52:40 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=69</guid>
		<description><![CDATA[This article is a follow up one I wrote last week entitled “The NoSQL Movement, LINQ, and MongoDB &#8211; Oh My!”. In that article I introduced the NoSQL movement, MongoDB, and showed you how to program against it in .NET using LINQ &#8230; <a href="http://blog.michaelckennedy.net/2010/04/29/mongodb-vs-sql-server-2008-performance-showdown/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=69&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img style="float:right;" src="http://www.michaelckennedy.com/Images/BlogPosts/Sql-in-the-trash.png" alt="" /></p>
<p>This article is a follow up one I wrote last week entitled <a href="http://www.michaelckennedy.net/blog/2010/04/22/TheNoSQLMovementLINQAndMongoDBOhMy.aspx" target="_blank">“The NoSQL Movement, LINQ, and MongoDB &#8211; Oh My!”</a>. In that article I introduced the NoSQL movement, MongoDB, and showed you how to program against it in .NET using LINQ and NoRM. You can also watch my conference presentation at <a href="http://wp.me/p2eT73-3V" target="_blank">MongoDB Seattle 2011</a> or this <a href="http://blog.michaelckennedy.net/2010/05/11/webcast-nosql-movement-linq-and-mongodb/" target="_blank">DevelopMentor webcast</a>.</p>
<p>I highlighted two cornerstone reasons why you might ditch your SQL Server for the NoSQL world of MongoDB. Those were</p>
<p style="padding-left:10px;">1. Ease-of-use and deployment<br />
2. Performance</p>
<p>For ease-of-use, you’ll want to <a href="http://www.michaelckennedy.net/blog/2010/04/22/TheNoSQLMovementLINQAndMongoDBOhMy.aspx" target="_blank">read the original article</a>.</p>
<p>This article is about the performance argument for MongoDB over SQL Server (or MySql or Oracle). In the first article, I threw out a potentially controversial graph showing MongoDB performing 100 *times* better than SQL Server for inserts.</p>
<p style="padding-left:40px;padding-right:20px;font-size:1.4em;"><span style="font-size:1.4em;">“A potentially controversial graph showing MongoDB performing 100 times better than</span> <span style="font-size:1.4em;">SQL Server”</span></p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/Sql-vs-Mongo-Inserts.png" alt="" /></p>
<p>We’ll see source code, downloadable and executable examples and you can verify all of this for yourselves. But first, here’s a new twist on an old proverb:</p>
<p style="padding-left:40px;padding-right:20px;font-size:1.4em;">“Data is money”</p>
<p><span id="more-69"></span></p>
<p>If your application is data intensive and stores lots of data, queries lots of data, and generally lives and breathes by its data, then you’d better do that efficiently or have resources (i.e. money) to burn.</p>
<p>Let’s imagine you’re creating a website that is for-pay and data intensive. If you were to attempt to plan out your operating costs per user to help guide the pricing of your product then the cost of storing, querying, and managing your data will likely be a significant part of that calculation.</p>
<p>If there is a database that is 100 times faster than SQL Server, free, easy to administer and you program it with LINQ just as you would with SQL Server then that is a very compelling choice.</p>
<p>When you have such a database, it means you can run your system on commodity hardware rather than high-end servers. It means you can have fewer servers to maintain and purchase or lease. It means you can charge a lot less per user of your application and get the same revenue. Think about it.</p>
<p style="padding-left:40px;padding-right:20px;font-size:1.4em;">“It means you can charge a lot less per user of your application and get the same revenue. Think about it.”</p>
<p>One more story before we see the statistics. Kristina Chodorow from 10Gen gave a talk a few weeks ago at San Francisco’s MySQL Meetup entitled “Dropping ACID with MongoDB”. You can watch the recording here:</p>
<p><a href="http://www.ustream.tv/recorded/6146875" target="_blank">http://www.ustream.tv/recorded/6146875</a></p>
<p>[The audio and video isn’t too hot, but the content is. Skip the first minute without<br />
audio.]</p>
<p>During this talk, Kristina describes SourceForge’s experience moving from MySql to MongoDB. On MySql, SourceForge was reaching its limits of performance at its current user load. Using some of the easy scale-out options in MongoDB, they fully replaced MySQL and found MongoDB could handle the current user load easily. In fact, after some testing, they found their site can now handle 100 times the number of users it currently supports.</p>
<p>Not convinced of this NoSQL thing yet? Fair enough. Here are some graphs, some stats, and some code.</p>
<h3><strong>The scenario:</strong></h3>
<p>Model a data intensive web application aiming to support as many concurrent users<br />
as possible. There will be users from the web application itself. But there will also be users from an API and external applications. Users will interact with the data by having nearly as many inserts as they do queries. Their inserts are all small pieces of data and are all independent of each other.</p>
<p>Let me just get this out of the way and I mean the following in the nicest of ways: I don’t care about your scenario or use-case. The scenario above is what I’m trying to model. I’m not trying to do bulk-inserts or loading large files into databases or anything like that. MongoDB may be great for these. SQL Server may have specialized features around your use-case, etc. They don’t apply in my scenario. So please don’t wonder why I’m not using bulk inserts or anything like that in the examples below.</p>
<h3>Insert Speed Comparison</h3>
<p>It’s the inserts where the differences are most obvious between MongoDB and SQL Server.</p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/Insert-Speed-Table.png" alt="" /></p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/Sql-vs-Mongo-Inserts.png" alt="" /></p>
<p>These inserts were performed by inserting 50,000 independent objects using NoRM for MongoDB and LINQ to SQL for SQL Server 2008. Here are the data models:</p>
<p style="padding-left:70px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/MongoDb-Basic-Entity.png" alt="" /></p>
<p>MongoDB basic class</p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/SQL-Basic-Entity.png" alt="" /></p>
<p>SQL Server basic class</p>
<p>I ran five concurrent clients hammering the databases with inserts. Here’s the  screenshots for  <a href="http://www.michaelckennedy.com/Images/BlogPosts/RunningMonoDBPerf.png" target="_blank">running against MongoDB</a> and  <a href="http://www.michaelckennedy.com/Images/BlogPosts/RunningSqlPerf.png" target="_blank">against SQL Server</a>. Let’s zoom into the most important result with the output from one of five concurrent clients:</p>
<p style="padding-left:40px;">MongoDB:</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/RunningMonoDBPerf-Zoom.png" alt="" /></p>
<p style="padding-left:40px;">SQL Server:</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/RunningSqlPerf-Zoom.png" alt="" /></p>
<p>That’s right. It’s 2 seconds verses 3 1/2 <span style="text-decoration:underline;"><strong>minutes</strong></span>!</p>
<p>Now to be fair, this was using LINQ to SQL on the SQL side which is slow on the inserts. After discussing these results with some friends, I re-ran the tests using raw ADO.NET style programming and saw a 1.5x-3x performance improvement for SQL. That still leaves MongoDB 30x-50x faster than SQL.</p>
<h3>Query Speed Comparison</h3>
<p>Now let’s see about getting the data out using the same objects above on the indexed Id field for each database.</p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/Basic-Indexed-Query-Speed-Table.png" alt="" /></p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/Basic-Indexed-Query-Speed-Graph.png" alt="" /></p>
<p>Here MongoDB still kicks some SQL butt with almost 3x performance. If we were to leverage the mad scale-out options that MongoDB affords then we could kick that up to many times more.</p>
<p style="padding-left:40px;padding-right:20px;font-size:1.4em;">“If we were to leverage the mad scale-out options that MongoDB affords then we could kick that up to many times more.”</p>
<h3>Complex Data and the Real World</h3>
<p>Feel like that was an overly simplified example? Here’s some real world data with foreign keys and joins. Below is the complex data model.</p>
<p>MongoDB:</p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/MongoDB-Complex-Entities.png" alt="" /></p>
<p>SQL Server:</p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/SQL-Complex-Entities.png" alt="" /></p>
<p>It shouldn’t surprise you that MongoDB does even better here without its joins.</p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/Complex-Query-Speed-Table.png" alt="" /></p>
<p style="padding-left:40px;"><img src="http://www.michaelckennedy.com/Images/BlogPosts/Complex-Query-Speed-Graph.png" alt="" /></p>
<h3>The Hardware</h3>
<p>All of these tests were run on a Lenovo T61 on Windows 7 64-bit with a dual-core 2.8 GHz processor using the 64-bit versions of both SQL Server 2008 Standard and MongoDB 1.4.1. You can even see a picture of the computer here: <a href="http://twitpic.com/hywa8" target="_blank">http://twitpic.com/hywa8</a></p>
<h3>Your Turn</h3>
<p>If you want to see the entire set of data above as an Excel spreadsheet, you can download that here:</p>
<p style="padding-left:40px;"><a href="http://www.michaelckennedy.com/Downloads/sql-vs-mongo.xlsx" target="_blank"> http://www.michaelckennedy.com/Downloads/sql-vs-mongo.xlsx</a></p>
<p>You can also download the sample code. Before you do, realize I haven’t done a bunch of work to make it super easy to run. But you should be able to figure it out. Just turn the knobs on the PerfConstants class for the number of inserts and queries. Then comment or uncomment sections of the code in the clients for your scenarios.</p>
<p>The expected use is that you’ll start the launcher application then use it to launch five concurrent clients at exactly the same time.</p>
<p><strong>Download Sample:</strong></p>
<p style="padding-left:40px;"><a href="http://www.michaelckennedy.com/Samples/SpeedOfSqlVsMongoDBAnddotNetSample.zip" target="_blank"> http://www.michaelckennedy.com/Samples/SpeedOfSqlVsMongoDBAnddotNetSample.zip</a></p>
<p>Got feedback? Write a comment or contact me on Twitter:  <a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a> or find me in <a href="http://www.michaelckennedy.net/contact.aspx" target="_blank"><br />
any of these other ways</a>.</p>
<h3>Thanks!</h3>
<p>Some thanks are in order for all the help I got bouncing around ideas as well as trying different scenarios. Thanks to</p>
<p>Eric Cain <a href="http://twitter.com/arcain" target="_blank">@arcain</a><br />
Jim Lehmer<a href="http://twitter.com/dullroar" target="_blank">@dullroar</a><br />
Karl Seguin <a href="http://twitter.com/karlseguin" target="_blank">@karlseguin</a></p>
<p>Cheers!<a href="http://twitter.com/karlseguin" target="_blank"><br />
</a><a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a><a href="http://twitter.com/karlseguin" target="_blank"> </a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/nosql/'>NoSQL</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/articles/'>Articles</a>, <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=69&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2010/04/29/mongodb-vs-sql-server-2008-performance-showdown/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Sql-in-the-trash.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Sql-vs-Mongo-Inserts.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Insert-Speed-Table.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Sql-vs-Mongo-Inserts.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/MongoDb-Basic-Entity.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/SQL-Basic-Entity.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/RunningMonoDBPerf-Zoom.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/RunningSqlPerf-Zoom.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Basic-Indexed-Query-Speed-Table.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Basic-Indexed-Query-Speed-Graph.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/MongoDB-Complex-Entities.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/SQL-Complex-Entities.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Complex-Query-Speed-Table.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Complex-Query-Speed-Graph.png" medium="image" />
	</item>
		<item>
		<title>The NoSQL Movement, LINQ, and MongoDB &#8211; Oh My!</title>
		<link>http://blog.michaelckennedy.net/2010/04/22/the-nosql-movement-linq-and-mongodb-oh-my/</link>
		<comments>http://blog.michaelckennedy.net/2010/04/22/the-nosql-movement-linq-and-mongodb-oh-my/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 22:24:34 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=76</guid>
		<description><![CDATA[Maybe you’ve heard people talking about ditching their SQL Servers and other RDBMS entirely. There is a movement out in the software development world called the &#8220;NoSQL&#8221; movement and it’s taking the web application world by storm. “Insanity!” you may cry, “for where &#8230; <a href="http://blog.michaelckennedy.net/2010/04/22/the-nosql-movement-linq-and-mongodb-oh-my/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=76&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p><img style="float:right;" src="http://www.michaelckennedy.com/Images/BlogPosts/Sql-in-the-trash.png" alt="" /><br />
Maybe you’ve heard people talking about ditching their SQL Servers and other RDBMS entirely. There is a movement out in the software development world called <a href="http://en.wikipedia.org/wiki/NoSQL" target="_blank">the &#8220;NoSQL&#8221; movement</a> and it’s taking the web application world by storm.</p>
<p style="font-size:1.3em;">“Insanity!” you may cry, “for where will people put their data if not in a database? Flat files? Tell me we aren’t going back to flat files.”</p>
<p>No, but in the relational model, something does has to give. The NoSQL movement is about re-evaluating the constraints and scalability of data storage systems in the light of the way modern web applications generate and consume data.</p>
<p>The outcry about flat files above is meant to highlight an assumption developers often have about building data-driven applications: Data goes in the database (SQL Server, Oracle, or MySql). Just maybe, if we are really cutting-edge, we might consider storing our data in the cloud, but the choices generally stop there.</p>
<p>The NoSQL movement asks the question:</p>
<p style="font-size:1.3em;">“Is the relational database (RDBMS) always the right tool for data storage and data access?”</p>
<p><span id="more-76"></span></p>
<p>Starting from an RDBMS is virtually an <a title="a proposition whose truth is so evident that no reasoning or demonstration can make it plainer." href="http://en.wiktionary.org/wiki/axiom" target="_blank">axiom</a> of software development. However, those of us who are excited about NoSQL believe that relational databases are not always the answer. I think this highlights one of the reasons this NoSQL thing is called a movement. People are realizing they have a choice where they thought they had none.</p>
<p>The converse is, of course, also true. The NoSQL databases are also not always the right choice either. If you look carefully however, you will find that they are a good choice much of the time. Don’t take my word on it. Ask Facebook, Twitter, Digg, SourceForge, WebEx, Reddit and a bunch of other companies <a href="http://en.wikipedia.org/wiki/Apache_Cassandra" target="_blank">here</a> and <a href="http://www.mongodb.org/display/DOCS/Production+Deployments" target="_blank">here</a> that are using NoSQL databases.</p>
<p>This move towards NoSQL is driven by pressure from two angles in the web application<br />
world:</p>
<ul>
<li><strong>Ease-of-use and deployment</strong></li>
<li><strong>Performance</strong><span style="font-family:verdana;font-size:1.2em;line-height:1.4em;"> - especially when there are many writers as compared to the number of readers (think Twitter or Facebook).</span></li>
</ul>
<h3><span style="font-family:verdana;font-size:1.2em;line-height:1.4em;"><br />
Choosing NoSQL for Ease-of-Use and Deployment</span></h3>
<p>I cover the programming model in detail as well as introduce the actual database<br />
server below. For some vague motivation, let me just give you a quick look at how<br />
you define the data model and maintain it.</p>
<table style="float:none;width:400px;">
<tbody>
<tr>
<td>
<ol>
<li>Define your classes in C# (largely) without regard to putting them in a database. Related classes? Easy &#8211; one has a collection of the others.</li>
<li>Create a simple DataContext-like class which exposes each top-level type that is to be stored in the database. This is only a few lines of code per collection (think of this as a table).</li>
<li>Interact with the database using LINQ. This creates the collections (think tables), sets the schema, etc.</li>
<li>Maintain the database and evolve it by maintaining your classes from step 1. *</li>
</ol>
</td>
</tr>
</tbody>
</table>
<p style="clear:both;">Why, in the name of all that is right, do we have to model our system twice? Once in the database and once, in parallel, in code? With NoSQL, you have one place to do that &#8211; in your C# classes.</p>
<p>* You may have to run a transformation tool if you’re making radical data changes, but that’s true in SQL systems as well.</p>
<h3>Choosing NoSQL for Performance</h3>
<p>When the number of concurrent clients using your application &#8211; and thus your database - is reasonably small (let’s say 500 users as a baseline) RDBMS can work great. But what if that number grows? And if you are writing a web app, you definitely want that number to grow. At 50,000 users, can you still run on a single instance of SQL Server or MySql? How powerful does your hardware have to be to handle that? What about at 500,000 or 5,000,000 users, still good?</p>
<p>I’m sure there are some of you out there thinking, “What a minute now! There are plenty of systems with tons of users built upon relational databases.”</p>
<p>It’s true, there are. But how much expensive hardware and software do these require? How easy is it to leverage *commodity* hardware and free software? A basic SQL Server  cluster might run you $100,000 just to get it up and running on decent hardware. Rather than leveraging crazy scaling-up options, the NoSQL databases let you scale-out. They make this possible (dare I say easy?) by dropping the relational aspects of a database. Some NoSQL systems such as MongoDB get even better scalability by loosening some of the durability guarantees – which they backfill somewhat with redundancy (more on MongoDB shortly).</p>
<p style="font-size:1.3em;">“Ok, ok. So it’s cheaper and simpler,” you say. “How much faster than the finely tune system that is SQL Server 2008 can these open source NoSQL systems be?”</p>
<p>The answer is: <strong>MUCH MUCH FASTER</strong>. Here’s a simple comparison of running a bunch of concurrent inserts into SQL Server 2008 and MongoDB on the same computer.</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/Sql-vs-Mongo-Inserts.png" alt="" /></p>
<p>Looks like under heavy load, I’d say it’s about 100 times faster. I’m sure there going to be tons of second guessing this graph and so on. Hold your comments please! I’ll be posting a full performance comparison with source code soon. Let me just say that I think the comparison was fair &#8211; I’ll back that up in a later post.</p>
<h3>NoSQL and a New Programming Model</h3>
<p>If we do not have joins and primary / foreign key relationships, how do we associate related data? In NoSQL, there is a way to mimic foreign keys for certain relationships. However the main answer is that you do not disassociate your data in the first place.</p>
<p>I’m sure that you’ve all heard of the <a href="http://en.wikipedia.org/wiki/Object-relational_impedance_mismatch" target="_blank">object-relational impedance mismatch</a>. A large part<br />
of that mismatch comes from the fact that we normalize the data in our database to the extreme and then use joins to reassemble that data. Not only does that cause this so-called impedance mismatch, but those joins can be really slow and they can be the death of any scale-out solution. The key to many of the NoSQL databases’ scalability is that they do not use joins. You simply save large swaths of your data as a single blob (which in MongoDB’s case, is still deeply queriable).</p>
<p>Shortly we’ll look at an example where we build out a disconnected, offline RSS reader that uses MongoDB and LINQ to store its data. But just think about how you might structure your data storage if you could save entire object graphs and still query them? Your &#8220;row&#8221; might be a Blog object which has an array of BlogEntries which contain the entry text, link, date, etc. Then your *entire* query to pull all the details of a single blog would hit a single “table” in the database. That might look like this query which has one result:</p>
<pre class="brush: csharp">var blog =
       (from b in ctx.Blogs
       where b.Id == requestedBlogId
       select b).FirstOrDefault();</pre>
<p>There are no joins or anything like that because you’re saving objects not columns and those objects contain their collections already (e.g. RssEntries). There is an important distinction to make here. These NoSQL databases generally are *not* the same as object databases. They are what are known as document databases. There’s actually <a href="http://blog.10gen.com/post/437029788/json-db-vs-odbms" target="_blank">a<br />
big difference between the two</a>.</p>
<h3>Introducing MongoDB</h3>
<p>The NoSQL database we are using in this example is <a href="http://www.mongodb.org" target="_blank">MongoDB</a>. This is free, open-source database which runs on Windows, Linux, and Mac OS X systems. You can access it from many platforms including .NET, Ruby, Java, PHP, and so on.</p>
<p>We’ll be using .NET and C# of course. You have several options when choosing <a href="http://www.mongodb.org/display/DOCS/C+Sharp+Language+Center" target="_blank">how to access MongoDB from .NET</a> but generally that means using LINQ and a light-weight object-mapper on top of MongoDB itself. Note that common terminology might categorize the object mapper that moves objects into and out of the database as an ORM. While that’s OK, there is technically no &#8220;R&#8221; in this ORM because MongoDB is not relational. Hence I’m calling simply an Object-Mapper (OM).</p>
<p>In MongoDB nomenclature, theses libraries are called drivers. My favorite .NET driver<br />
is called NoRM. It’s being actively developed and was created by <a href="http://twitter.com/karlseguin" target="_blank">Karl Seguin</a>, <a href="http://twitter.com/atheken" target="_blank">Andrew Theken</a>, <a href="http://twitter.com/robconery" target="_blank">Rob Conery</a>, <a href="http://twitter.com/averyj" target="_blank">James Avery</a>, and <a href="http://twitter.com/jasona" target="_blank">Jason Alexander</a>. You can find <a href="http://github.com/atheken/NoRM" target="_blank">NoRM on GitHub</a> and discuss it in its related <a href="http://groups.google.com/group/norm-mongodb" target="_blank">Google Group</a>.</p>
<p>If you want to learn more about MongoDB you should listen to these Podcast interviews:</p>
<table style="float:none;">
<tbody>
<tr>
<td>
<ul>
<li><a href="http://herdingcode.com/?p=234" target="_blank">HERDING CODE 71: JAMES AVERY AND ROB CONERY ON NOSQL AND A BUNCH OF OTHER STUFF</a></li>
<li><a href="http://www.dotnetrocks.com/default.aspx?showNum=507" target="_blank">DotNetRocks: Michael Dirolf is SQL Free with MongoDB</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Michael Dirolf also has a great book in the works. You can catch a preview of it on<br />
<a href="http://my.safaribooksonline.com/9781449381578" target="_blank">Safari Books Online</a>. Here’s the amazon page:</p>
<p><a href="http://www.amazon.com/MongoDB-Definitive-Guide-Michael-Dirolf/dp/1449381561" target="_blank">MongoDB: The Definitive Guide</a>.</p>
<h3>NoSQL in Action</h3>
<p>Let’s write some code. The first step typically in a data-driven application is to spec out the database. Then we’d use LINQ to SQL or Entity Framework to generate the ORM classes. MongoDB is different. MongoDB has no schema or rather its schema is flexible and defined via usage rather than being predefined in the database. So our first step is to define the classes we’d be storing in the DB via NoRM.</p>
<p>We’re going to define 3 classes: Blog, RssEntry, and RssDetail. The Blog object will contain a collection of RssEntry objects. In practice you might just go with the Blog and RssEntry classes. But I wanted to model both the embedded case (Blog + RssEntry) and the loosely defined foreign key style relationship that mimic joins (RssEntry + RssDetail). That way we can demonstrate both use-cases.</p>
<p>Here’s a taste of the Blog class:</p>
<pre class="brush: csharp">public class Blog
{
	public ObjectId _id { get; set; }
	public string Name { get; set; }
	public string Url { get; set; }
	public string RssUrl { get; set; }
	public List Entries { get; set; }
      // ...
}</pre>
<p>Notice that it contains a collection (Listreally) of RssEntry objects. That’s the relationship supported by nesting. The Blog class just has this collection as part of its data model.</p>
<p>The RssEntry class has the summary info for a blog entry:</p>
<pre class="brush: csharp">public class RssEntry
{
	public ObjectId _id { get; set; }

	public Guid UniqueId { get; set; }
	public DateTime PostedDate { get; set; }
	public string Title { get; set; }
	public string RssGuid { get; set; }
}</pre>
<p>And the larger data is stored in the RssDetails class (for example the text of the post):</p>
<pre class="brush: csharp">public class RssDetails
{
	public ObjectId _id { get; set; }

	// this is kinda like the foreign key.
	public Guid RssEntryId { get; set; }

	public List Categories { get; set; }
	public string Link { get; set; }
	public string Text { get; set; }
	// ...
}</pre>
<p>Let’s see how we insert an entire set of Blog data into the database. We begin by generating the objects (Blog, RssEntry, etc) in memory and then serializing them via NoRM to MongoDB much as you would in LINQ to SQL. The difference is this will actually generate the collections (analogous to tables) if they don’t already exist and it will define the implicit schema to match our objects:</p>
<pre class="brush: csharp">void SaveBlogToMongoDb(
	string rssUrl, XElement root, RssDataContext ctx)
{
	Blog blog = new Blog();
	blog.RssUrl = rssUrl;
	blog.Name = GetBlogName(root);
	blog.Url = GetBlogUrl(root);

	blog.Entries = ParseEntries(root);
	IEnumerable details
		= GetDetails(blog.Entries, root);

	foreach (RssDetails detail in details)
	{
		ctx.Add(detail);
	}

	ctx.Add(blog);
}</pre>
<p>Here we are using a class called RssDataContext which we wrote manually. It is very similar to what LINQ to SQL and Entity Framework use to do the object-relational mapping. Want to do a query? Do you know LINQ? Well then you’re all set:</p>
<pre class="brush: csharp">var results =
    from b in ctx.Blog
    where b.Name.Contains( "MongoDB" )
    select b;</pre>
<p>How do you add a new entry to an existing blog and update it in the database?</p>
<pre class="brush: csharp">void AddEntry(Blog blog, RssEntry entry)
{
	blog.Entries.Add(entry);
	ctx.Save(blog);
}</pre>
<p>We leverage the fact that the blog.Entries collection is a List and just add to it. Then save will update the record in the DB.</p>
<p>All this works great and is highly performant. But do be careful as not all the LINQ operations are fully implemented yet in NoRM and some (like join) may never be added because MongoDB doesn’t support it.</p>
<p>To get started, download MongoDB the tools and server here:</p>
<p><a href="http://www.mongodb.org" target="_blank">http://www.mongodb.org</a></p>
<p>You unzip the zip file and run the mongod.exe program. Be sure that you have created the C:\data\db folder. It appears at first that you have to run MongoDB in a console window. But you can register it as a Windows Service:</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/Mogo-services-zoom.png" alt="" /></p>
<p>Here’s some helpful advice on installing MongoDB as a Windows Service (there is<br />
a small bug you have to work around):</p>
<p><a href="http://www.deltasdevelopers.com/post/Running-MongoDB-as-a-Windows-Service.aspx" target="_blank">http://www.deltasdevelopers.com/post/Running-MongoDB-as-a-Windows-Service.aspx</a></p>
<p>There’s also a management console (and I mean &#8220;console&#8221;):</p>
<p><img src="http://www.michaelckennedy.com/Images/BlogPosts/MongoConsole.png" alt="" /></p>
<p>It’s a little different. You’ll get used to it. The means of interaction with the server is through JavaScript rather than T-SQL and the storage format is a binary form of JSON as you can see.</p>
<p>For a project I’m working on I’ve built a Windows Forms UI that lets me manage the database easily by just adding an object data source and doing some drag-drop magic in Visual Studio. Generally I look down upon that sort of development, but for an admin tool it’s just fine.</p>
<h3>Now It’s Your Turn!</h3>
<p>Try it out for yourself. Download MongoDB and the NoRM driver and build some apps. You may also want to check out the source code for my demo app:</p>
<p>Download Sample: <a href="http://www.michaelckennedy.com/Samples/RssMongoSample-Kennedy.zip">RssMongoSample-Kennedy.zip</a></p>
<p>Got feedback? Write a comment or contact me on Twitter where I&#8217;m <a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a> or find me in any of <a href="http://www.michaelckennedy.net/contact.aspx" target="_blank">these other ways</a>.</p>
<h3>Recommended Reading:</h3>
<p>Here are some other blogs on this subject.</p>
<table style="float:none;">
<tbody>
<tr>
<td>
<ul>
<li><a href="http://andrewtheken.com/2010/02/26/no-sql-no-problems-or-mo-sql-mo-problems/" target="_blank">No SQL, No Problems (or: Mo’ SQL, Mo’ Problems)</a></li>
<li><a href="http://blog.wekeroad.com/2010/03/04/using-mongo-with-linq" target="_blank">Using Mongo With LINQ</a></li>
<li><a href="http://blog.wekeroad.com/2009/12/31/hello-from-2020" target="_blank">Hello from 2020</a></li>
<li><a href="http://blog.mongodb.org/" target="_blank">The MongoDB NoSQL Database Blog</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/nosql/'>NoSQL</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/open-source/'>Open Source</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=76&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2010/04/22/the-nosql-movement-linq-and-mongodb-oh-my/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Sql-in-the-trash.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Sql-vs-Mongo-Inserts.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/Mogo-services-zoom.png" medium="image" />

		<media:content url="http://www.michaelckennedy.com/Images/BlogPosts/MongoConsole.png" medium="image" />
	</item>
		<item>
		<title>Handy Web Development Technique</title>
		<link>http://blog.michaelckennedy.net/2010/02/25/handy-web-development-technique/</link>
		<comments>http://blog.michaelckennedy.net/2010/02/25/handy-web-development-technique/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 22:51:02 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=90</guid>
		<description><![CDATA[I&#8217;m working on a fantastic website that I hope will have significant impact when it&#8217;s ready. I&#8217;m planning on launching in roughly one month. I came across what I think is an awesome technique for seeing how your web page &#8230; <a href="http://blog.michaelckennedy.net/2010/02/25/handy-web-development-technique/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=90&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a fantastic website that I hope will have significant impact when it&#8217;s ready. I&#8217;m planning on launching in roughly one month.</p>
<p>I came across what I think is an awesome technique for seeing how your web page will look as you edit it. This is WAY beyond WYSIWIG:</p>
<ol>
<li>Load the page you&#8217;re working on in <strong>ALL</strong> the browser you care about. I&#8217;m using Chrome 4, FireFox 3.6, and IE 8.</li>
<li>If you have the monitor space, cascade these browsers side-by-side.</li>
<li>Add a meta-refresh tag to the header of that HTML file you&#8217;re working on (or which consumes the CSS you&#8217;re building)</li>
<li>Now here&#8217;s the sweet part:Edit the page in Visual Studio, notepad, whatever. When you press save all  Browsers reload their view in a few seconds!</li>
<li>Now you get <strong>real</strong> WYSIWIG on <strong>real </strong>browsers.</li>
</ol>
<p>That&#8217;s it. The technique is totally low tech and would have worked for years. But I found it really helpful. Hope you do too.</p>
<p>Be sure to keep watching here. I promise a cool site will be announced soon!</p>
<p>Cheers!<br />
Michael<br />
<a href="http://twitter.com/mkennedy">@mkennedy</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=90&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2010/02/25/handy-web-development-technique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Building Windows Machines in Amazon EC2</title>
		<link>http://blog.michaelckennedy.net/2010/01/30/building-windows-machines-in-amazon-ec2/</link>
		<comments>http://blog.michaelckennedy.net/2010/01/30/building-windows-machines-in-amazon-ec2/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 23:44:05 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=100</guid>
		<description><![CDATA[In this article I&#8217;m going to give you a simple, step-by-step overview of how to create a Windows 2008 server image in Amazon&#8217;s Elastic Cloud Compute (EC2) infrastructure. Now I must admit I&#8217;d rather have found a good tutorial on The Internets or &#8230; <a href="http://blog.michaelckennedy.net/2010/01/30/building-windows-machines-in-amazon-ec2/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=100&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In this article I&#8217;m going to give you a simple, step-by-step overview of how to create a Windows 2008 server image in <a href="http://aws.amazon.com/ec2/" target="_blank">Amazon&#8217;s Elastic Cloud Compute (EC2)</a> infrastructure. Now I must admit I&#8217;d rather have found a good tutorial on The Internets or even in a book. Feel free to send me any I missed. My experience is they are either dated or about Linux and so on&#8230;</p>
<p>First, briefly why does one care about EC2? Well maybe you are buying into the whole cloud computing story which lets you cheaply out-source your computer hardware for amazingly cheap prices (staring around $0.20 / hour for a dedicated machine). That&#8217;s a great reason and <a href="http://www.microsoft.com/windowsazure/" target="_blank">Microsoft</a> and <a href="http://code.google.com/appengine/" target="_blank">Google</a> have interesting plays there too.</p>
<p>Personally I just want a simpler way to create virtual machines. We&#8217;ll have full admin access over remote desktop to our system to install whatever we want. I&#8217;m putting Visual Studio 2010 Beta on mine to play around with that software without &#8217;polluting&#8217; my real system.</p>
<p>Here we go. If you don&#8217;t delay I suspect this would take you about 20 minutes from start to login! Subsequent virtual machines are much faster to create and launch because the can be based on pre-configured images.</p>
<h3>1. Create an Account</h3>
<p>Register for an Amazon Web Services account at <a href="http://aws.amazon.com/" target="_blank">http://aws.amazon.com/</a>.</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/01-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net//blog/content/binary/EC2/01-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<p><span id="more-100"></span></p>
<h3>2. Enable EC2 Features</h3>
<p>Enable Elastic Compute Cloud for your AWS account at <a href="http://aws.amazon.com/ec2/" target="_blank">http://aws.amazon.com/ec2/</a>.</p>
<p><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/02-EC2-AWS-Management-Console.png" alt="" /></p>
<h3>3. Launch a New Instance</h3>
<p>Use the AWS Management Console to launch and manage your virtual images: <a href="http://aws.amazon.com/ec2/home" target="_blank">http://aws.amazon.com/ec2/home</a>. As the console says, choose &#8220;Launch Instance&#8221; under the &#8220;Getting Started&#8221; section. You will be presented with a list of pre-configured images. We&#8217;ll start with a stock Amazon Windows 2008 server image.</p>
<p><img title="" src="http://www.michaelckennedy.net//blog/content/binary/EC2/03-EC2-AWS-Management-Console.png" alt="" /></p>
<h3>4. Choose a Base Image</h3>
<p>Now you&#8217;ll be presented with a list of pre-configured virtual disk images. This time we&#8217;ll setup a 64-bit Windows 2008 Server (Data Center Edition). Just choose &#8220;select&#8221; out of the list below:</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/04-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/04-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>5. Use the Request Instances Wizard</h3>
<p>Use the Request Instances Wizard to configure the newly created instance which includes configuring the security, choosing an encryption key, opening ports in the firewall, and kicking off the new instance. Below you&#8217;ll see the encryption key step &#8211; be sure to download the key pair as you&#8217;ll need it for retrieving the administrator password.</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/05-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/05-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>6. Launch!</h3>
<p>Here&#8217;s what you can expect for the review screen of the Request Instances Wizard. Press launch and you&#8217;re almost there.</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/06-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/06-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>7. Launching&#8230; (AKA Wait 5 Minutes)</h3>
<p>After you launch you&#8217;re instance you&#8217;ll get a confirmation screen to<br />
show you it&#8217;s being prepared and allow you to configure durable storage<br />
and IP addresses (both entirely optional).</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/07-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/07-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>8. Back to the Management Console</h3>
<p>Now if you choose &#8220;View your instances&#8230;&#8221; you&#8217;ll see that your instance is being prepared &#8211; it has a yellow pending status. This screen doesn&#8217;t always refresh on its own so use the refresh button in the upper right of the console (rather than your browser&#8217;s refresh button).</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/08-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/08-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>9. Running!</h3>
<p>After a few minutes your instance with the yellow icon will turn green and be in the running state. Note that at first this really means booting up so you can&#8217;t get to it right away. Give it another minute or two&#8230;</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/09-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/09-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>10. Login Part 1: Getting the Credentials</h3>
<p>Now you&#8217;ll want to login. Of course, the system was created with an administrator account which has a strong password. You&#8217;ll need to retrieve that password using the &#8220;Instance Actions -&gt; Get Windows Admin Password&#8221; option.</p>
<p><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/10-EC2-AWS-Management-Console.png" alt="" /></p>
<h3>11. Login Part 2: A Little Hasty</h3>
<p>You&#8217;re probably excited to get this thing running and if you try right away you&#8217;ll get another message telling you to be patient and try again in a few minutes. Just keep trying.</p>
<p><a target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/11-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>12. Login Part 3: Using Private Key</h3>
<p>Eventual the new system is up and running and you can get the password. The first step here is to pass in your encryption key from the wizard step before.</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/12-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/12-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>13. Login Part 4: Administrator Account and Password</h3>
<p>Pass in the encryption keys and you&#8217;ll see the username and password (don&#8217;t get excited, I already changed the password!).</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/13-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/13-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>14. Login Part 5: Finding the Machine Address</h3>
<p>When your instance starts, it&#8217;ll be given an Internet visible DNS name that you can use to connect via Remote Desktop. You&#8217;ll find it in several places. One of them is highlighted below. Note that this address changes as you start and stop your instance.</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/14-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/14-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>15. Connected!</h3>
<p>Now just fire up Remote Desktop, use the Administrator account and password from step 13 to log in. Now you have full access to your Windows 2008 machine. You can do with it what you will, install software, start serving web pages, etc.</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/EC2/15-EC2-AWS-Management-Console.png" target="_blank"><img title="" src="http://www.michaelckennedy.net/blog/content/binary/EC2/15-EC2-AWS-Management-Console-thumb.png" alt="" border="0" /></a></p>
<h3>16. A Word of Caution</h3>
<p>If your intent is to run a web server, then let it run. But if you are just using this for your own purposes and don&#8217;t need it when you&#8217;re not logged in to the machine, be sure to return to the Management Console and stop the instance. You can alternatively do that by choosing &#8220;Shutdown&#8221; instead of logging out of your Remote Desktop instance.</p>
<p>I hope you found this walk-through helpful. I just learned most of this myself so I figured I&#8217;d blog it and everyone can learn from it.</p>
<p>Cheers!<br />
Michael</p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/cloud/'>Cloud</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/cloud/'>Cloud</a>, <a href='http://blog.michaelckennedy.net/tag/ec2/'>EC2</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=100&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2010/01/30/building-windows-machines-in-amazon-ec2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net//blog/content/binary/EC2/01-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/02-EC2-AWS-Management-Console.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net//blog/content/binary/EC2/03-EC2-AWS-Management-Console.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/04-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/05-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/06-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/07-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/08-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/09-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/10-EC2-AWS-Management-Console.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/11-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/12-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/13-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/14-EC2-AWS-Management-Console-thumb.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/EC2/15-EC2-AWS-Management-Console-thumb.png" medium="image" />
	</item>
		<item>
		<title>Azure Interview on SearchCloudComputing.com</title>
		<link>http://blog.michaelckennedy.net/2010/01/04/azure-interview-on-searchcloudcomputing-com/</link>
		<comments>http://blog.michaelckennedy.net/2010/01/04/azure-interview-on-searchcloudcomputing-com/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 23:51:52 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=106</guid>
		<description><![CDATA[Rob Barry and Jack Vaughan interviewed me for their article on SearchCloudComputing.com entitled Azure cloud on horizon: The devil is in the data architecture details Here&#8217;s a small excerpt. If you&#8217;re interested in Windows Azure and Cloud Computing, read on&#8230; Microsoft &#8230; <a href="http://blog.michaelckennedy.net/2010/01/04/azure-interview-on-searchcloudcomputing-com/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=106&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Rob Barry and Jack Vaughan interviewed me for their article on <a href="http://SearchCloudComputing.com" target="_blank">SearchCloudComputing.com</a> entitled</p>
<p><em><strong><a href="http://searchcloudcomputing.techtarget.com/news/article/0,289142,sid201_gci1361433,00.html" target="_blank">Azure cloud on horizon: The devil is in the data architecture details</a></strong></em></p>
<p>Here&#8217;s a small excerpt. If you&#8217;re interested in Windows Azure and Cloud Computing, <a href="http://searchcloudcomputing.techtarget.com/news/article/0,289142,sid201_gci1361433,00.html" target="_blank">read on&#8230;</a></p>
<blockquote><p>Microsoft did a good job when they designed Azure, according to Kennedy. &#8220;The company encourages you to build scalable reliable systems by basically making it really hard to do the stuff that makes systems unreliable,&#8221; he said.</p>
<p>There are many developers curious about cloud computing, but most are being rather cautious. Directions on Microsoft&#8217;s Sanfilippo said he&#8217;s talked to more developers that are concerned about building on top of their existing work than re-coding everything to work in the cloud.</p>
<p>&#8220;There&#8217;s still an education bit that has to happen about what kind of applications are appropriate for Azure. But I think there&#8217;s a lot of curiosity about Azure,&#8221; Kennedy said.</p>
<p>Still, he continued, &#8220;I don&#8217;t know many projects that are betting the bank on Azure yet.&#8221;</p></blockquote>
<p>Note: This is a little dated as it was publish in July 2009 &#8211; some how I missed the original publication &#8211; but it&#8217;s still an interesting read.</p>
<p>Thanks Rob and Jack for the article and conversation.</p>
<br />Posted in Cloud Tagged: Azure, Cloud <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=106&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2010/01/04/azure-interview-on-searchcloudcomputing-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Article: 10 Features in .NET 4.0 that made Me Smile</title>
		<link>http://blog.michaelckennedy.net/2009/12/16/10-features-in-net-4-0-that-made-me-smile/</link>
		<comments>http://blog.michaelckennedy.net/2009/12/16/10-features-in-net-4-0-that-made-me-smile/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 23:54:05 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=108</guid>
		<description><![CDATA[I recently wrote another article for DevelopMentor&#8216;s Developments newsletter (not subscribed yet? see top-right of this page). This one is entitled 10 Features in .NET 4.0 that made Me Smile Read it on the DevelopMentor website: http://www.develop.com/tenfeaturesdotnet4 I am republishing &#8230; <a href="http://blog.michaelckennedy.net/2009/12/16/10-features-in-net-4-0-that-made-me-smile/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=108&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently wrote another article for <a href="http://develop.com" target="_blank">DevelopMentor</a>&#8216;s Developments newsletter (not subscribed yet? see top-right of <a href="http://www.develop.com/" target="_blank">this page</a>). This one is entitled</p>
<p><em><a href="http://www.develop.com/tenfeaturesdotnet4" target="_blank">10 Features in .NET 4.0 that made Me Smile</a></em></p>
<p>Read it on the DevelopMentor website: <a href="http://www.develop.com/tenfeaturesdotnet4" target="_blank">http://www.develop.com/tenfeaturesdotnet4</a></p>
<p>I am republishing it below for you all to enjoy on your RSS readers.</p>
<p>Cheers,<br />
Michael</p>
<hr size="2" width="100%" />
<h2>10 Features in .NET 4.0 that made Me Smile</h2>
<p>I have been reviewing some of our upcoming classes at DevelopMentor this week. One of those classes, <a href="http://www.develop.com/course/whats-new-in-dotnet" target="_blank">What’s New in .NET 4.0</a>, left me excited for things to come. There are a bunch of small but wonderful features discussed in that class. I thought I’d take this opportunity to write a few of them up and share the joy. I bet some of them make you smile too.</p>
<p><span id="more-108"></span></p>
<ol>
<li><em><strong>The Parallel Extensions for The .NET Framework will be built into mscorlib.dll.<br />
</strong></em>  The fact that PFx will be part of the core .NET library says a lot about how much faith and support it’s getting within Microsoft. BTW, here are some really great demos for <a href="http://blogs.msdn.com/pfxteam/archive/2009/12/09/9934811.aspx" target="_blank">PFx in .NET 4.0</a>.</li>
<li><em><strong>PFx introduces a new threading construct: Barrier.<br />
</strong></em>  Barrier lets you define rendezvous points in your code where multiple concurrent  operations can automatically sync-up. <a href="http://msdn.microsoft.com/en-us/library/dd537615%28VS.100%29.aspx" target="_blank">Here’s an example</a>.</li>
<li><em><strong>Code contracts.</strong></em><br />
Code contracts allow you to assert truths about your code as if you are writing a unit test. But these assertions live within your production code and are both verified by the compiler as well as the runtime. Here’s the <a href="http://research.microsoft.com/en-us/projects/contracts/" target="">original research project</a> that lead to this feature on Microsoft Research.</li>
<li><em><strong>The WPF and Silverlight designers mostly work.</strong></em>Now this shouldn’t be a point to make me smile or get excited about, but it is. The pain and suffering around the Visual Studio support for WPF and Silverlight designers has been so bad that a mostly-working, and sometimes truly innovative design-time experience within Visual Studio gives me real hope for these technologies. I’m actually excited about them now.</li>
<li><em><strong>Support for the MVVM pattern across both WPF and Silverlight.<br />
</strong></em>Speaking of that XAML stuff, if you write WPF or Silverlight code and don’t know MVVM, stop reading this article and <a href="http://msdn.microsoft.com/en-us/magazine/dd419663.aspx" target="_blank">learn about it here</a>. I’ll wait. Ok, now you too should be excited to hear that there is improved support for MVVM across Silverlight and WPF in a unified way. Smiles baby!</li>
<li><em><strong>WF (Windows Workflow Foundation) has an AsyncCodeActivity class.<br />
</strong></em>While WF has traditionally supported both synchronous (activities that execute immediately) and asynchronous activities (for long running senarios where the workflow becomes idle and is unloaded from memory [<a href="http://msdn.microsoft.com/en-us/magazine/dd296718.aspx" target="_blank">click here for more details</a>]),  there has been an unserved middle ground. If you want to use threading in your activity and allow the workflow to go idle without it being unloaded from memory you were basically out of luck. This is the problem solved by the AsyncCodeActivity. WF 4 now has a class which has a BeginExecute / EndExecute pair of methods which much more closely models the regular .NET async design patterns.</li>
<li><em><strong>WF has a rehostable designer (really, they mean it this time).<br />
</strong></em>There are some great uses for giving regular users a WF designer experience with the right granularity of activities. Now it’s much easier. Here’s an app that rehosts the designer:<img src="http://www.michaelckennedy.net/blog/content/binary/designer-code.png" alt="" /></li>
<li> <em><strong>Configuration-free WCF Hosting.<br />
</strong></em>Hosting WCF services is now like hosting ASMX web services if you like the defaults. Just throw out a service + contract + address and it’s up and running. That’ll save a bunch of configuration goo. Smiles!</li>
<li><em><strong>No more *.svc in our RESTful urls in IIS.<br />
</strong></em>With the <a href="http://www.michaelckennedy.net/blog/2009/12/09/ASPNETWebFormsRoutingVideoAndDownloads.aspx" target="_blank">ASP.NET routing framework</a> and WCF REST introduced in .NET 3.5, we can create beautiful, expressive Uri’s for our websites. For example:<a href="http://lookatthiswith.me/watch/intro" target="_blank">http://lookatthiswith.me/watch/intro</a>But this falls apart with WCF REST when we host it in IIS. Our service Uri’s look like this:<br />
<a href="http://lookatthiswith.me/services/lookieservice.svc/lookup/json/cf7" target="_blank"><br />
http://lookatthiswith.me/services/lookieservice.svc/lookup/json/cf7</a>And now we have this ugly .svc part-way through our Uri! Ick. Well, in .NET 4 that<br />
Uri is much more customizable and the .svc is gone. Smiles!</li>
<li><em><strong>ASP.NET MVC has wicked JavaScript support.<br />
</strong></em>JQuery is there by default. That’s awesome. But there is also a class similar to the Html class (for HTML helpers) called Ajax. This static class has functions like Ajax.ActionLink and effectively brings the functionality of UpdatePanel to MVC!</li>
</ol>
<p>Well there you have it. 10 awesome things in .NET 4 that made me smile this week. I hope you find some to be welcome additions yourself! If you want to learn more about .NET 4.0,  check out our recorded webcasts here: <a href="http://www.develop.com/dotnet4webcasts" target="_blank">http://www.develop.com/dotnet4webcasts</a>. Also have a look at my article from last month <a href="//www.michaelckennedy.net/blog/2009/11/12/SixThingsThatllSurpriseYouAboutNET40.aspx" target="_blank">Six Things That’ll Surprise You About .NET 4.0</a>. Finally, if you have some training funds laying around, I’d love to spend a week talking about these ideas with you in our <a href="http://www.develop.com/course/whats-new-in-dotnet" target="_blank">What’s New in .NET 4.0 What’s New in .NET 4.0 class.</a></p>
<p>Michael Kennedy is an instructor for DevelopMentor where he specializes in core .NET technologies as well as agile and TDD development methodologies. Keep up with Michael via his Web site and blog at <a href="http://www.michaelckennedy.net" target="_blank">http://www.michaelckennedy.net</a> or on Twitter: <a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a>.</p>
<br />Posted in Articles, DevelopMentor Tagged: .NET <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=108&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/12/16/10-features-in-net-4-0-that-made-me-smile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/designer-code.png" medium="image" />
	</item>
		<item>
		<title>ASP.NET WebForms + Routing Video and Downloads</title>
		<link>http://blog.michaelckennedy.net/2009/12/09/asp-net-webforms-routing-video-and-downloads/</link>
		<comments>http://blog.michaelckennedy.net/2009/12/09/asp-net-webforms-routing-video-and-downloads/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 00:00:54 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Screencasts]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=114</guid>
		<description><![CDATA[I recently did a webcast for DevelopMentor on using the routing framework introduced in  ASP.NET MVC within ASP.NET WebForms based applications to build more modern websites without a major rewrite of existing web applications. The talk was called &#8220;Building Modern &#8230; <a href="http://blog.michaelckennedy.net/2009/12/09/asp-net-webforms-routing-video-and-downloads/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=114&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently did a webcast for <a href="http://develop.com" target="_blank">DevelopMentor</a> on using the routing framework introduced in  ASP.NET MVC within ASP.NET WebForms based applications to build more modern websites without a major rewrite of existing web applications. The talk was called &#8220;<em>Building Modern Websites with ASP.NET WebForms</em>&#8220;.</p>
<p>Here&#8217;s all the related downloads. We had some microphone troubles so I want to  apologize in advance for the sub-optimal sound quality.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/HvrGJObg-jc?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span><br />
<a title="Watch streaming video (WMV HQ)" href="http://www.develop.com/mkaspformsdownloads1" target="_blank"><img style="display:inline;border-width:0;" title="Watch streaming video (WMV HQ)" src="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/WmvIcon_3.png" alt="Watch streaming video (WMV HQ)" width="57" height="48" border="0" /></a>   <a title="Download WMV Video" href="http://www.develop.com/mkaspformsdownloads2" target="_blank"><img style="display:inline;border-width:0;" title="Download WMV Video" src="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/ZipIcon_9.png" alt="Download WMV Video" width="47" height="48" border="0" /></a><a title="Listen to MP3 Streaming" href="http://www.develop.com/mkaspformsdownloads3" target="_blank"><img style="display:inline;border-width:0;" title="Listen to MP3 Streaming" src="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/Mp3Icon_5.png" alt="Listen to MP3 Streaming" width="43" height="48" border="0" /></a><a title="Download MP3" href="http://www.develop.com/mkaspformsdownloads4" target="_blank"><img style="display:inline;border-width:0;" title="Download MP3" src="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/ZipIcon_10.png" alt="Download MP3" width="47" height="48" border="0" /></a></p>
<p>You can also download the <a href="http://www.develop.com/media/pdfs/Kennedy-Modern-WebForms-AspNet-2009-11-23.pdf" target="_blank">slides</a> and <a href="http://www.develop.com/mkaspformsdownloads5" target="_blank">peepleocity.com sample website</a> built during the presentation.</p>
<br />Posted in DevelopMentor Tagged: ASP.NET, Screencasts <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/114/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/114/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/114/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=114&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/12/09/asp-net-webforms-routing-video-and-downloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/WmvIcon_3.png" medium="image">
			<media:title type="html">Watch streaming video (WMV HQ)</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/ZipIcon_9.png" medium="image">
			<media:title type="html">Download WMV Video</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/Mp3Icon_5.png" medium="image">
			<media:title type="html">Listen to MP3 Streaming</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/ZipIcon_10.png" medium="image">
			<media:title type="html">Download MP3</media:title>
		</media:content>
	</item>
		<item>
		<title>Webcast: Building Modern Apps in ASP.NET WebForms</title>
		<link>http://blog.michaelckennedy.net/2009/11/05/webcast-building-modern-apps-in-asp-net-webforms/</link>
		<comments>http://blog.michaelckennedy.net/2009/11/05/webcast-building-modern-apps-in-asp-net-webforms/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 01:48:40 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=122</guid>
		<description><![CDATA[At DevelopMentor we have been running a bunch of free webcasts. Last month it was  TDD and Agile. This month we are running 4 webcasts celebrating the announcements  around .NET 4.0, Visual Studio 2010, and PDC 2009. Join me Monday, &#8230; <a href="http://blog.michaelckennedy.net/2009/11/05/webcast-building-modern-apps-in-asp-net-webforms/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=122&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.develop.com/" target="_blank">DevelopMentor</a> we have been running a bunch of <strong><em>free</em></strong> webcasts. Last month it was  <a href="http://www.michaelckennedy.net/blog/2009/11/05/TDDSpaceInvadersVideoAndDownloads.aspx" target="_blank">TDD and Agile</a>. This month we are running 4 webcasts celebrating the announcements  around .NET 4.0, Visual Studio 2010, and PDC 2009.</p>
<p>Join me Monday, November 23rd and <strong>register here:</strong></p>
<p><a title="http://bit.ly/aspwebforms" href="http://bit.ly/aspwebforms" target="_blank">http://bit.ly/aspwebforms</a></p>
<p>Note: This event is in the past, but you can watch the recording here:</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/HvrGJObg-jc?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>We’ll talk about integrating ASP.NET’s routing infrastructure into existing an ASP.NET WebForms application. This allows you to build SEO websites with URLs like</p>
<p><a href="http://dotnet.ubbuzz.com/tag/.NET+4.0" target="_blank">http://dotnet.ubbuzz.com/tag/.NET+4.0</a></p>
<p>while still taking advantage of all the productivity features of WebForms such as post-backs, controls, UpdatePanel, and so on.</p>
<p>We have room for a couple hundred more attendees so please register and be part of the fun. I promise lots of demos and some<a href="http://apolloideas.com/blog/archives/677" target="_blank">disdainful comments about PowerPoint</a>!</p>
<p>Share it with your friends (social, virtual, real, and other types) using the widgets below!</p>
<p><strong>ASP.NET MVC</strong>: What’s that, you’d rather hear about ASP.NET MVC, not this creaky old WebForms stuff? That’s Brock Allen’s talk: <a title="http://bit.ly/intromvc" href="http://bit.ly/intromvc" target="_blank">http://bit.ly/intromvc</a></p>
<p><strong>WF 4</strong>: Is WF 4 and visual programming your thing? Check out <a href="http://msmvps.com/blogs/theproblemsolver/default.aspx" target="_blank">Maurice de Beijer</a>’s WF 4 talk: <a title="http://bit.ly/meetwf4" href="http://bit.ly/meetwf4">http://bit.ly/meetwf4</a></p>
<p>New Parallel Extensions your thing: Check out <a href="http://andyclymer.blogspot.com/" target="_blank">Andy Clymer</a>’s PFX talk. (link to follow soon).</p>
<p>Cheers,<br />
Michael</p>
<br />Posted in Video Tagged: ASP.NET, Screencasts, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/122/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/122/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/122/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=122&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/11/05/webcast-building-modern-apps-in-asp-net-webforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>TDD Space Invaders Video and Downloads</title>
		<link>http://blog.michaelckennedy.net/2009/11/04/tdd-space-invaders-video-and-downloads/</link>
		<comments>http://blog.michaelckennedy.net/2009/11/04/tdd-space-invaders-video-and-downloads/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 01:51:41 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=124</guid>
		<description><![CDATA[Recently Llewellyn Falco and I did a webcast for DevelopMentor where we demonstrated some TDD techniques and introduced Approval Tests. We let the audience choose our project and they chose Space Invaders. It was all great fun. Now the videos &#8230; <a href="http://blog.michaelckennedy.net/2009/11/04/tdd-space-invaders-video-and-downloads/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=124&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently <a href="http://twitter.com/isidore_us" target="_blank">Llewellyn Falco</a> and I did a webcast for <a href="http://www.develop.com/" target="_blank">DevelopMentor</a> where we demonstrated some TDD techniques and introduced <a href="http://approvaltests.sourceforge.net/" target="_blank">Approval Tests</a>. We let the audience choose our project and they chose Space Invaders. It was all great fun. Now the videos and MP3 streams are online and available for download.</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/9NTY28oR5bw?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span><br />
<a title="Watch streaming video (WMV HQ)" href="http://www.michaelckennedy.com/Downloads/DevelopMentor/TDD-Falco-Kennedy-DevelopMentor-2009-10-27.wvx"><img style="display:inline;border-width:0;" title="Watch streaming video (WMV HQ)" src="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/WmvIcon_3.png" alt="Watch streaming video (WMV HQ)" width="57" height="48" border="0" /></a>   <a title="Download WMV Video" href="http://www.michaelckennedy.com/Downloads/DevelopMentor/TDD-Falco-Kennedy-DevelopMentor-2009-10-27.zip"><img style="display:inline;border-width:0;" title="Download WMV Video" src="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/ZipIcon_9.png" alt="Download WMV Video" width="47" height="48" border="0" /></a> <a title="Listen to MP3 Streaming" href="http://www.michaelckennedy.com/Downloads/DevelopMentor/TDD-Falco-Kennedy-DevelopMentor-2009-10-27.mp3" target="_blank"><img style="display:inline;border-width:0;" title="Listen to MP3 Streaming" src="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/Mp3Icon_5.png" alt="Listen to MP3 Streaming" width="43" height="48" border="0" /></a> <a title="Download MP3" href="http://www.michaelckennedy.com/Downloads/DevelopMentor/TDD-Falco-Kennedy-DevelopMentor-2009-10-27-mp3only.zip"><img style="display:inline;border-width:0;" title="Download MP3" src="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/ZipIcon_10.png" alt="Download MP3" width="47" height="48" border="0" /></a></p>
<p>Be sure to check out the write-up we did afterward where we talked about the tools and gave you a chance to try it for yourself:</p>
<p><a href="http://www.michaelckennedy.net/blog/2009/10/28/TDDInvadesSpaceInvaders.aspx" target="_blank">TDD Space Invaders Write-up</a></p>
<p>You can also watch two other, higher level agile webcasts by Bill Nazzaro here:</p>
<p><a href="http://www.develop.com/agilewebinars" target="_blank">Agile Webcasts at DevelopMentor</a></p>
<p>Cheers!<br />
Michael</p>
<br />Posted in Video Tagged: ASP.NET, DevelopMentor, Screencasts, unit testing, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=124&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/11/04/tdd-space-invaders-video-and-downloads/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.michaelckennedy.com/Downloads/DevelopMentor/TDD-Falco-Kennedy-DevelopMentor-2009-10-27.wvx" length="166" type="video/x-ms-wvx" />
<enclosure url="http://www.michaelckennedy.com/Downloads/DevelopMentor/TDD-Falco-Kennedy-DevelopMentor-2009-10-27.mp3" length="48182017" type="audio/mpeg" />
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/WmvIcon_3.png" medium="image">
			<media:title type="html">Watch streaming video (WMV HQ)</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/ZipIcon_9.png" medium="image">
			<media:title type="html">Download WMV Video</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/Mp3Icon_5.png" medium="image">
			<media:title type="html">Listen to MP3 Streaming</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/WindowsLiveWriter/TDDSpaceInvadersVideoandDownloads_F36E/ZipIcon_10.png" medium="image">
			<media:title type="html">Download MP3</media:title>
		</media:content>
	</item>
		<item>
		<title>TDD Invades Space Invaders</title>
		<link>http://blog.michaelckennedy.net/2009/10/28/tdd-invades-space-invaders/</link>
		<comments>http://blog.michaelckennedy.net/2009/10/28/tdd-invades-space-invaders/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 01:53:54 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=127</guid>
		<description><![CDATA[A joint post by Llewellyn Falco and Michael Kennedy [Update: Get the videos and additional downloads for this webcast.] As a follow-up to our &#8220;Avoiding 5 Common Pitfalls in Unit Testing&#8221; article we did a webcast where we took a problem &#8230; <a href="http://blog.michaelckennedy.net/2009/10/28/tdd-invades-space-invaders/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=127&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A joint post by Llewellyn Falco and Michael Kennedy</p>
<p>[Update: Get <a href="http://www.michaelckennedy.net/blog/2009/11/05/TDDSpaceInvadersVideoAndDownloads.aspx" target="_blank">the videos and additional downloads</a> for this webcast.]</p>
<p>As a follow-up to our &#8220;<a href="http://www.michaelckennedy.net/blog/2009/08/08/ArticleAvoiding5CommonPitfallsInUnitTesting.aspx">Avoiding 5 Common Pitfalls in Unit Testing</a>&#8221; article we did a webcast where we took a problem from the audience and solved it live and unrehearsed on stage. These kinds of performances are always a risk but that&#8217;s part of what makes them fun.</p>
<p>Of course, the question is could we have done it better? Here&#8217;s your chance to try it for yourself (details below).</p>
<p><strong>The Problem</strong>:</p>
<p>Our viewers chose to have us build the game <em><strong>Space Invaders</strong></em>. The first thing we had to do to sketch out a basic scenario we could implement. We started with a picture to remind what Space Invaders even was:</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/QuickOverviewWhiteBoardForSpaceInvaders.png" alt="" border="1" /></p>
<p>This was too big of a scenario for us to tackle in the allotted 40 minutes for programming. So then we started by creating a simpler scenario which we sketched out on the &#8220;whiteboard&#8221;:</p>
<p><span id="more-127"></span></p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/ReceiptForSpaceInvaders.png" target="_blank"><img src="http://www.michaelckennedy.net/blog/content/binary/ReceiptForSpaceInvaders_Thumb.png" alt="" border="1" /></a><br />
<a href="http://www.michaelckennedy.net/blog/content/binary/ReceiptForSpaceInvaders.png" target="_blank">Click for full size image.</a></p>
<p><strong><br />
Flushing Out the Scenario</strong>:</p>
<blockquote><p>In doing this, a couple of things were revealed about the game.</p></blockquote>
<p>First, we wanted to make the tank and aliens all be the same size so we could put them on a grid. But then we saw that our bullet wouldn&#8217;t fit that story, so we introduced the idea of relative sizes. We also realized that even though we drew the block, it was too complex for the first scenario and it would have to wait.</p>
<p>Notice that as we started writing the scenario in English, there are mistakes, irrelevancies, and problems with the order. This is OK. The thing to remember is that all of this was done for the sole purpose of creating a recipe for a scenario we could test. That scenario is the following:</p>
<pre class="brush: csharp">[TestMethod]
public void TestSimpleKill()
{
   // 1. Create a 15x10 board.
   // 2. Place a 3x2 tank at 1x8.
   // 3. Place a 2x2 alien at 7x3 heading west.
   // 4. tank shoots
   // 5. advance 4 turns
   // 6. not won
   // 7. advance
   // 8. win
}</pre>
<p>Now that we had the recipe, we could go about writing the code.</p>
<p>Here&#8217;s your chance to <strong>play at home</strong>!</p>
<ol>
<li>Set your timer to 40 minutes.</li>
<li>Create a new test project.</li>
<li>Paste that method above.</li>
<li>Translate the comments into code.</li>
</ol>
<p>If you believe there&#8217;s a better process, we invite you to try that as well.</p>
<p>We made it to step 4 during our presentation (download code below) and estimate another 15 minutes would have had the whole scenario done, tested, and well-factored.</p>
<p><strong>Stories vs. Requirements</strong> (stories win):</p>
<p>We&#8217;d like to point out a couple of things about the story. First, it was quick to write the story. We did it in 5 minutes. Second, it translates well to code because it has behavior and objects working together. Let&#8217;s compare that to the requirements that this story flushed-out.</p>
<table>
<tbody>
<tr>
<td>
<ul>
<li>Need a board</li>
<li>Boards should have width &amp; height</li>
<li>Boards contain game objects</li>
<li>Game objects have a witdth, height</li>
<li>Game objects have the ability to move each turn</li>
<li>Aliens move either left or right each turn</li>
<li>Bullets move either up or down each turn</li>
<li>Bullets are 1&#215;1</li>
<li>Tanks are 3&#215;2</li>
<li>Aliens are 2&#215;2</li>
<li>The game is not won until all the aliens are killed</li>
<li>The game is won if alll the aliens are killed</li>
<li>An Alien is killed if it is hit by a bullet</li>
<li>Tanks can fire</li>
<li>Firing with a tank creates a bullet going up from the space directly above the tank</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Now we want to point out that this requirements doc is much hard to understand than our story. For example, if you were to add more requirements (e.g. an alien also shoots) is that easy to determine whether we have complete requirements? It also takes much more effort to create and especially to tell if it is complete. People aren&#8217;t made to handle requirement documents well but we are story-telling machines. We embrace this in our coding techniques.</p>
<p>We&#8217;d also like to mention some of the tools discussed at the end.</p>
<p><strong>For remote collaboration we use</strong>:</p>
<p><a href="http://www.skype.com/" target="_blank">Skype </a>(audio / video)<br />
<a href="http://www.realvnc.com/" target="_blank">VNC </a>for screen keyboard sharing<br />
<a href="http://windows.microsoft.com/en-US/windows-vista/Remote-Desktop-Connection-frequently-asked-questions" target="_blank">RDP </a>(windows remote desktop) &#8212; requires Windows 2003/2008 server for pairing.</p>
<p><strong>Source Control</strong>:</p>
<p><a href="http://tortoisesvn.tigris.org/" target="_blank">TortoiseSVN<br />
</a><a href="http://code.google.com/p/tortoisegit/" target="_blank">TortoiseGit</a></p>
<p><strong>Developer Tools</strong>:</p>
<p><a href="http://www.jetbrains.com/resharper/" target="_blank">Resharper<br />
</a><a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/" target="_blank">CodeRush</a></p>
<p><strong>Testing Tools</strong>:</p>
<p><a href="http://msdn.microsoft.com/en-us/vstudio/default.aspx" target="_blank">MsTest</a> (in Visual Studio Professional and up)<br />
<a href="http://www.nunit.org/index.php" target="_blank">NUnit<br />
</a><a href="http://www.ncover.com/" target="_blank">NCover<br />
</a><a href="http://tortoisesvn.tigris.org/TortoiseIDiff.html" target="_blank">TortioseDiff<br />
</a><a href="http://approvaltests.com" target="_blank">Approvals Tests<br />
</a><a href="http://sourceforge.net/projects/approvaltests/files/" target="_blank">Approvals Tests</a> CodeRush add-in<br />
<a href="http://www.ayende.com/projects/rhino-mocks.aspx" target="_blank">Rhino Mock<br />
</a><a href="http://learn.typemock.com/index2/" target="_blank">TypeMock</a></p>
<p>If you try this scenario yourself, please leave a comment about your experience.</p>
<p>Download the code and slides from the webcast here:</p>
<p>Code: <a href="http://www.michaelckennedy.com/Downloads/DevelopMentor/TddWithLlewellynAndMichael.zip" target="_blank">TddWithLlewellynAndMichael.zip<br />
</a>   Slides <a href="http://www.michaelckennedy.com/Downloads/DevelopMentor/dmtdd.pdf" target="_blank">dmtdd.pdf<br />
</a></p>
<p>Cheers &#8212; <a href="http://twitter.com/mkennedy" target="_blank">Michael</a> and <a href="http://twitter.com/isidore_us" target="_blank">Llewellyn</a></p>
<br />Posted in Agile Tagged: .NET, agile, unit testing, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=127&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/10/28/tdd-invades-space-invaders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/QuickOverviewWhiteBoardForSpaceInvaders.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/ReceiptForSpaceInvaders_Thumb.png" medium="image" />
	</item>
		<item>
		<title>Attend My Live, Free TDD Webinar with Llewellyn Falco and Myself at 10am Tomorrow!</title>
		<link>http://blog.michaelckennedy.net/2009/10/26/attend-my-live-free-tdd-webinar-with-llewellyn-falco-and-myself-at-10am-tomorrow/</link>
		<comments>http://blog.michaelckennedy.net/2009/10/26/attend-my-live-free-tdd-webinar-with-llewellyn-falco-and-myself-at-10am-tomorrow/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 01:58:56 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=130</guid>
		<description><![CDATA[[Update: See the follow-up post here: TDD Invades Space Invaders] Tuesday, October 27, 2009 at 10am Pacific time Llewellyn Falco and I will be giving a live, unscripted, and no safety-net demonstration of Test Driven Development (TDD) as part of &#8230; <a href="http://blog.michaelckennedy.net/2009/10/26/attend-my-live-free-tdd-webinar-with-llewellyn-falco-and-myself-at-10am-tomorrow/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=130&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[Update: See the follow-up post here: <a href="http://www.michaelckennedy.net/blog/2009/10/28/TDDInvadesSpaceInvaders.aspx">TDD Invades Space Invaders</a>]</p>
<p>Tuesday, October 27, 2009 at <strong>10am Pacific time </strong><a href="http://twitter.com/isidore_us" target="_blank">Llewellyn Falco</a> and I will be giving a <em>live, unscripted, and no safety-net demonstration</em> of Test Driven Development (TDD) as part of the <a href="http://www.develop.com/" target="_blank">DevelopMentor</a> webinar series (this particular series is a 3-part series on Agile development).</p>
<p>We already have a bunch of attendees registered. But we have room for as many of you who are interested in agile and TDD. Sign up here:</p>
<p><a href="http://bit.ly/dm-tdd-m-and-l" target="_blank">http://bit.ly/dm-tdd-m-and-l</a></p>
<p>In addition to core TDD techniques, you will see how an amazing technique and set of tools designed by Llewellyn called <a href="http://approvaltests.sourceforge.net/" target="_blank">Approval Tests</a> makes writing tests as simple as verifying an image or text file. Tired of writing 50 lines of test code for every 50 lines of production code but you still want the power of TDD? You need to learn more about Approvals and we&#8217;ll demo that live tomorrow!</p>
<p>I hope to see you all online. Feel free to help me get the word out by tweeting this or shouting it (see icons below).</p>
<p>Cheers, Michael.</p>
<br />Posted in Agile Tagged: agile, DevelopMentor, Open Source, unit testing <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/130/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=130&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/10/26/attend-my-live-free-tdd-webinar-with-llewellyn-falco-and-myself-at-10am-tomorrow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Boot to VHD Screencast</title>
		<link>http://blog.michaelckennedy.net/2009/10/19/boot-to-vhd-screencast/</link>
		<comments>http://blog.michaelckennedy.net/2009/10/19/boot-to-vhd-screencast/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 02:01:03 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=132</guid>
		<description><![CDATA[WARNING: This is some advanced stuff. It&#8217;s not that hard, but you can break things that are hard to fix. So, there is no warranty express or implied. Windows 7 or Windows 2008 Server R2 are required. Have you heard &#8230; <a href="http://blog.michaelckennedy.net/2009/10/19/boot-to-vhd-screencast/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=132&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>WARNING</strong>: This is some advanced stuff. It&#8217;s not that hard, but you can break things that are hard to fix. So, there is no warranty express or implied. Windows 7 or Windows 2008 Server R2 are required.</p>
<p>Have you heard of the new feature in Windows 7 and Server 2008 R2 called Boot to VHD? It is amazing! But it&#8217;s one of those concepts that people hear about and think &#8220;hmm, interesting.&#8221; But when people see it in action it&#8217;s &#8220;OMG, I must have this!&#8221;</p>
<p>I recently had that experience myself and enough people asked me about it that I decided to do a quick (15 min) screencast how to setup a native boot to virtual hard drives.</p>
<p>If you want a great overview and step-by-step instructions, check out Scott Hanselman&#8217;s blog post:</p>
<p><a href="http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx" target="_blank">Less Virtual, More Machine &#8211; Windows 7 and the magic of Boot to VHD<br />
</a></p>
<p>If you want to see boot to VHD in action, then check out the video here:</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/RdDX9jeV8bQ?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p>Download Screencast: <a href="http://www.michaelckennedy.com/Downloads/videos/BootToVhdKennedyWalkthrough.zip" target="_blank">BootToVhdKennedyWalkthrough.zip</a> (158 MB)</p>
<br />Posted in Video Tagged: Screencasts, tips, Windows <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=132&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/10/19/boot-to-vhd-screencast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Article: Building a Twitter Application in .NET</title>
		<link>http://blog.michaelckennedy.net/2009/08/08/article-building-a-twitter-application-in-net/</link>
		<comments>http://blog.michaelckennedy.net/2009/08/08/article-building-a-twitter-application-in-net/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 02:10:50 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=138</guid>
		<description><![CDATA[I recently wrote an article for DevelopMentor&#8216;s Developments newsletter entitled Building a Twitter Application in .NET. You can read it at the DevelopMentor website: http://www.develop.com/twitternetapps I&#8217;ve republished here for my readers. Enjoy! Building a Twitter Application in .NET by Michael Kennedy (@mkennedy) &#8230; <a href="http://blog.michaelckennedy.net/2009/08/08/article-building-a-twitter-application-in-net/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=138&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently wrote an article for <a href="http://www.develop.com" target="_blank">DevelopMentor</a>&#8216;s Developments newsletter entitled <span style="text-decoration:underline;"><em>Building a Twitter Application in .NET</em></span>. You can read it at the DevelopMentor website:</p>
<p><a href="http://www.develop.com/twitternetapps" target="_blank">http://www.develop.com/twitternetapps</a></p>
<p>I&#8217;ve republished here for my readers. Enjoy!</p>
<hr size="1" />
<h3>Building a Twitter Application in .NET</h3>
<p>by Michael Kennedy (<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a>)<br />
<a href="http://www.michaelckennedy.net" target="_blank">http://www.michaelckennedy.net</a></p>
<p>Twitter has become one of the web&#8217;s hottest properties. It is a central part of mainstream news programs such as CNN&#8217;s Anderson Cooper 360, congressional debates, and talk shows. In fact, it grew at a rate of 1400% this past year [<a href="http://bit.ly/jG9BG" target="_blank">bit.ly/jG9BG</a>].</p>
<p>If your company wants to interact with your customers in a modern and engaging experience, you need to be on Twitter. In fact, if you have customers that really like or dislike you, they are probably talking about you on Twitter. You should be part of that conversation.</p>
<p>In this article, we will explore how to build a rich interactive experience on Twitter that goes beyond just creating a new Twitter account. We will build a .NET application that uses the Twitter API (a free service) alongside other cool technologies such as the WCF REST Starter Kit [<a href="http://bit.ly/v8mBb" target="_blank">http://bit.ly/v8mBb</a>] and LINQ to fully leverage the Twitter experience.</p>
<p><span id="more-138"></span></p>
<p>Whether you want to build a community around your brand or you want to build the next real-time, social community website like .NET Developer Buzz [<a href="http://dotnet.ubbuzz.com/" target="_blank">http://dotnet.ubbuzz.com/</a>], this article will cover the technologies required to get the job done.</p>
<p>If you want to download the sample application to follow along, you can get it here:</p>
<p><a href="http://www.michaelckennedy.com/Samples/SampleStatusUpdater.zip" target="_blank">http://www.michaelckennedy.com/Samples/SampleStatusUpdater.zip</a></p>
<p>While you&#8217;re at it, be sure to follow DevelopMentor on Twitter:</p>
<p><a href="http://twitter.com/DevelopMentor_" target="_blank">http://twitter.com/DevelopMentor_</a></p>
<h3>Let&#8217;s Start Small</h3>
<p>I will show you how to fully leverage the Twitter API, but many tasks can be accomplished using simpler tools and you may be better starting there. Let&#8217;s look at a few things that we can do without the Twitter API.</p>
<p><strong>Case 1.</strong> You want to display your latest Twitter messages on your website.</p>
<p>Your tweets[1], as they&#8217;re called, can be consumed as a simple RSS feed. So you may want to simply pull this feed into your website rather than digging into the Twitter API and consuming custom XML or JSON formats. An example of consuming Twitter in this fashion can be found on my website&#8217;s front page [<a href="http://www.michaelckennedy.net/" target="_blank">http://www.michaelckennedy.net/</a>].</p>
<p>To get your RSS feed, just visit your profile page and get the RSS tweet link, e.g. &#8221;RSS feed of mkennedy&#8217;s tweets&#8221; [<a href="http://bit.ly/guhZU" target="_blank">http://bit.ly/guhZU</a>]</p>
<blockquote><p><em>[1] Tweet &#8211; these are what the individual messages sent on  Twitter are called. If the name sounds weird, I&#8217;m sure you&#8217;ll get used to it. Remember that there was a time when Google was just a noun.</em></p></blockquote>
<p><strong>Case 2.</strong> You want to watch and manage multiple accounts at the same time.</p>
<p>Most Twitter clients only support a single user. But there are a couple of good<br />
tools that allow you to manage multiple accounts. My current favorite is one called<br />
bDule and you can get for free at <a href="http://www.sobees.com/bdule" target="_blank"></p>
<p>http://www.sobees.com/bdule</a>.</p>
<h3>Beyond the Small</h3>
<p>There are times when you want to do more than simply syndicate your Twitter stream. Let me give you an example. At DevelopMentor, we have had many instructors on Twitter talking about their own interests. But we didn&#8217;t have a corporate Twitter presence. We decided to create our corporate presence by pulling all our instructors individual tweets and rebroadcasting them from our DevelopMentor Twitter account:  <a href="http://twitter.com/dm_the_company" target="_blank">@</a><a href="http://twitter.com/DevelopMentor_" target="_blank">DevelopMentor_</a></p>
<p>We wanted to keep a sense of the original instructor who wrote the message, so we happend on an attribution. For example:</p>
<blockquote><p><em>&#8220;Software Transactional Memory is released! (via @mkennedy)</em></p></blockquote>
<p>and we wanted to do this in a flexible way. In short, we needed more functionality than Twitter provides.</p>
<p>There are actually three services that do this sort of thing and they looked promising.</p>
<p><a href="http://www.connecttweet.com/" target="_blank">http://www.connecttweet.com/</a><br />
<a href="http://www.grouptweet.com/" target="_blank">http://www.grouptweet.com/</a><br />
<a href="http://cotweet.com/" target="_blank">http://cotweet.com/</a></p>
<p>But in the end, nothing completely matched our requirements. So we decided to write our own application to publish everyone&#8217;s tweets under the DevelopMentor banner. There are few simple steps involved as well as a lot of details we won&#8217;t go into yet.</p>
<ol>
<li> Take a list of Twitter accounts and download everyone&#8217;s statuses.</li>
<li>Determine which messages we haven&#8217;t seen before.</li>
<li> Publish these new statuses under our corporate account.</li>
</ol>
<p>We can actually implement a simplistic version of this by continuing to use the public RSS feeds of the individual accounts in conjunction with a very handy Twitter API wrapper called TwitterooCore which you can find at <a href="http://rareedge.com/twitteroo/blog/" target="_blank">http://rareedge.com/twitteroo/blog/</a>.</p>
<h3>The Twitter API</h3>
<p>In practice, there is simply data missing from the RSS feed that we require as well as features missing from the Twitteroo Core that move us deeper into the Twitter API. One thing you may well miss is the ability to tie together conversations. For example if Bob says &#8220;hello&#8221; and Jerry says in reply &#8220;@bob Back at you!&#8221; Twitter tracks that Jerry replied to Bob and publishes this link in the stream. To get access to these types of features and many other optimizations, you&#8217;ll need to use the REST-based Twitter API.</p>
<p>The Twitter API is documented at  <a href="http://apiwiki.Twitter.com/" target="_blank">http://apiwiki.Twitter.com/</a></p>
<p>There you can do things like get the users tweets, if their tweets are public, by requesting:</p>
<p><a style="margin-left:40px;" href="http://twitter.com/statuses/user_timeline.xml?screen_name=mkennedy" target="_blank">http://twitter.com/statuses/user_timeline.xml?screen_name=mkennedy</a></p>
<p>What you get back to dependent on the requested format. Here we&#8217;re asking for XML (user_timeline.xml) but we can also get JSON, RSS, or ATOM.</p>
<p>Similarly, we can update our status by making a POST request to:</p>
<p><a style="margin-left:40px;" href="http://twitter.com/statuses/update.xml" target="_blank"> http://twitter.com/statuses/update.xml</a></p>
<p>Here again we have the four possible formats: XML, JSON, RSS, ATOM. However this</p>
<p>time we&#8217;re using a form post for the request to update the user status which is then in-turn returned as XML.</p>
<p>Great, we have this cool REST API based on loosely-typed GETs and POSTs. Should we program against it using fundamental .NET types such as WebRequest, WebClient, and similar classes? We could. But WebRequest is <span class="style2">so </span>.NET 1.0 (circa 2001). There is a much newer API on the verge of release from Microsoft: The REST Starter Kit [<a href="http://bit.ly/1IF3Ji" target="_blank">http://bit.ly/1IF3Ji</a>].</p>
<p>While this toolkit is generally geared towards building to RESTful WCF services, there&#8217;s also a great set of classes for building REST clients. We will use these classes to write our application. Let&#8217;s take a look at how we can use the Twitter API to write are simple application.</p>
<h3>The REST Starter Kit</h3>
<h4>Part 1 &#8211; Getting the users of tweets.</h4>
<p>We need to download the users messages as XML and convert them to .NET objects that we can consume our application. This is really straightforward because the REST Starter Kit as a cool feature to Visual Studio: &#8220;Paste XML as Types&#8221;. This feature will take an XML file and auto-generate types based on the inferred XML schema. In our case, the XML file we will use is returned from the user timeline.<br />
<a href="http://twitter.com/statuses/user_timeline.xml?screen_name=mkennedy" target="_blank"></p>
<p>http://twitter.com/statuses/user_timeline.xml?screen_name=mkennedy</a></p>
<p>Open a link in a web browser, choose view source, and copy some XML. Then go to Visual Studio, choose edit, Paste XML as Types. Of course you must have the REST Starter Kit installed for this to work.[2]</p>
<blockquote><p><em>[2] In my experience I ran into some errors deserializing the response from Twitter. See the <span class="style2">The Real World Intrudes</span></em> section at the end of the article if you run into difficulties.</p></blockquote>
<p>After generating our status related types, we can use the HttpClient class to download the statuses.</p>
<p>Listing 1.</p>
<pre class="brush: csharp">private static void GetStatuses(IEnumerable userNames)
{
    XmlSerializer serl = new XmlSerializer(typeof (statuses));
    serl.UnknownElement += delegate { };

    foreach (string name in userNames)
    {
        string url = string.Format(
            "http://twitter.com/statuses/user_timeline.xml?screen_name={0}",
            name);

        HttpClient client = new HttpClient(url);

        HttpResponseMessage response = client.Get();
        response.EnsureStatusIsSuccessful();

        string contents = response.Content.ReadAsString();
        Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(contents));
        statuses userStatuses = (statuses) serl.Deserialize(stream);

        if ( userStatuses.status.Length &gt; 0 )
        {
            Console.WriteLine( "@{0}'s latest tweet: {1}", name,userStatuses.status[0].text );
        }
        Console.WriteLine();
    }
}</pre>
<p>There are two main things happening in this code. We&#8217;re using the HttpClient class to download the web content associated with the given user&#8217;s timeline. Then we&#8217;re using the XmlSerializer in conjunction with the auto-generated XML-serializable types from the &#8220;Paste XML as Types&#8221; command. That&#8217;s all there is to it. The REST Starter Kit does most of the work for us.</p>
<h3>Part 2 &#8211; Checking for New Messages</h3>
<p>Now that we have all the statuses, we need to find the ones that we haven&#8217;t broadcasted from our main account and send them along to step 3. We won&#8217;t go into detail on how to track that. But you can imagine a simple database that facilitates a LINQ to SQL query like this:</p>
<p>Listing 2.</p>
<pre class="brush: csharp">public StatusUpdate[] FindRebroadcastableStatuses(StatusUpdate[] updates)
{
    return
        (from up in updates
         let neverPosted = up.User.LastPostBroadcasted == null
         let afterPostDate = up.Time &gt; up.User.LastPostBroadcasted
         where neverPosted || afterPostDate
         select up).ToArray();
}</pre>
<h3>Part 3 &#8211; Publishing the Statuses</h3>
<p>Now that we&#8217;ve gathered the statuses of our various users, it&#8217;s time to rebroadcast them to our community. We&#8217;re going back to the Twitter API to update our status. Again will use the HttpClient class and following the RESTful principle of using POST to add new items to a given URI. We will do an HTTP POST to our status to add a new message to the account.</p>
<p>Listing 3.</p>
<pre class="brush: csharp">private void UpdateStatus(string newStatus, long? replyToId)
{
    string url = "https://twitter.com/statuses/update.xml";

    HttpClient client = new HttpClient( url );
    client.TransportSettings.Credentials =
        new NetworkCredential( twitterUser, password );

    HttpUrlEncodedForm form = new HttpUrlEncodedForm();
    form.Add( "status", newStatus );
    if ( replyToId != null )
    {
        form.Add( "in_reply_to_status_id", replyToId.ToString() );
    }

    HttpContent content = form.CreateHttpContent();

    HttpResponseMessage message = client.Post( "", content );
    message.EnsureStatusIsSuccessful();
}</pre>
<p>This time we create an HTML form using the HttpUrlEncodedForm class. We set the status field to our new status. If this status as a response to a previous tweet then we add the in_reply_to_status_id so Twitter knows to add a &#8220;in reply to&#8230;&#8221; tag to the tweet.</p>
<p>And there you have it. Working with the Twitter REST API is really quite straightforward. If you use the REST Starter Kit it&#8217;s downright easy.</p>
<h3>The Real World Intrudes</h3>
<p>But wait a minute. This is reality and building bulletproof applications is never that simple. There are at least five significant gotchas you have to address in practice when working with Twitter and the REST Starter Kit.</p>
<p>1. There will be times when Twitter is unavailable. You have to be ready for crashes and other types of randomness.</p>
<p>Twitter is one of those sites that can barely handle the traffic it is receiving. With its 1400% growth, this isn&#8217;t getting much better. So you must program defensively and assume that many of your API requests will fail.</p>
<p>2. The Twitter API is a free service. By default, you are limited to a small number of requests per hour. Many of the limits are around 150 API calls / hour. You may need to carefully design your application to work within the limits. Some applications simply need more data than this permits. For example, .NET Dev Buzz [<a href="http://dotnet.ubbuzz.com/" target="_blank">http://dotnet.ubbuzz.com/</a>] has to track thousands of users. In that case, you will have to get your application white listed with Twitter. You can do that here:</p>
<p style="margin-left:40px;"><a href="http://twitter.com/help/request_whitelisting" target="_blank">http://twitter.com/help/request_whitelisting</a></p>
<p>3. The date-time format used by the Twitter API is not directly parseable in .NET. The format returned is in the format &#8220;Fri Feb 01 18:18:08 +0000 2008&#8243;. But if we change this to &#8220;Fri Feb 01 +0000 2008 18:18:08&#8243; it is parsable. So you might need to adjust these date-time values.</p>
<p>4. You will get 417 error codes when you try to talk to Twitter using the default configuration. The fix is not immediately apparent, but it is very simple. So if you see the following error:</p>
<blockquote><p><em>System.ArgumentOutOfRangeException: ExpectationFailed (417) is not one of the following: OK (200), Created (201), Accepted (202), NonAuthoritativeInformation (203), NoContent (204), ResetContent (205), PartialContent (206) at Microsoft.Http.HttpMessageExtensions.EnsuRESTatusIs()</em></p></blockquote>
<p>Just to set the following property: <strong>ServicePointManager.Expect100Continue = false</strong>;</p>
<p>5. &#8220;Paste XML as Types&#8221; doesn&#8217;t entirely work. For some reason, certain messages from Twitter are not deserializable to the types generated with this command. My experience was that I didn&#8217;t actually care about the data causing the problem. So I just removed that part of the generated type. You may have to subscribe to the XmlSerializer error events to prevent exceptions.</p>
<h3>Conclusions</h3>
<p>I hope you now have a greater appreciation for what you can do with Twitter and how it can help you build your brand or build engaging applications. We&#8217;ve used the REST Starter Kit to make it easy to consume the Twitter API. You&#8217;ve even seen some of the odd things that can go wrong and how to fix them. Don&#8217;t forget to download the sample application here:</p>
<p><a href="http://www.michaelckennedy.com/Samples/SampleStatusUpdater.zip" target="_blank"> http://www.michaelckennedy.com/Samples/SampleStatusUpdater.zip</a></p>
<p>Now get out there and build something cool.</p>
<br />Posted in Articles Tagged: .NET, Articles, DevelopMentor, REST, Twitter, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=138&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/08/08/article-building-a-twitter-application-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Article: Avoiding 5 Common Pitfalls in Unit Testing</title>
		<link>http://blog.michaelckennedy.net/2009/08/07/article-avoiding-5-common-pitfalls-in-unit-testing/</link>
		<comments>http://blog.michaelckennedy.net/2009/08/07/article-avoiding-5-common-pitfalls-in-unit-testing/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 02:05:53 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=135</guid>
		<description><![CDATA[Llewellyn Falco and I recently wrote an article for DevelopMentor&#8217;s Developments newsletter entitled Avoiding 5 Common Pitfalls in Unit Testing. You can read it at the DevelopMentor website: http://www.develop.com/testingpitfalls I&#8217;ve republished here for my readers. Enjoy! [Update: We have also &#8230; <a href="http://blog.michaelckennedy.net/2009/08/07/article-avoiding-5-common-pitfalls-in-unit-testing/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=135&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p>Llewellyn Falco and I recently wrote an article for DevelopMentor&#8217;s Developments newsletter entitled <span style="text-decoration:underline;"><em>Avoiding 5 Common Pitfalls in Unit Testing</em></span>.</p>
<p>You can read it at the DevelopMentor website:</p>
<p><a href="http://www.develop.com/testingpitfalls" target="_blank">http://www.develop.com/testingpitfalls </a></p>
<p>I&#8217;ve republished here for my readers. Enjoy!</p>
<p>[Update: We have also done a webcast demonstrating some of these ideas, which we wrote up here:</p>
<p><a href="http://www.michaelckennedy.net/blog/2009/10/28/TDDInvadesSpaceInvaders.aspx" target="_blank">http://www.michaelckennedy.net/blog/2009/10/28/TDDInvadesSpaceInvaders.aspx</a>]</p>
<hr size="1" />
</div>
<div>
<h3>Avoiding 5 Common Pitfalls in Unit Testing</h3>
<p>by <a href="http://blog.approvaltests.com/" target="_blank">Llewellyn Falco</a> and <a href="http://www.michaelckennedy.net/" target="_blank">Michael Kennedy</a></p>
<p>When I started out with unit tests, I was enthralled with the promise of ease and security that they would bring to my projects. In practice, however, the theory of sustainable software through unit tests started to break down. This difficulty continued to build up, until I finally threw my head back in anger and declared that</p>
</div>
<div>
<h3>&#8220;Unit Tests have become more trouble than they are worth.&#8221;</h3>
<p>So we stopped. Not all once, but over the months our unit tests died a quiet death. When tests would stop working, we just ignored them. When new features were reported, they were developed without unit testing. At first, it seemed great. We were able to move without the baggage of maintaining the old tests! But soon all the original problems of having a system without tests came back to us. Things keep breaking, deadlines were increasingly pushed back. Releases came with an extraordinary amount of stress, late nights &amp; weekends. The final straw came when we were forced to rush out an immediate update, and ended up taking down the company for 2 days straight. Our new motto became:</p>
<h3>&#8220;Unit Testing: you&#8217;re damned if you do, you&#8217;re damned if you don&#8217;t.&#8221;</h3>
<p>In the end, we decided that despite the hardship caused by maintaining unit tests, it just wasn&#8217;t feasible to operate without them. So we started down the road to re-incorporate testing into our software development process. As the months went by, however, we discovered that the hardships we remembered had not returned. Looking back, we realized that we had made many mistakes the first time around. The second time around we were smarter. So you, too, can enjoy the benefits of unit tests here are the 5 major pitfalls we encountered the first time around, and how you can avoid them.</p>
<p><span id="more-135"></span></p>
<h2>Pitfall #1: Tests are hard to maintain.</h2>
<p>Because tests were only there to service and support the production code, they became second class citizens. We would spend time carefully choosing method names, refactoring our code to keep our classes and methods small, and so on. But we never applied these same principles to our test code.</p>
<p>As a side-effect of adding back the old tests, we reviewed and cleaned them up with the same level of scrutiny we gave to our &#8220;real&#8221; code. Suddenly the tests were easier to maintain. While this should not be a surprise to anyone, it wasn&#8217;t util this moment that we realized why they had been so hard to maintain in the first place:</p>
<h3>Our tests were hard to maintain because we weren&#8217;t maintaining them.</h3>
<p>Solution: Going forward, we expect the same quality of code (or higher) in the unit tests as we do for our production code. That means</p>
<table width="500">
<tbody>
<tr>
<td>
<ul>
<li>We remove duplication</li>
<li>We carefully consider method names</li>
<li>We create convenience functions for testing features</li>
<li>We keep our methods short</li>
<li>We code-review our unit tests</li>
</ul>
</td>
</tr>
</tbody>
</table>
<h2>Pitfall #2: Tests are lot of work to write.</h2>
<p>We found that in order to test even simple things we would have to write lots of code to setup and execute the scenario. Even something simple like &#8220;create a new user, and receive welcome email&#8221; would turn into 40-50 lines of step by step instructions.</p>
<p>Not only was this a pain to write the 1st time, it became a nightmare to maintain. Little changes would mean re-reading those functions to detect if the test was failing because we broke something, or simply because we had changed something. Once that was discovered, we would then have to update the now out of sync test code.</p>
<p>The solution we actually found may surprise you. We found that writing out our tests in English and then translating each line into 1 line of code naturally created the appropriate levels of abstraction and readability.</p>
<p>For example, let&#8217;s consider testing the following scenario:</p>
<p>Who are you receiving the most email from?</p>
<ol>
<li>Create you &#8211; the user</li>
<li>Mike sends you 3 emails</li>
<li>Mary sends you 4 emails</li>
<li>Joan sends you 2 emails</li>
<li>Verify your greatest &#8220;emailer&#8221; is Mary</li>
</ol>
<p>This will naturally lead us to write the following test method and helper method:</p>
</div>
<div>
<pre class="brush: csharp">[TestFixture]
public class AccountTests
{
    private MockMailServer mockMailServer = new MockMailServer();

    [Test]
    public void WhoAreYouReceivingTheMostEmailFrom()
    {
        User you = User.CreateNew( "you" );
        User mike = SendEmailHelper( CreateUser( "mike" ), you, 3 );
        User mary = SendEmailHelper( CreateUser( "mary" ), you, 4 );
        User joan = SendEmailHelper( CreateUser( "joan" ), you, 2 );

        Assert.AreEqual( mary, you.GetGreatestEmailer() );
    }

    private User SendEmailHelper(User from, User to, int quantity)
    {
        for ( int i = 0; i &lt; quantity; i++ )
        {
            EMail mail = new EMail()
            {
                To = to,
                From = from,
                Body = "Sample",
                Subject = "test"
            };

            mail.SetFormat( Formats.Html );
            mockMailServer.Send( mail );
        }
        return from;
     }</pre>
<p>Notice that to a programmer, the lines of code in the <em><strong>WhoAreYouReceivingTheMostEmailFrom</strong></em><strong></strong> test are as easy to read as the lines of English were. We were naturally motivated to create the &#8220;SendEmailHelper&#8221; function because that was required by one-to-one correlation between the lines of English and the lines of test code. However, without that helper, our test would have become an unreadable rat&#8217;s nest. This also naturally removes some duplication, increases maintainability, and allows for some reuse of the test convenience functions. This won&#8217;t be the only test that requires us to send email; for example, we may want to test that we can find out to whom you sent the most email.</p>
<p>Let&#8217;s compare this to how our tests would look if we had just hacked out the scenario:</p>
<pre class="brush: csharp">[Test]
  public void WhoAreYouReceivingTheMostEmailFrom()
  {
      User you = User.CreateNew("you");
      User mike = CreateUser("mike");
      for (int i = 0; i &lt; 3; i++)
      {
          EMail mail = new EMail{To = you,From = mike, Body = "Sample", Subject = "test"};
          mail.SetFormat(Formats.Html);
          mockMailServer.Send(mail);
      }

      User mary = CreateUser("mary");
      for (int i = 0; i &lt; 4; i++)
      {
          EMail mail1 = new EMail{To = you,From = mary,Body = "Sample",Subject = "test"};
          mail1.SetFormat(Formats.Html);
          mockMailServer.Send(mail1);
      }

      User joan = CreateUser("joan");
      for (int i = 0; i &lt; 6; i++)
      {
          EMail mail2 = new EMail {To = you, From = joan,Body = "Sample",Subject = "test"};
          mail2.SetFormat(Formats.Html);
          mockMailServer.Send(mail2);
      }

      Assert.AreEqual(mary, you.GetGreatestEmailer());
      }</pre>
<p>Because we wrote the first version in English it&#8217;s also easier to detect a mistake. You may have noticed that the second example had a typo at line 31, making Joan the biggest emailer. In general long methods have the disadvantage of obscuring intent. Unfortunately the &#8216;follow a script&#8217; aspect of testing lends itself to writing long methods. By writing the tests in English and then doing a 1-to-1 conversion to code we can counter this vulnerability.</p>
<h3>Write the tests in English before you code them.</h3>
<h2>Pitfall #3: Adding a new feature breaks a lot of tests that I then need to adjust.</h2>
<p>I always dreaded adding new features because I knew it meant the existing tests were going to complain about the changes. It seemed like the tests themselves were resisting change to my system, rather than supporting it. As I made changes and the tests broke, I was always trying to figure out if those changes were &#8220;expected&#8221; because of the new feature, or unintended bugs I had introduced into my software.</p>
<p>Nowadays, we always <strong>prep the system for the new feature</strong>. This allows us to isolate &#8216;expected&#8217; changes from unintended bugs. Furthermore, once we have finished prepping for the new feature, we find it extremely easy to actually add that new feature. Best of all, if the unit test breaks now, we know it&#8217;s because of unexpected side effects of our changes.</p>
<p>This &#8216;prepping&#8217; period falls under the title of &#8216;refactoring&#8217; and requires the simple rule that during this stage you do not change the behavior, only the implementation. This sounds straight forward and simple, but in practice it requires a great deal of discipline.</p>
<p>Personally, I still find it a challenge to <strong>NOT</strong> fix a bug discovered during refactoring. I have to force myself to leave it alone and wait until I have finished refactoring before changing (Fixing) this behavior, but this discpline has paid off many, many times.</p>
<p>During this period, the support provided by your unit test suite really shines. Those tests allow me to rework my code with confidence. Afterwards the architecture in place has been custom designed to support the addition of this particular new feature, thus making its implementation quite straightforward. In our experience the &#8216;prepping&#8217; work tends to actually take more time than we spend adding the actual feature itself, but the total time to implement is much less.</p>
<p>By spliting the work into two phases, we can emphasize the fact that the unit tests are supporting the <em>existing system</em> allowing its architecture to evolve so that extending it does not become increasingly difficult.</p>
<p>Before I would ask myself &#8220;How can I add this new feature?&#8221; Now I ask &#8220;How can I make it so this new feature will be easy to add?&#8221;</p>
<h3>Prep the system for the new feature first.</h3>
<h2>Pitfall #4: When I change something a whole bunch of tests break even though I haven&#8217;t broken the system.</h2>
<p>There are many ways to solve the same problem. In the past, we tended to test a specific implementation of a solution instead of testing that we <strong>had</strong> a solution. Because we were focused on the specifics of implementation, changes to our solutions kept breaking our tests, even though we still had a valid solution. Moreover, because the tests were closely tied to implementation, rediscovering the intent and separating it in the tests became cumbersome. As we became more proficient at writing tests in English, we were able to create unit tests that described the expected behavior. This conveys a higher level of intent, and made the tests much less brittle.</p>
<p>Let&#8217;s look at an example:</p>
<pre class="brush: csharp">[Test]
  public void TestGatewayCallSuccessful()
  {
      var gateway = new Gateway {Mask = "ExampleCode.*"};
      var enviroment = new Dictionary();
      enviroment.Add("path", "ExampleCode.HelloWorld");
      string result = gateway.ExecuteRequest(enviroment);
      Assert.IsTrue(result.Contains("Hello World"));
  }

  [Test]
  public void TestGatewayBlocksInvalidMasks()
  {
      Assert.IsFalse(Gateway.IsValidForMask(
          "Example.*", "ExampleCode.HelloWorld"));

      Assert.IsFalse(Gateway.IsValidForMask(
              "ExampleCode.*.Extras.*", "ExampleCode.HelloWorld"));

      Assert.IsTrue(Gateway.IsValidForMask(
              "ExampleCode.*", "ExampleCode.HelloWorld"));
  }</pre>
<p>In this example, we wrote our second test <strong><em>TestGatewayBlocksInvalidMasks</em></strong> so we could easily test a few examples to make sure our implementation was correct. In doing so we exposed a method <em><strong>IsValidForMask</strong></em>, which was an implementation detail and was only made public in order to make testing easy and intentional. We did this because actually executing something to get the failure was much more involved as evidenced by the first test (<em><strong>TestGatewayCallSuccessful</strong></em>).</p>
<p>Let&#8217;s take a look at the specific solution we&#8217;ve come up with:</p>
<pre class="brush: csharp">public class Gateway : IRunner
  {
      public string Mask { get; set; }

      public String ExecuteRequest(Dictionary environment)
      {
          string path = environment["path"];
          AssertValidClass(path);
          IRunner instance =
                (IRunner)Activator.CreateInstance(Type.GetType(path));

          return instance.ExecuteRequest(environment);
       }

       private void AssertValidClass(string path)
       {
          if (!IsValidForMask(Mask, path))
          {
              throw new Exception(String.Format(
                    "Invalid Path '{0}' for Mask '{1}'", path, Mask));
          }
       }

       internal static bool IsValidForMask(String mask, String path)
       {
           mask = mask.Replace(".", "\\.").Replace("*", ".*");
           Regex regex = new Regex(mask);

           return regex.IsMatch(path);
       }
 }</pre>
<p>As we can see, even though we are only creating this gateway once each time a call to <em><strong>ExecuteRequest</strong></em> is made we have to recreate the regex expression (line 31 &amp; 32). It would be nice to do this just once. Let&#8217;s take a look at a more efficient solution:</p>
<pre class="brush: csharp">public class Gateway : IRunner
  {
      private string mask;
      private Regex regex;

      public string Mask
      {
         get { return mask; }
         set
         {
            mask = value;
            regex = new Regex( mask.Replace( ".", "\\." ).Replace( "*", ".*" ) );
         }
      }

      public String ExecuteRequest(Dictionary environment)
      {
           string path = environment["path"];
           AssertValidClass(path);
           IRunner instance = (IRunner) Activator.CreateInstance(Type.GetType(path));

           return instance.ExecuteRequest(environment);
       }

       private void AssertValidClass(string path)
       {
           if (!regex.IsMatch(path))
           {
               throw new Exception(String.Format("Invalid Path '{0}' for Mask '{1}'", path, Mask));
           }
       }
 }</pre>
<p>Unfortunately this refactoring breaks the first set of tests. Notice that the function we are calling no longer even exists. However, let&#8217;s look at what happens if we write our tests for the behavior rather than the implementation:</p>
<pre class="brush: csharp">[TestFixture]
  public class GatewayBehaviorTests
  {
     [Test]
     private void TestGatewayCallSuccessful()
     {
         string result = Run("ExampleCode.*", "ExampleCode.HelloWorld");
         Assert.IsTrue(result.Contains("Hello World"));
      }

      [Test]
      public void TestGatewayBlocksInvalidMasks()
      {
          AssertValidForMask(false, "Example.*", "ExampleCode.HelloWorld");
          AssertValidForMask(false, "ExampleCode.*.Extras.*", "ExampleCode.HelloWorld");
          AssertValidForMask(true, "ExampleCode.*", "ExampleCode.HelloWorld");
      }

      private static String Run(string mask, string path)
      {
          var gateway = new OptimizedGateway {Mask = mask};
          var enviroment = new Dictionary();
          enviroment.Add("path", path);
          string result = gateway.ExecuteRequest(enviroment);
          return result;
      }

      private void AssertValidForMask(
      bool exceptionExpected, string mask, string path)
      {
          Exception found = null;
          try
          {
             Run(mask, path);
          }
          catch (Exception ex)
          {
             found = ex;
          }
          Assert.AreEqual(exceptionExpected, found == null);
       }
}</pre>
<p>There are a few things to notice now:</p>
<table width="500">
<tbody>
<tr>
<td>
<ul>
<li>This test not only works for the new code, but the old code as well. This is because the behavior has not changed, just the implementation.</li>
<li>We have not sacrificed readability or clarity of intent. In fact the first test <em><strong>TestGatewayCallSuccessful </strong></em>has actually gained readability.</li>
<li>There is the introduction of helper methods in the unit test. We find that this is a side effect of writing tests for readability and intention.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>In the end, we realized there is a particular code smell for this problem.</p>
<h3>If a different implementation of a solution requires different tests, you are testing to the wrong level.</h3>
<h2>Pitfall #5: There are just too many possibilities to test</h2>
<p>When we first began unit testing, we felt that we had to test as many inputs as possible because we believed the purpose of the unit tests was to ensure complete quality of our code. What we have learned is that the world is not black and white, and neither is testing. It is not the case that we either have verified code or unverified code. There are levels of protection. In fact there is a level at which you get diminishing returns from new inputs and, surprisingly, that number is often very small.</p>
<p>For example: Imagine the following scenarios :</p>
<table>
<tbody>
<tr>
<td class="scenario" colspan="2">Scenario 1</td>
</tr>
<tr>
<td>You have a method</p>
<pre>public int doSomething(int a, int b) {/*...*/})</pre>
<p>Does this method work?</p>
<p>Will it blow up if I run it?</p>
<p>On a scale of 1-10 what is your confidence level?</p>
<p>&nbsp;</td>
<td>Confidence Level 2: In our case, our confidence started out at 2. All we know is that it compiled. <em>Any number of things could be wrong.</em>.</td>
</tr>
<tr>
<td class="scenario" colspan="2">Scenario 2</td>
</tr>
<tr>
<td>Now, assume you have an invocation of the method</p>
<pre>doSomething(2,3);</pre>
<p>When you run this, it does not crash although you have no way to check its result.</p>
<p>What&#8217;s your confidence level now?</td>
<td>Confidence Level 6:  As soon as it&#8217;s been executed, our confidence jumps up to a 6. We know that most bugs come from incorrect wiring, or null pointers, and so on. Now we know it&#8217;s not blowing up, but still don&#8217;t really know that it&#8217;s working</td>
</tr>
<tr>
<td class="scenario" colspan="2">Scenario 3</td>
</tr>
<tr>
<td>Now imagine that you have a test</p>
<pre>assertEquals(8, doSomething(2,3));</pre>
<p>This test passes.</p>
<p>What&#8217;s your confidence level now?</p>
<p>&nbsp;</td>
<td>Confidence Level 8:  Just a single confirmation pulls us all the way up to a confidence level of 8. Notice that we are still just at 1 test case. A few more and we&#8217;ll be in the 9&#8242;s, but how many more cases would you need to say with absolute confidence that this works? (hint: 2^32 * 2^32).</td>
</tr>
</tbody>
</table>
<p>Tests are like seatbelts: just because they won&#8217;t guarantee your survival in all crashes, it doesn&#8217;t mean you shouldn&#8217;t wear them. Take the extreme case of a motorcycle helmet. You are only protecting a small part of your body, but you are significantly improving the odds of survival if something goes wrong.</p>
<p>A general rule of thumb for the number of cases to tests is &#8220;<span style="font-size:small;">3</span> is a big number&#8221;.</p>
<ol>
<li>Test the happy path</li>
<li>Test an edge case</li>
<li>Test an error case, if you have one</li>
</ol>
<p>Start with the happy path. If you still are worried, try an edge case. Wait until a problem presents itself before you test further.</p>
<h3>Spend your time where it counts.</h3>
</div>
<br />Posted in Agile Tagged: Articles, DevelopMentor, Open Source, unit testing, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/135/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/135/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/135/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=135&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/08/07/article-avoiding-5-common-pitfalls-in-unit-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Keep up with DevelopMentor on Twitter</title>
		<link>http://blog.michaelckennedy.net/2009/07/23/keep-up-with-developmentor-on-twitter/</link>
		<comments>http://blog.michaelckennedy.net/2009/07/23/keep-up-with-developmentor-on-twitter/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 02:23:14 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=141</guid>
		<description><![CDATA[You may know that I work for DevelopMentor where I&#8217;m an instructor in the .NET curriculum (among other cool things I do there). You probably also know I&#8217;m kind of loopy for Twitter as evidenced by my Twitter page and &#8230; <a href="http://blog.michaelckennedy.net/2009/07/23/keep-up-with-developmentor-on-twitter/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=141&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.develop.com/media/images/DM_Twitter.png" alt="" align="right" /> You may know that I work for <a href="http://develop.com" target="_blank">DevelopMentor</a> where I&#8217;m an instructor in the .NET curriculum (among other cool things I do there). You probably also know I&#8217;m kind of loopy for Twitter as evidenced by my Twitter page and .NET community site driven by Twitter:</p>
<p><a href="http://twitter.com/mkennedy" target="_blank">http://twitter.com/mkennedy</a><br />
<a href="http://dotnet.ubbuzz.com/" target="_blank">http://dotnet.ubbuzz.com/</a></p>
<p>Today those two things came together in a big way. Introducing DevelopMentor&#8217;s Twitter presence:</p>
<p><strong>    @DevelopMentor_</strong><br />
<a href="http://twitter.com/developmentor_" target="_blank">http://twitter.com/developmentor_</a></p>
<p>I encourage you get out there and <strong>follow us</strong>! Here you will see all the combined Twitter messages of most of the DevelopMentor instructors as well as a couple of messages from DevelopMentor itself. You&#8217;ll get the chance to keep on top of the world as viewed by some of the smartest people I&#8217;ve had the chance to work with: the DM instructors! You&#8217;ll see which instructor posted any given message with an attribution at the end (either &#8220;via @marksm&#8221; or ^MS depending on the available space).</p>
<p>I&#8217;m excited about this not just because I think it is cool and useful (and has to do with Twitter <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ), but over the last few days I&#8217;m the guy who wrote the back-end systems to make this all go. It was a short but fun project. It&#8217;s a real testament to .NET that this was mostly written an hour.</p>
<p>After you follow @DevelopMentor_ you might want to interact with some of the instructors directly. Here&#8217;s our Twitter accounts in a single place for your reference:</p>
<blockquote><p><a href="http://twitter.com/bmaso" target="_blank">http://twitter.com/bmaso</a></p>
<p><a href="http://twitter.com/danamiga" target="_blank">http://twitter.com/danamiga</a></p>
<p><a href="http://twitter.com/jason_diamond" target="_blank">http://twitter.com/jason_diamond</a></p>
<p><a href="http://twitter.com/markblomsma" target="_blank">http://twitter.com/markblomsma</a></p>
<p><a href="http://twitter.com/marksm" target="_blank">http://twitter.com/marksm</a></p>
<p><a href="http://twitter.com/mauricedb" target="_blank">http://twitter.com/mauricedb</a></p>
<p><a href="http://twitter.com/mkennedy" target="_blank">http://twitter.com/mkennedy</a></p>
<p><a href="http://twitter.com/richardblewett" target="_blank">http://twitter.com/richardblewett</a></p>
<p><a href="http://twitter.com/tonysneed" target="_blank">http://twitter.com/tonysneed</a></p>
<p><a href="http://twitter.com/wallacekelly" target="_blank">http://twitter.com/wallacekelly</a></p></blockquote>
<p>I hope you enjoy the conversations we&#8217;re bound to have on Twitter. Come be part of it.</p>
<p>Signed: <a href="http://twitter.com/mkennedy">@mkennedy</a></p>
<br />Posted in DevelopMentor Tagged: DevelopMentor, Twitter <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=141&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/07/23/keep-up-with-developmentor-on-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.develop.com/media/images/DM_Twitter.png" medium="image" />
	</item>
		<item>
		<title>Gmail New Mail Notifications for Windows 7</title>
		<link>http://blog.michaelckennedy.net/2009/07/11/gmail-new-mail-notifications-for-windows-7/</link>
		<comments>http://blog.michaelckennedy.net/2009/07/11/gmail-new-mail-notifications-for-windows-7/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 02:24:52 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=143</guid>
		<description><![CDATA[[Update: Renamed this tool from Gmailer to Gmail 7 due to pre-exiting product name conflicts] I&#8217;ve been using Windows 7 as my sole operating system since Beta 1 in January. I&#8217;m completely loving it and I was pleased to see how &#8230; <a href="http://blog.michaelckennedy.net/2009/07/11/gmail-new-mail-notifications-for-windows-7/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=143&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[Update: Renamed this tool from Gmailer to Gmail 7 due to pre-exiting product name conflicts]</p>
<p>I&#8217;ve been using Windows 7 as my sole operating system since Beta 1 in January. I&#8217;m completely loving it and I was pleased to see how many apps worked seamlessly on it. One that didn&#8217;t and I really miss is <a href="http://toolbar.google.com/gmail-helper/notifier_windows.html" target="_blank">Gmail Notifier</a>. No matter how I try, I always get this:</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/gmail%20error.png" alt="" /></p>
<p>It&#8217;s insane to me that $130B company can&#8217;t provide any more than this outdated tool for this job, but I digress&#8230;</p>
<p>I&#8217;ve looked and looked for a replacement and they are either no longer online, are crappy applications, and so on. Finally I decided to take matters into my own hands. Introducing a clean, simple, unobtrusive, and free Gmail notification application that <strong>works on Windows 7</strong> &#8211; <em>Gmail 7</em>:</p>
<p><span id="more-143"></span></p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/GmailerSettings.png" alt="" /></p>
<p><em>Gmail 7</em> simply runs in your tray and plays the Windows new mail sound when mail comes in to your Gmail account.</p>
<p>New Mail:<br />
<img src="http://www.michaelckennedy.net/blog/content/binary/NewMailSnap.png" alt="" /></p>
<p>No New Mail:<br />
<img src="http://www.michaelckennedy.net/blog/content/binary/NoMailSnap.png" alt="" /></p>
<p>That&#8217;s pretty unobtrusive right? Your account info is encrypted and stored in your user profile and all network access uses SSL.</p>
<p>Download all 41 KB of Gmail 7 here: <a href="/Downloads/Tools/GMailer/GMail7.zip">Gmail7.zip</a><br />
<span style="font-size:xx-small;color:gray;">Requires .NET 2.0 (built into Vista and Windows 7)</span></p>
<p>Just extract the folder to its final resting place and run it &#8211; select &#8220;Launch at login&#8221; if you want that.</p>
<p>It even comes with some cool ways to view your email by double-clicking the tray icon.</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/GmailerLaunchOptinos.png" target="_blank"> <img src="http://www.michaelckennedy.net/blog/content/binary/GmailerLaunchOptions_small.png" alt="" border="0" /></a></p>
<p>Also thanks goes to <a href="http://ryanscook.com/adminsBlog/2005/05/c-net-gmail-tools_26.html">Ryan Cook</a> for use of his Gmail C# tools as the basis for part of my project.</p>
<br />Posted in Tools Tagged: Google, Tools, Windows <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=143&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/07/11/gmail-new-mail-notifications-for-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/gmail%20error.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/GmailerSettings.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/NewMailSnap.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/NoMailSnap.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/GmailerLaunchOptions_small.png" medium="image" />
	</item>
		<item>
		<title>ASP.NET Routing in Windows Azure Using WebForms</title>
		<link>http://blog.michaelckennedy.net/2009/05/07/asp-net-routing-in-windows-azure-using-webforms/</link>
		<comments>http://blog.michaelckennedy.net/2009/05/07/asp-net-routing-in-windows-azure-using-webforms/#comments</comments>
		<pubDate>Fri, 08 May 2009 02:28:11 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=145</guid>
		<description><![CDATA[[Update: If you are using ASP.NET 4 and .NET 4, Microsoft has added direct, built-in support into the Page class (the foundational class for WebForms pages). See Scott Guthrie's post on this topic: URL Routing with ASP.NET 4 Web Forms &#8230; <a href="http://blog.michaelckennedy.net/2009/05/07/asp-net-routing-in-windows-azure-using-webforms/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=145&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>[<strong>Update</strong>: If you are using ASP.NET 4 and .NET 4, Microsoft has added direct, built-in support into the Page class (the foundational class for WebForms pages). See Scott Guthrie's post on this topic: <a href="http://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspx" target="_blank">URL Routing with ASP.NET 4 Web Forms (VS 2010 and .NET 4.0 Series)</a>.]</p>
<p>I&#8217;m a huge fan of ASP.NET Routing. It gained popularity as the part of <a href="http://www.asp.net/mvc/" target="_blank">ASP.NET MVC</a> which channels requests for a given URL to the right controller action. In a wise move, Microsoft moved the routing infrastructure out of <a href="http://www.asp.net/mvc/" target="_blank">ASP.NET MVC</a> and<br />
into its own assembly with the release of .NET 3.5 SP1.</p>
<p>With ASP.NET Routing you can construct search engine optimized and human friendly URLs such as these:</p>
<div style="position:relative;left:15px;"><a href="http://dotnet.ubbuzz.com/tag/everything" target="_blank">http://dotnet.ubbuzz.com/tag/everything</a><br />
<a href="http://dotnet.ubbuzz.com/tag/Azure" target="_blank">http://dotnet.ubbuzz.com/tag/Azure</a><br />
<a href="http://dotnet.ubbuzz.com/user/codinghorror" target="_blank">http://dotnet.ubbuzz.com/user/codinghorror</a></div>
<p>Here part of the URL (<strong>tag </strong>or <strong>user</strong>) selects the page and part of the URL (<strong>everything</strong> or <strong>codinghorror</strong>) are effectively query parameters to the page.</p>
<p>This is well documented in the <a href="http://www.asp.net/mvc/" target="_blank">ASP.NET MVC</a> world running on your server &#8211; you can&#8217;t get anything done without it in MVC. But what about <a href="http://www.azure.com" target="_blank">Windows Azure</a>? What if you don&#8217;t want ASP.NET MVC? What if you&#8217;re a traditional type of person and want all the goodness that comes with what is now called ASP.NET WebForms (aka &#8220;normal ASP.NET&#8221;)?</p>
<p>In this brief post, I&#8217;ll cover how to use ASP.NET routing and ASP.NET WebForms in Azure. The <a href="http://www.michaelckennedy.com/Samples/AzureRoutingSample.zip">sample project can be downloaded</a> if you want to follow along. <a href="http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx" target="_blank">Phil Haack</a> has<br />
written a good post on using routing alongside ASP.NET WebForms so I won&#8217;t cover too much background information.</p>
<div style="position:relative;left:15px;"><a href="http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx" target="_blank">http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx</a></div>
<p><strong>How does this change for Azure?</strong></p>
<p>The short answer is that it doesn&#8217;t. If you get routing working for IIS 7 in your web app, you can effectively deploy it to Azure. But the steps always felt convoluted to me when reading others&#8217; write-ups on this. So let&#8217;s run through converting a Windows Azure Web Role  essentially a &#8220;stock&#8221; ASP.NET WebForms app) to use routing in Azure.</p>
<p>First you&#8217;ll need the Azure SDK and Visual Studio tools:</p>
<div style="position:relative;left:15px;"><a href="http://www.microsoft.com/azure/windowsazurefordevelopers/default.aspx" target="_blank">http://www.microsoft.com/azure/windowsazurefordevelopers/default.aspx<br />
</a></div>
<ol>
<li>Next, create a new solution in Visual Studio by choosing <strong>Cloud Service-&gt;Web and Worker Cloud Service</strong>.</li>
<li>Add a new <strong>Global.asax </strong>file to your web role project.</li>
<li>Add a reference to <strong>System.Web.Routing </strong>and <strong>System.Web.Abstractions</strong> in your web role project.</li>
<li>Define a custom class that derives from <strong>IRouteHandler </strong>which will map URL parameters into the HttpContext for use in your pages:<br />
<span id="more-145"></span></p>
<pre class="brush: csharp">internal class CustomRoute : IRouteHandler
{
    public CustomRoute(string virtualPath)
    {
        VirtualPath = virtualPath;
    }

    public string VirtualPath { get; private set; }

    public IHttpHandler GetHttpHandler(RequestContext requestContext)
    {
        foreach ( var aux in requestContext.RouteData.Values )
        {
            HttpContext.Current.Items[aux.Key] = aux.Value;
        }

        return BuildManager.CreateInstanceFromVirtualPath(
                   VirtualPath, typeof( Page ) ) as IHttpHandler;
    }
}</pre>
</li>
<li>Register these routes in the <strong>Application_Start </strong>method of your Global.asax:
<pre class="brush: csharp">protected void Application_Start(object sender, EventArgs e)
{
    RouteTable.Routes.Add( "ShowName",
           new Route(
            "naming/show/{name}",
            new CustomRoute( "~/ShowName.aspx" )
            ) );

    RouteTable.Routes.Add( "CreateAccount",
           new Route(
            "account/begin",
            new CustomRoute( "~/Account.aspx" )
            ) );

    RouteTable.Routes.Add( "Home",
           new Route(
            "home",
            new CustomRoute( "~/Default.aspx" )
            ) );
}</pre>
<p>Now if you run your app, you might expect the routing infrastructure to work. Inside the ASP.NET Dev Server (aka cassini) this will likely work. But in the Azure Development Fabric you&#8217;ll see this:</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/NoHandlerErrorAnnotated.png"><img src="http://www.michaelckennedy.net/blog/content/binary/NoHandlerErrorAnnotated.png" alt="" width="407" /></a></p>
<p>The problem is you need to tell IIS 7.5 to get out of the way and let the request get to ASP.NET.</li>
<li>We&#8217;ll define a class to short-circuit the IIS validation
<pre class="brush: csharp">class Iis7RoutingHandler : UrlRoutingHandler
{
    protected override void VerifyAndProcessRequest(
        IHttpHandler httpHandler, HttpContextBase httpContext)
    {
    }
}</pre>
</li>
<li>Modify the web.config by adding a handler and module to the <strong>system.webServer</strong>section:
<pre class="brush: xml">...</pre>
<p>/li&gt;</li>
<li>Finally, we need to recover the data passed to the page. For example, in the sample project we have:route: <strong>/naming/show/{name}</strong><br />
example:<strong> /naming/show/michael-kennedy</strong></p>
<p>How will our page access the value of name? Recall that our custom route stashes the values in HttpContext.Current.Items. We&#8217;ll just pull them back out as follows in our Page_Load method of our ASPX class:</p>
<pre><span style="color:black;background-color:transparent;font-family:Courier New;font-size:11px;">LabelName.Text <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> (<span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">string</span>)HttpContext.Current.Items[<span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"name"</span>]; </span></pre>
</li>
</ol>
<p>That&#8217;s it! You can see our routes working in our WebForms app running in Azure (well, technically the screenshot is the dev fabric &#8211; but it works in the cloud as well):</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/RoutingInActionAnnotated.png" alt="" /></p>
<p>Download the source and try it for yourself: <a href="http://www.michaelckennedy.com/Samples/AzureRoutingSample.zip">AzureRoutingSample.zip</a> (136 KB)</p>
<br />Posted in Cloud Tagged: .NET, ASP.NET, Azure, Cloud, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=145&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/05/07/asp-net-routing-in-windows-azure-using-webforms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/NoHandlerErrorAnnotated.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/RoutingInActionAnnotated.png" medium="image" />
	</item>
		<item>
		<title>Article: Azure Storage</title>
		<link>http://blog.michaelckennedy.net/2009/04/08/article-azure-storage/</link>
		<comments>http://blog.michaelckennedy.net/2009/04/08/article-azure-storage/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 02:34:13 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[DevelopMentor]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=148</guid>
		<description><![CDATA[I recently wrote an article for DevelopMentor&#8217;s Developments newsletter entitled Azure Storage. Read it at the DevelopMentor website here: http://www.develop.com/content/newsletters/aprilazure I&#8217;ve republished here for my readers. Enjoy! Developments: Azure Storage by Michael Kennedy [Listen to this article as a podcast: Azure-Storage-Article-Kennedy.mp3] &#8230; <a href="http://blog.michaelckennedy.net/2009/04/08/article-azure-storage/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=148&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently wrote an article for <a href="http://www.develop.com" target="_blank">DevelopMentor&#8217;s</a> Developments newsletter entitled <em>Azure Storage</em>. Read it at the <a href="http://www.develop.com/content/newsletters/aprilazure" target="_blank">DevelopMentor website</a> here:</p>
<p><a href="http://www.develop.com/content/newsletters/aprilazure" target="_blank">http://www.develop.com/content/newsletters/aprilazure</a></p>
<p>I&#8217;ve republished here for my readers. Enjoy!</p>
<hr size="1" />
<h2>Developments: Azure Storage</h2>
<h3>by Michael Kennedy</h3>
<p style="font-size:smaller;color:#808080;">[Listen to this article as a podcast: <a href="http://www.michaelckennedy.com/Downloads/Azure-Storage-Article-Kennedy.mp3" target="_blank">Azure-Storage-Article-Kennedy.mp3</a>]</p>
<p>October 27th 2008, Los Angeles CA &#8211; It&#8217;s 9 AM and Microsoft is hosting <a href="http://microsoftpdc.com/" target="_blank">PDC</a> (their most forward looking developer conference). <a href="http://www.microsoft.com/presspass/exec/ozzie/10-27PDC08dayone.mspx" target="_blank">Ray Ozzie and company are introducing Windows Azure</a>: A new platform which is their first foray into the nascent world of large-scale utility computing. This scalable and reliable platform-as-a-service functionality is commonly referred to as &#8221;<a href="http://en.wikipedia.org/wiki/Cloud_Computing" target="_blank">Cloud Computing</a>&#8221; because it runs somewhere out there on the Internet.</p>
<p>Computing platforms that rival the reliability of the utility grids (e.g. electric and gas) which we daily take for granted have long been the stuff of dreams.</p>
<p>A few companies have realized this dream &#8211; Google and Amazon come to mind as a couple of the rare exceptions who have accomplished this goal. These companies&#8217; web properties seem to handle unbounded amounts of traffic with zero down time. The data centers, redundancies, software engineering and operations know-how required to make this happen are exceedingly expensive. <a href="http://www.datacenterknowledge.com/archives/2007/11/12/google-data-centers-3000-a-square-foot/" target="_blank">Some reports have Google spending over $2.4 billion</a> (that&#8217;s 2,400 million dollars) on data centers in 2007 alone.</p>
<p>Prior to large-scale cloud computing efforts (circa 2005), most of us could only dream of such scalability and reliability. Today we have at least three highly reputable companies offering some kind of pay as you go cloud computing platform &#8211; Microsoft, Amazon, and Google.</p>
<p><a href="http://www.azure.com" target="_blank">Microsoft&#8217;s Azure</a> is a new comer to the industry. But for .NET developers, it is not to be ignored. Azure allows you to use your existing skills to build essentially the same .NET applications you are familiar with and &#8220;deploy them to the cloud.&#8221;</p>
<p>These scalable, reliable, and geographically-replicated applications that run on Azure depend on data of course. Virtually all applications we write will be nothing without their underlying data. But if we simply use the tried and true methods of data storage such as the file system or a (single) database server our data is not all that scalable or reliable. Because we cannot have a scalable and reliable application without data, we need a new mechanism for storing and accessing data from our Azure applications.</p>
<p><strong>Enter Azure Storage</strong></p>
<p><span id="more-148"></span>Azure storage is the storage component of the Azure platform. It is actually three data services in one:</p>
<ul>
<li>Blob Storage &#8211; stores unstructured data essentially as a file, limited to 50 GB of data per blob.</li>
<li>Table Storage &#8211; stores structured data that is somewhat like a database. For full database capabilities there is a high level feature called <a href="http://www.microsoft.com/azure/data.mspx" target="_blank">Sql Data Services (SDS)</a>.</li>
<li>Queues &#8211; provides interprocess communication functionality between various web and worker roles in your hosted services or even applications running outside of Azure. Queues can pass small xml or binary messages &#8211; less than 64 kb per message.</li>
</ul>
<p>In this article, we will cover just the basics of the three storage services of Windows Azure. I want to give you a sense for what it&#8217;s like to program against Azure Storage. At the base level all access to Azure Storage uses <a href="http://msdn.microsoft.com/en-us/magazine/cc135976.aspx" target="_blank">pure REST APIs</a>. This means that you can access it from any HTTP enabled platform / language. For example, to download the blob data called &#8220;config.xml&#8221; in the container called &#8220;settings&#8221; for the Azure project &#8220;kennedy&#8221;<br />
you would simply issue a GET to the Uri:</p>
<p>http://<strong>kennedy</strong>.blob.core.windows.net/<strong>settings</strong>/<strong>config.xml</strong></p>
<p>To save data in a blob you do HTTP POSTs and PUTs in a similar fashion. However, real life is full of edge cases, error handling, security, and serialization which makes the pure HTTP model error prone. Thus, a sample library serves as the <em>de facto</em> .NET API to Azure Storage and ships with the <a href="http://www.microsoft.com/azure/sdk.mspx" target="_blank">Azure SDK</a>. It is called StorageClient and can be found in default installs here:</p>
<p>C:\Program Files\Windows Azure SDK\v1.0\samples\StorageClient</p>
<p>We will examine working with each of the storage services from the perspective of the StorageClient library - but keep in mind that ultimately this library is a wrapper around a basic and open RESTful API.</p>
<p><strong>Setting The Stage: The Sample Application</strong></p>
<p>To explore Azure Storage I have written a simple photo sharing distributed application. These set of applications allow users to upload photos to a photo sharing site. These photos must be reviewed and approved by moderators of the site. Once approved, the general public can view and interact with the photos. For a concrete example, you could imagine writing a distributed version of the wallpaper sharing site <a href="http://interfacelift.com/wallpaper_beta/downloads/" target="_blank">InterfaceLift</a> and<br />
deploying it on Azure in this fashion.</p>
<p>You can <a href="http://www.michaelckennedy.net/samples/Kennedy-Azure-Storage-Photo-Sample.zip" target="_blank">download the sample application</a> and follow along if you want to see the full source code and try it out yourself. Just be sure to start the Development Storage utility that comes with the Azure SDK before running the application.</p>
<p>Our distributed application consists of three parts.</p>
<div>
<ul>
<li>The Uploader: A Windows Forms application that lets contributors upload images to the site.</li>
<li>The Reviewer: A Windows Forms application that lets moderators view image submissions and either approve or reject them.</li>
<li>The Website: An ASP.NET website for viewing the photos &#8211; this is our public facing application.</li>
</ul>
</div>
<p>A typical use case might be as follows (see diagram below).</p>
<ol>
<li>We upload a photo submission with our uploader application. The photo is uploaded to Azure blob storage and a message is sent via an Azure Message Queue to all available reviewer applications. Additional information about the submitter is associated with the photo in Azure table storage.</li>
<li>The reviewer application watches the message queue for new messages. When one arrives, the photo is added to a list of pending submissions. The reviewer can either reject (delete) the submission or approve it &#8211; move it to a permanent blob storage location where it will be publicly viewable.</li>
<li>Users visit our website and can view all approved photos. This list will change in real-time because it is driven by the reviewer application. The web application simply pulls all photos from the approved photo container in Azure blob storage.</li>
</ol>
<p><a href="content/binary/AzureStorage/Cloud-Architecture-Diagram.png" target="_blank"><img src="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Cloud-Architecture-Diagram.png" alt="" width="450" /></a></p>
<p><strong>Saving Data: Creating Azure Blobs</strong></p>
<p>To save data to Azure Blob Storage, you must realize blob storage follows the <strong>ACE</strong> pattern (<strong>A</strong>uthority, <strong>C</strong>ontainer, <strong>E</strong>ntity) to describe a blob. Authority is simply your Azure solution name. Containers are analogous to folders. And entities are analogous to files.</p>
<p>The listing below is essentially the code that runs when the uploader application uploads a pending image submission to blob storage.</p>
<p>Listing 1:</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-1.png" alt="" /></p>
<p><strong>Sending Notifications: Azure Queuing</strong></p>
<p>In addition to uploading the image to the pending images container in blob storage, we will send a message to a message queue to notify any active or future reviewers of the new submission.</p>
<p>Listing 2.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-2.png" alt="" /></p>
<p><strong>Saving (More) Data: Structured Storage and Azure Tables</strong></p>
<p>Finally, for the upload application, we must also save some information about the contributor. In Azure Storage we have two reasonable places to store this information.</p>
<p>First, we could save this information directly in blob storage as meta-data associated with the blob itself. This is straightforward and easy. But there is a big limitation: information in this meta-data is not queryable. Suppose I want get all images associated with a single contributor. There is no way in Azure Blob Storage to say give me all the blobs with this filter on the meta-data. You would have to pull the properties of every blob and do the comparison client-side. That&#8217;s tantamount to filling a DataSet with <span style="color:#800000;">&#8220;SELECT * FROM PendingImages&#8221;</span> and it&#8217;s a bad idea.</p>
<p>Instead we will use the third type of Azure Storage: Azure Table Storage. Table Storage allows us to store data with up to 256 properties and query this data as if it were a database. It is exactly what we need for the contributor information. However, you must realize this is not a database. A better mental picture is a durable collection of Dictionary object (as in Dictionary from System.Collections.Generics) with querying built on top. I say this because there is no schema or relational constructs in Azure Table Storage. If you need that, then you&#8217;ll want <a href="http://www.microsoft.com/azure/data.mspx" target="_blank">Sql Data Services</a> &#8211; a service on top of the core Azure platform.</p>
<p>The code to add an entry to Azure Table Storage does not fit into a single method as it&#8217;s driven through the interaction of several classes we must define. Azure Table Storage can be accessed via ADO.NET Data Services (client-side) and this is the method we will use.</p>
<p>First we&#8217;ll define a client-side schema for our entry by creating a class called Contributor which derives from the class TableStorageEntity (from the StorageClient library).</p>
<p>Listing 3.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-3.png" alt="" /></p>
<p>Additionally we must define the tables and queries available to ADO.NET Data Services by created a class derived from TableStorageDataServiceContext and we do that below. We simply have one table called Contributors.</p>
<p>Listing 4.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-4.png" alt="" /></p>
<p>With those two items in place, we can insert a &#8220;row&#8221; into Azure Table Storage as follows:</p>
<p>Listing 5.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-5.png" alt="" /></p>
<p>As for querying Azure Table Storage that is very straight-forward. Because we are using ADO.NET Data Services, querying can be done via LINQ as in &#8220;from c in svc.Contributors select c.Name&#8221;. Ultimately ADO.NET Data Services is also built on a RESTful API so this translates to the underlying HTTP REST calls. Alternatively, you can use that REST API directly from .NET or any other platform.</p>
<p><strong>Waiting on Queues: The Reviewer Application&#8217;s Code</strong></p>
<p>Next, let&#8217;s look at how we monitor and pull messages from Azure Queuing. Ultimately we must poll the queue using a RESTful HTTP request. But the StorageClient resurfaces this to us as simple events.</p>
<p>Listing 6.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-6.png" alt="" /></p>
<p>We won&#8217;t cover how we move a blob from the pendingImages blob container to the approvedImages blob container which happens when a reviewer approves an image.<br />
You can look at the sample to see how that is done.</p>
<p><strong>Ultimately It&#8217;s About the Website</strong></p>
<p>Finally, let&#8217;s look at the web application that actually displays the approved images. We don&#8217;t do anything fancy such as paging or error handling that you&#8217;d see in a real application. But this will give you a good idea how to work with the blob data as a collection.</p>
<p>Here we&#8217;ll create a BlobStorage object and access the BlobContainer approvedImageContainer as we have been in most of the listings. But then instead of saving or reading blobs, we use the ListBlobs method to simply list all the approve images in that container. In order to show the images on our webpage, we just use the BlobProperties.Uri and directly reference that in our HTML. Our ASP.NET application does not touch the data. Rather the consumers (IE, Firefox, Chrome, etc) of the HTML pull the image data directly from blob storage as they would from any web server.</p>
<p>Listing 7.</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-7.png" alt="" /></p>
<p>Now you have a good idea of the concepts and motivation behind Azure Storage. You have seen some typical usages of each of the three storage features: blob storage, table storage, and queuing. Our samples made use of the sample storage API library called StorageClient. Underlying this library we saw that Azure Storage is entirely accessed via RESTful APIs.</p>
<p>Want to get started? Visit <a href="http://www.microsoft.com/azure/register.mspx" target="_blank">http://www.azure.com</a> and choose &#8220;Try It Now&#8221; to register for a CTP Azure account. You&#8217;ll need to download the various SDK&#8217;s listed on that same page. They will install the Visual Studio projects required for working with Azure as well as the Development Storage and Development Fabric so you can develop and debug your applications before deploying them to the cloud.</p>
<p>If you want some intensive, expert-lead training on Azure and associated .NET 4.0 topics be sure to contact <a href="http://www.develop.com" target="_blank">DevelopMentor</a>. Or call 800.699.1932 to find out what classes we have available today.</p>
<br />Posted in Cloud Tagged: .NET, Cloud, DevelopMentor <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=148&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/04/08/article-azure-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.michaelckennedy.com/Downloads/Azure-Storage-Article-Kennedy.mp3" length="21828746" type="audio/mpeg" />
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Cloud-Architecture-Diagram.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-1.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-2.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-3.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-4.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-5.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-6.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/AzureStorage/Azure-Storage-Listing-7.png" medium="image" />
	</item>
		<item>
		<title>RESTful Web Services with WCF Screencast</title>
		<link>http://blog.michaelckennedy.net/2009/03/24/restful-web-services-with-wcf-screencast/</link>
		<comments>http://blog.michaelckennedy.net/2009/03/24/restful-web-services-with-wcf-screencast/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 02:40:28 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[RES]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=151</guid>
		<description><![CDATA[I recently got the chance to record a screencast discussing REST-oriented web services in WCF. If you&#8217;re interested in WCF you should definitely check it out because WCF and REST make an awesome combination. WCF-REST-Kennedy-Peepleocity.wmv 35 MB (WMV HD) WCF-REST-Kennedy-Peepleocity.mp4 &#8230; <a href="http://blog.michaelckennedy.net/2009/03/24/restful-web-services-with-wcf-screencast/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=151&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently got the chance to record a screencast discussing REST-oriented web services in WCF. If you&#8217;re interested in WCF you should definitely check it out because WCF and REST make an awesome combination.</p>
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/PZgzSz-AuVw?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span>
<p><a href="http://www.michaelckennedy.com/Downloads/videos/WCF-REST-Kennedy-Peepleocity.wmv" target="_blank">WCF-REST-Kennedy-Peepleocity.wmv</a> 35 MB (WMV HD)<br />
<a href="http://www.michaelckennedy.com/Downloads/videos/WCF-REST-Kennedy-Peepleocity.mp4" target="_blank">WCF-REST-Kennedy-Peepleocity.mp4</a> 96 MB (MP4 / iPad)</p>
<p>I cover building WCF services using REST princples, the WebGet and WebInvoke attributes, working with the SyndicationFeed &amp; Rss20FeedFormatter classes, and configuration-free WCF hosting in IIS.</p>
<p>You can also <a href="http://www.michaelckennedy.com/Samples/WCF-REST-Kennedy-Peepleocity-Source.zip">download the source code</a> of the project built in the screencast.</p>
<p>Finally, if you&#8217;re willing to do without video you can <a href="http://www.michaelckennedy.com/Downloads/videos/WCF-REST-Kennedy-Peepleocity.mp3" target="_blank">download just the audio </a>as an MP3.</p>
<br />Posted in Video Tagged: DevelopMentor, RES, Screencasts, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/151/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/151/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/151/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=151&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/03/24/restful-web-services-with-wcf-screencast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.michaelckennedy.com/Downloads/videos/WCF-REST-Kennedy-Peepleocity.mp3" length="22793045" type="audio/mpeg" />
<enclosure url="http://www.michaelckennedy.com/Downloads/videos/WCF-REST-Kennedy-Peepleocity.wmv" length="38719201" type="video/asf" />
<enclosure url="http://www.michaelckennedy.com/Downloads/videos/WCF-REST-Kennedy-Peepleocity.mp4" length="98985020" type="video/mp4" />
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>dotNetDevBuzz on Channel 9 Last Week</title>
		<link>http://blog.michaelckennedy.net/2009/03/08/dotnetdevbuzz-on-channel-9-last-week/</link>
		<comments>http://blog.michaelckennedy.net/2009/03/08/dotnetdevbuzz-on-channel-9-last-week/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 02:43:09 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=154</guid>
		<description><![CDATA[Any of my technically savvy friends know that I&#8217;m a big fan of Channel 9. If you want the raw, inside view of Microsoft&#8217;s developer world, it&#8217;s a great place to start. That&#8217;s why it was a big honor for me that &#8230; <a href="http://blog.michaelckennedy.net/2009/03/08/dotnetdevbuzz-on-channel-9-last-week/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=154&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Any of my technically savvy friends know that I&#8217;m a big fan of <a href="http://channel9.msdn.com" target="_blank">Channel 9</a>. If you want the raw, inside view of Microsoft&#8217;s developer world, it&#8217;s a great place to start. That&#8217;s why it was a big honor for me that my .NET Developer community website</p>
<p><a href="http://dotnet.ubbuzz.com" target="_blank">http://dotnet.ubbuzz.com</a></p>
<p>was featured on &#8220;<a href="http://channel9.msdn.com/shows/This+Week+On+Channel+9/This-Week-Martin-Woodward-MVP-Summit-Web-Perf-Show-Off-and-a-VSTS-Pep-Talk/" target="_blank">This Week on Channel 9</a>&#8221; last week.<a href="http://channel9.msdn.com/shows/This+Week+On+Channel+9/This-Week-Martin-Woodward-MVP-Summit-Web-Perf-Show-Off-and-a-VSTS-Pep-Talk/" target="_blank"><img src="http://www.michaelckennedy.net/blog/content/binary/DevBuzz-On-Channel9.png" alt="" border="0" /><br />
</a>  (see segment 7:45 &#8211; 10:25)</p>
<p>Thank you <a href="http://blogs.msdn.com/danielfe/" target="_blank">Dan Fernandez</a> for covering our site! If you&#8217;re unfamiliar with .NET Dev Buzz, then what are you waiting for? You&#8217;d better <a href="http://dotnet.ubbuzz.com" target="_blank">check it out</a>!</p>
<br />Posted in Video  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=154&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/03/08/dotnetdevbuzz-on-channel-9-last-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/DevBuzz-On-Channel9.png" medium="image" />
	</item>
		<item>
		<title>Debugging the Future (Advanced .NET Debugging) Video Presentation</title>
		<link>http://blog.michaelckennedy.net/2009/03/03/debugging-the-future-advanced-net-debugging-video-presentation/</link>
		<comments>http://blog.michaelckennedy.net/2009/03/03/debugging-the-future-advanced-net-debugging-video-presentation/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 02:45:02 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=156</guid>
		<description><![CDATA[My esteemed colleague, friend, and fellow instructor at DevelopMentor Jason Whittington gave a great presentation on advanced .NET debugging recently at the Oklahoma City Developer&#8217;s Group. They luckily recorded it on video and published it on their website so that &#8230; <a href="http://blog.michaelckennedy.net/2009/03/03/debugging-the-future-advanced-net-debugging-video-presentation/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=156&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;">My esteemed colleague, friend, and fellow instructor at <a href="http://develop.com" target="_blank">DevelopMentor</a> Jason Whittington gave a great presentation on advanced .NET debugging recently at the <a href="http://www.okcdg.org/" target="_blank">Oklahoma City Developer&#8217;s Group</a>. They luckily recorded it on video and published it on their website so that it may &#8220;<em>live on in the Google</em>&#8220;.</p>
<p style="text-align:center;">   <strong>Debugging The Future: The Video</strong> by Jason Whittington<a href="http://blip.tv/play/AYGJxwyW8mc" target="_blank"><img class="alignnone" title="Click to watch video" src="http://www.michaelckennedy.net/blog/content/binary/JasonPresentingDebuggingTheFuture.png" alt="" width="407" height="339" /></a></p>
<p>If you want to debug .NET applications right down to their memory footprint, this talk is for you. If you like this type of presentation, be sure to check out the classes we offer at <a href="http://develop.com" target="_blank">DevelopMentor</a>.</p>
<br />Posted in Video Tagged: .NET, Debugging, DevelopMentor, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=156&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/03/03/debugging-the-future-advanced-net-debugging-video-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/JasonPresentingDebuggingTheFuture.png" medium="image">
			<media:title type="html">Click to watch video</media:title>
		</media:content>
	</item>
		<item>
		<title>Significant Advances in Unit Testing Windows Workflow</title>
		<link>http://blog.michaelckennedy.net/2009/01/18/significant-advances-in-unit-testing-windows-workflow/</link>
		<comments>http://blog.michaelckennedy.net/2009/01/18/significant-advances-in-unit-testing-windows-workflow/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 02:57:39 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WF]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=161</guid>
		<description><![CDATA[This post describes a unit testing library for testing Windows Workflow Foundations.It is not a framework like HarnessIt, NUnit, or MsTest. Rather it&#8217;s a library that can be used in conjunction with any of these testing frameworks. Download the library with sample &#8230; <a href="http://blog.michaelckennedy.net/2009/01/18/significant-advances-in-unit-testing-windows-workflow/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=161&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post describes a unit testing library for testing Windows Workflow Foundations.It is not a framework like <a href="http://www.unittesting.com/" target="_blank">HarnessIt</a>, <a href="http://www.nunit.org/index.php" target="_blank">NUnit</a>, or <a href="http://msdn.microsoft.com/en-us/library/ms182409%28VS.80%29.aspx" target="_blank">MsTest</a>. Rather it&#8217;s a library that can be used in conjunction with any of these testing frameworks.</p>
<blockquote><p>Download the library with sample test project here: <a href="http://www.michaelckennedy.net/downloads/tools/Kennedy.WorkflowTesting.zip"><br />
Kennedy.WorkflowTesting.zip</a> (216 KB)</p>
<p>You can also just <a href="#code-sample-1">jump to the code</a>.</p></blockquote>
<p><strong>First a Little History:</strong></p>
<p>Last September I posted this teaser entitled <a href="http://www.michaelckennedy.net/blog/2008/09/30/UnitTestingComingToAWorkflowNearYou.aspx" target="_blank"><em>Unit Testing Coming to a Workflow Near You</em></a>. My intention was to post this article that you&#8217;re reading now shortly thereafter when I got some free time to polish things up. In that previous post, I highlighted what I could determine to be the current state-of-the-art with regard to unit testing workflows, circa September 2008.<br />
<span id="more-161"></span></p>
<table width="500px">
<tbody>
<tr>
<td>
<ul>
<li><span style="font-family:Verdana;font-size:small;"><a href="http://www.michaelckennedy.net/blog/ct.ashx?id=79c6a22c-a144-4bc0-ae6e-6a5b42950af9&amp;url=http%3a%2f%2fblogs.msdn.com%2frjacobs%2farchive%2f2008%2f08%2f27%2funit-testing-activities-with-windows-workflow-foundation.aspx" target="_blank">Unit Testing Activities with Windows Workflow Foundation</a></span><span style="font-family:Verdana;font-size:small;"> by Ron Jacobs</span><span style="font-family:Verdana;font-size:small;"><br />
</span></li>
<li><span style="font-family:Verdana;font-size:small;"><a href="http://www.michaelckennedy.net/blog/ct.ashx?id=79c6a22c-a144-4bc0-ae6e-6a5b42950af9&amp;url=http%3a%2f%2fblogs.msdn.com%2frjacobs%2farchive%2f2008%2f08%2f26%2funit-testing-workflows.aspx" target="_blank">TDD and Windows Workflow Foundation</a> by Ron Jacobs</span></li>
<li><span style="font-family:Verdana;font-size:small;"><a href="http://www.michaelckennedy.net/blog/ct.ashx?id=79c6a22c-a144-4bc0-ae6e-6a5b42950af9&amp;url=http%3a%2f%2fdevelopers.de%2fblogs%2fandreas_erben%2farchive%2f2007%2f08%2f01%2fwf-unit-testing-simple-approach-to-activity-testing-and-improving-the-xoml-loader.aspx" target="_blank">WF &#8211; Unit Testing: Simple approach to Activity testing and improving<br />
the XOML loader</a> by Andreas Erben</span></li>
<li><span style="font-family:Verdana;font-size:small;"><a href="http://www.michaelckennedy.net/blog/ct.ashx?id=79c6a22c-a144-4bc0-ae6e-6a5b42950af9&amp;url=http%3a%2f%2fodetocode.com%2fBlogs%2fscott%2farchive%2f2006%2f08%2f02%2f5492.aspx" target="_blank">Unit Testing Workflow Activities</a> by K. Scott Allen</span></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Then I heard through some inside sources that this MSDN Magazine article was about to come out:</p>
<p><em>    <a href="http://msdn.microsoft.com/en-us/magazine/dd179724.aspx" target="_blank">Foundations: Unit Testing Workflows and Activities<br />
</a></em>    by <a href="http://www.pluralsight.com/community/blogs/matt/" target="_blank">Matt Milner</a>.</p>
<p>So I decided to see what Matt&#8217;s article had to offer to the conversation. It&#8217;s a good article to be sure. It covers a lot of the things I thought were undiscussed and yet important to unit testing WF (e.g. using WF services as points of dependency injection for mocks and stubs). Thanks Matt! I don&#8217;t have to write about that now, but you&#8217;ll see it used in the sample with my library.</p>
<p>What I was really waiting to see was would that article make this post redundant? After reading it, I can say that there&#8217;s still a long way to go &#8211; and this library will get us most of the way there. Now let&#8217;s get to the good stuff!</p>
<p><strong>Significant Advances:</strong></p>
<p>That&#8217;s a pretty bold statement, significant advances: let&#8217;s see if I can back it up. Here&#8217;s what&#8217;s missing in one way or another from all the previous work on unit testing WF. (Please note that this discussion is in no way intended to belittle the work of anyone quoted above, just to build on their work and advance testing for us all).</p>
<p>Problems with unit testing WF today that are solved by this library:</p>
<ol>
<li><span style="font-weight:bold;">Testing single activities</span>: Testing single activities in isolation is hard.</li>
<li><span style="font-weight:bold;">References to the activity</span>: Direct access to the activity under test for asserting on its properties is nearly impossible.</li>
<li><span style="font-weight:bold;">Waiting on workflows</span>: Workflows run on background threads which means waiting for the outcome inside the test method is more cumbersome than necessary (ManualWorkflowScheduler is unnecessarily cumbersome as well).</li>
<li><span style="font-weight:bold;">Untyped name/value collections as input</span>: Using untyped name/value collections as input and return values is error prone (for testing and general use).</li>
<li><span style="font-weight:bold;">Expected exceptions</span>: Testing &#8220;failure as success&#8221; cases for error handling is essentially broken for WF: Either the exception type is lost, or the call stack is lost, or both.</li>
</ol>
<p><strong>The Sample:</strong></p>
<p>Let me set the stage first before we see the test code. I have a somewhat realistic workflow which will exchange two stocks and either debit or credit your bank account with the difference. So you might want to sell 5 shares of Google and buy 10 shares of Microsoft and pocket the difference.</p>
<p>Here&#8217;s the workflow which involves 4 different activities:</p>
<blockquote><p><img src="http://www.michaelckennedy.net/blog/content/binary/exchange-stock-workflow.png" alt="" border="0" /></p></blockquote>
<p><strong>Testing On Single Activities:</strong></p>
<p>The first thing to test is the individual activities (like BuyStock and DebitAccount). Here&#8217;s the code to test selling a stock (some details omitted for simplicity, exact code follows later). This method uses my library class WfRunner for executing the test.</p>
<pre><span style="color:black;background-color:transparent;font-family:Courier New;font-size:11px;">[TestClass] <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">public</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">class</span> WorkflowTests : IDisposable {     <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">private</span> WfRunner wfRunner <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> WfRunner();     [TestMethod]     <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">public</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">void</span> SellStockComputesCostCorrectlyTest()     {         StockDTO dto <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> StockDTO( 7, <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"GOOG"</span> );         SellStockActivity sellActivity <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span>             wfRunner.RunSingleActivity( dto );         <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">double</span> price <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> testStockSvc.LookupPrice( dto.Ticker );         <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">int</span> quantity <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> dto.Quantity;         Assert.AreEqual( quantity <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">*</span> price, sellActivity.Cost );     }     <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">// ...</span> } </span></pre>
<p>This test method (SellStockComputesCostCorrectlyTest) is remarkable for several reasons:</p>
<ol>
<li>We are taking a single Activity, <strong>not a workflow</strong>, and executing it.</li>
<li>We are passing a <strong>strongly typed DTO</strong> (data transfer object) rather than name/value pairs in a Dictionary.</li>
<li><strong>Most Remarkably</strong>: We are getting the actual instance of the activity returned to us so that we can explore its properties. Notice that we assert on sellActivity.Cost directly:Assert.AreEqual( quantity * price, sellActivity.Cost );
<p>This is not easy to pull off &#8211; WF intentionally hides activities and workflows it creates behind workflow instances (proxies basically). This hack might be bad for production systems, but it *rocks* for unit testing.It means you get intellisense rather than programming against strings in name/value collections.</li>
<li>We are not waiting for the workflow to complete or using the ManualWorkflowSchedule. WfRunner is doing that for us because the method RunSingleActivity is a blocking call.</li>
</ol>
<p>Just so you don&#8217;t think I&#8217;m trying to pull a fast one: Here&#8217;s that same listing with all the gory details left in. Notice how we&#8217;re using WF Services for DI with our test stubs.</p>
<pre><span style="color:black;background-color:transparent;font-family:Courier New;font-size:11px;">[TestClass] <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">public</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">class</span> WorkflowTests : IDisposable {     <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">//</span>     <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">// Define some objects that will be used across all tests.</span>     <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">//</span>     <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">private</span> IAccountService testAccountSvc;     <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">private</span> IStockService testStockSvc;     <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">private</span> Account testAccont;     <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">private</span> WfRunner wfRunner <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> WfRunner();     <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">public</span> WorkflowTests()     {         <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">//</span>         <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">// Initialize common data for all tests. </span>         <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">// This is basically what the host of the wf-runtime would do</span>         <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">// but we're using test doubles / stubs for our services.</span>         <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">//</span>         Dictionary&lt;<span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">string</span>, <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">double</span>&gt; stocks <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> Dictionary&lt;<span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">string</span>, <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">double</span>&gt;();         stocks.Add( <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"goog"</span>, 350 );         stocks.Add( <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"msft"</span>, 25 );         testAccont <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> Account( 1774, 5000 );         <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">this</span>.testStockSvc <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> TestStockService( stocks );         <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">this</span>.testAccountSvc <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> TestAccountLookup( testAccont );         <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">// Install these services for use by our WF activities.</span>         wfRunner.AddService( testStockSvc );         wfRunner.AddService( testAccountSvc );     }     [TestMethod]     <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">public</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">void</span> SellStockComputesCostCorrectlyTest()     {         StockDTO dto <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> StockDTO( 7, <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"GOOG"</span> );         SellStockActivity sellActivity <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span>             wfRunner.RunSingleActivity( dto );         <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">double</span> price <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> testStockSvc.LookupPrice( dto.Ticker );         <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">int</span> quantity <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> dto.Quantity;         Assert.AreEqual( quantity <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">*</span> price, sellActivity.Cost );     }     <span style="color:green;background-color:transparent;font-family:Courier New;font-size:11px;">// ...</span> }</span></pre>
<p><strong>Expected Exceptions</strong></p>
<p>That was pretty awesome huh? We solve several of our problems I identified above (testing single activities, references to the activity, waiting on workflows, and untyped name/value collections as input). The last one to cover is exceptions as success.</p>
<p>When we try to buy a stock and we don&#8217;t have enough money, the workflow will throw an InsufficientFundsException. This type is a custom exception created as part of my wf application &#8211; it&#8217;s not part of .NET. We want to test for this exception:</p>
<pre><span style="color:black;background-color:transparent;font-family:Courier New;font-size:11px;">[TestMethod] <strong>[ExpectedException(<span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">typeof</span> (InsufficientFundsException))] </strong><span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">public</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">void</span> CannotBuyWithInsufficentFundsTest() {     ExchangeStocksDTO dto <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span>         <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">new</span> ExchangeStocksDTO             {                 AccountID <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> 1774,                 StockToBuy <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"MSFT"</span>,                 StockToSell <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"GOOG"</span>,                 SellQuantity <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> 5,                 BuyQuantity <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> 7000             };     wfRunner.RunWorkflow( dto ); }</span></pre>
<p>Notice that we&#8217;re using the ExpectedException attribute. We just call RunWorkflow as a regular method and we get the exception back as a synchronous error. That is fantastic already. But look at the call stack:</p>
<pre><span style="font-weight:bold;color:#ff0000;">SampleLibrary.InsufficientFundsException</span>: <span style="font-weight:bold;color:#000099;">Wrapped excpetion message</span>: Insufficient funds for account 1774.
 ---&gt; <span style="font-weight:bold;color:#ff0000;">SampleLibrary.InsufficientFundsException: Insufficient funds for account 1774.</span>
   at SampleLibrary.Account.Withdrawl(Double amount)
   at SampleLibrary.DebitAccount.Execute(ActivityExecutionContext ctx)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext)
   at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime)
   at System.Workflow.Runtime.Scheduler.Run()
   --- End of inner exception stack trace ---
   at Kennedy.WorkflowTesting.WfRunner.<span style="font-weight:bold;color:#ff0000;">TransformAndThrowIfRequired</span>(Exception realException)
   at Kennedy.WorkflowTesting.WfRunner.RunWorkflow[T](Dictionary`2 namedArgumentValues)
   at Kennedy.WorkflowTesting.WfRunner.RunWorkflow[T](Object workflowDTO)
   at SampleLibrary.Tests.WorkflowTests.CannotBuyWithInsufficentFundsTest()</pre>
<p>The WfRunner class has determined there was an exception. Rather than just rethrowing it and losing the callstack (notice it&#8217;s still intact), we do this operation called TransformAndThrowIfRequired. TransformAndThrowIfRequired takes the real exception, uses reflection to recreate another exception of that type and wraps the real exception as the inner exception.</p>
<p>This both preserves the exception type (critical for the ExpectedException behavior)<br />
and the callstack (critical for debugging).</p>
<p>Running these tests inside Visual Studio we get all green!</p>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/passed-workflow-unit-tests.png" alt="" border="0" /></p>
<p>I hope you find this library adds significant value to unit testing of your Windows Workflows. Personally, I think it makes unit testing of your Windows Workflows practical in the real world.</p>
<p>Enjoy!<br />
Michael</p>
<p>Note: This only applies to WF 3.0/3.5. WF 4.0 which is part of .NET 4 which is shipping the end of 2009 may change this considerably.</p>
<br />Posted in Agile Tagged: .NET, agile, Articles, Visual Studio, WF, Workflow <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=161&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/01/18/significant-advances-in-unit-testing-windows-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/exchange-stock-workflow.png" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/passed-workflow-unit-tests.png" medium="image" />
	</item>
		<item>
		<title>Test Driven Development, Approval Testing, and a Song &#8211; Oh Boy!</title>
		<link>http://blog.michaelckennedy.net/2009/01/07/test-driven-development-approval-testing-and-a-song-oh-boy/</link>
		<comments>http://blog.michaelckennedy.net/2009/01/07/test-driven-development-approval-testing-and-a-song-oh-boy/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 03:03:24 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=163</guid>
		<description><![CDATA[So my buddies Dan Gilkerson and Llewellyn Falco have been doing some brilliant, ground breaking work on advancing the state of unit testing and TDD with a concept they call Approval Testing. To highlight the transition from unit testing -&#62; &#8230; <a href="http://blog.michaelckennedy.net/2009/01/07/test-driven-development-approval-testing-and-a-song-oh-boy/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=163&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So my buddies Dan Gilkerson and <a href="http://www.spunlabs.com/" target="_blank">Llewellyn Falco</a> have been doing some brilliant, ground breaking work on advancing the state of unit testing and TDD with a concept they call <a href="http://blog.approvaltests.com/" target="_blank">Approval Testing</a>.</p>
<p>To highlight the transition from</p>
<blockquote><p>unit testing -&gt; TDD -&gt; BDD -&gt; Approval Testing</p></blockquote>
<p>Dan wrote a parody of the song Let It Be.</p>
<p>The Music Video: <strong><em>Let it BBD<br />
</em></strong><br />
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='425' height='344' src='http://www.youtube.com/embed/pvJi1E730HA?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<br />Posted in Agile, Video Tagged: .NET, unit testing <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=163&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2009/01/07/test-driven-development-approval-testing-and-a-song-oh-boy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>MSDN Magainze: Web Apps That Support Long-Running Operations</title>
		<link>http://blog.michaelckennedy.net/2008/12/24/msdn-magainze-web-apps-that-support-long-running-operations/</link>
		<comments>http://blog.michaelckennedy.net/2008/12/24/msdn-magainze-web-apps-that-support-long-running-operations/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 03:05:23 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[WF]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=166</guid>
		<description><![CDATA[I&#8217;m pleased to announce that MSDN Magazine just published my Windows Workflow article entitled &#8220;ASP.NET WORKFLOW: Web Apps That Support Long-Running Operations&#8221; I hope you find it useful and interesting. Posted in Agile Tagged: .NET, Articles, MSDN, Visual Studio, WF, &#8230; <a href="http://blog.michaelckennedy.net/2008/12/24/msdn-magainze-web-apps-that-support-long-running-operations/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=166&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.michaelckennedy.net/blog/content/binary/dd365186.cover%28en-us%29.gif" alt="" width="25%" align="right" border="0" /></p>
<p>I&#8217;m pleased to announce that MSDN Magazine just published my Windows Workflow article entitled</p>
<p><a href="http://msdn.microsoft.com/en-us/magazine/dd296718.aspx">&#8220;ASP.NET WORKFLOW: Web Apps That Support Long-Running Operations&#8221;</a></p>
<p>I hope you find it useful and interesting.</p>
<br />Posted in Agile Tagged: .NET, Articles, MSDN, Visual Studio, WF, Workflow <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/166/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/166/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/166/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=166&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2008/12/24/msdn-magainze-web-apps-that-support-long-running-operations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/dd365186.cover%28en-us%29.gif" medium="image" />
	</item>
		<item>
		<title>Just Launched: .NET Dev Buzz</title>
		<link>http://blog.michaelckennedy.net/2008/10/13/just-launched-net-dev-buzz/</link>
		<comments>http://blog.michaelckennedy.net/2008/10/13/just-launched-net-dev-buzz/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 03:10:16 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=168</guid>
		<description><![CDATA[I just launched the beta version of an entirely differnet kind of .NET community website: .NET Dev Buzz Bringing you absolutely fresh conversations about .NET and the Microsoft developer community. http://dotnet.ubbuzz.com/ I&#8217;ll follow this up with some highlights of a &#8230; <a href="http://blog.michaelckennedy.net/2008/10/13/just-launched-net-dev-buzz/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=168&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I just launched the beta version of an entirely differnet kind of .NET community website:</p>
<blockquote><p><strong>.NET Dev Buzz</strong><br />
Bringing you absolutely fresh conversations about .NET and the Microsoft developer community.</p>
<p><a href="http://dotnet.ubbuzz.com/">http://dotnet.ubbuzz.com/</a></p></blockquote>
<p>I&#8217;ll follow this up with some highlights of a bunch of interesting .NET concepts being used here.</p>
<p>For starters, consider this. This is a website built in ASP.NET web forms, but there is no view state, no form posts, and no (visible) aspx files. It&#8217;s fully RESTful.</p>
<p><strong></strong><a href="http://dotnet.ubbuzz.com/"><img src="http://www.michaelckennedy.net/blog/content/binary/Openning.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<br />Posted in Cloud Tagged: Cloud, Twitter, Visual Studio <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=168&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2008/10/13/just-launched-net-dev-buzz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/Openning.jpg" medium="image" />
	</item>
		<item>
		<title>Unit Testing Coming to a Workflow Near You</title>
		<link>http://blog.michaelckennedy.net/2008/09/30/unit-testing-coming-to-a-workflow-near-you/</link>
		<comments>http://blog.michaelckennedy.net/2008/09/30/unit-testing-coming-to-a-workflow-near-you/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 03:11:50 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[WF]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=170</guid>
		<description><![CDATA[[Update: See the follow up post "Significant Advances in Unit Testing Windows Workflow"] If you&#8217;ve been working with Windows Workflow, you&#8217;ll find it has some cool features for orchestration, long running operations, state machines, etc. However you won&#8217;t find very &#8230; <a href="http://blog.michaelckennedy.net/2008/09/30/unit-testing-coming-to-a-workflow-near-you/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=170&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:Verdana;font-size:small;">[Update: See the follow up post <a href="http://www.michaelckennedy.net/blog/2009/01/18/SignificantAdvancesInUnitTestingWindowsWorkflow.aspx">"Significant Advances in Unit Testing Windows Workflow"</a>]</p>
<p>If you&#8217;ve been working with Windows Workflow, you&#8217;ll find it has some cool features for orchestration, long running operations, state machines, etc.</p>
<p>However you won&#8217;t find very much support for Test Driven Development (TDD) or unit testing in general. In fact the architecture that makes Windows Workflow powerful (strict separation of workflow, activities, and the host for example) really gets in the way of unit tests.</p>
<p>There has been some work done on unit testing Windows Workflows. Here&#8217;s some links:</p>
<p></span></p>
<ul>
<li><span style="font-family:Verdana;font-size:small;"><a href="http://blogs.msdn.com/rjacobs/archive/2008/08/27/unit-testing-activities-with-windows-workflow-foundation.aspx">Unit Testing Activities with Windows Workflow Foundation</a></span><span style="font-family:Verdana;font-size:small;"> by Ron Jacobs</span><span style="font-family:Verdana;font-size:small;"><br />
</span></li>
<li><span style="font-family:Verdana;font-size:small;"><a href="http://blogs.msdn.com/rjacobs/archive/2008/08/26/unit-testing-workflows.aspx">TDD and Windows Workflow Foundation</a> by Ron Jacobs<br />
</span></li>
<li><span style="font-family:Verdana;font-size:small;"><a href="http://developers.de/blogs/andreas_erben/archive/2007/08/01/wf-unit-testing-simple-approach-to-activity-testing-and-improving-the-xoml-loader.aspx">WF &#8211; Unit Testing: Simple approach to Activity testing and improving the XOML loader</a> by Andreas Erben<br />
</span></li>
<li><span style="font-family:Verdana;font-size:small;"><a href="http://odetocode.com/Blogs/scott/archive/2006/08/02/5492.aspx">Unit Testing Workflow Activities</a> by K. Scott Allen<br />
</span></li>
</ul>
<p><span style="font-family:Verdana;font-size:small;">These are all very creative solutions. But, personally I find all of them more complex than they need to be. So in the near future I&#8217;ll be putting together some libraries and samples on unit testing Windows Workflow. I think you&#8217;ll find them far more powerful and at the same time simpler than anything out there.</p>
<p>So until I get that finished, if you have any feedback or considerations on unit testing Windows Workflow I&#8217;d love to hear it. If there are other articles I&#8217;m missing, please post them in the comments.</p>
<p>I think you&#8217;re going to like this…</p>
<p></span></p>
<br />Posted in Agile Tagged: Articles, WF, Workflow <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=170&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2008/09/30/unit-testing-coming-to-a-workflow-near-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>ClickOnce Deployment for Unmanaged Code (C++, VB6, etc)</title>
		<link>http://blog.michaelckennedy.net/2008/08/25/clickonce-deployment-for-unmanaged-code-c-vb6-etc/</link>
		<comments>http://blog.michaelckennedy.net/2008/08/25/clickonce-deployment-for-unmanaged-code-c-vb6-etc/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 03:14:00 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ClickOnce]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=172</guid>
		<description><![CDATA[ClickOnce is a great deployment model for many Windows applications built with the .NET Framework. Too bad it isn&#8217;t supported for C++, VB 6, or other technologies. Or is it&#8230; Surprisingly, you can deploy your unmanaged apps with ClickOnce. You &#8230; <a href="http://blog.michaelckennedy.net/2008/08/25/clickonce-deployment-for-unmanaged-code-c-vb6-etc/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=172&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/t71a733d.aspx">ClickOnce</a> is a great deployment model for many Windows applications built with the .NET Framework. Too bad it isn&#8217;t supported for C++, VB 6, or other technologies. Or is it&#8230;</p>
<p>Surprisingly, you can deploy your unmanaged apps with ClickOnce. You just need a tiny .NET app to get it started.<br />
<span id="more-172"></span></p>
<p>Here&#8217;s how it works:</p>
<ol>
<li>Take your existing C++ project.</li>
<li>Add to the solution a .NET console application.</li>
<li>Change the project settings on the console application to &#8220;Windows Application&#8221;.</li>
<li>Write the following code for your Main method of your .NET launcher application:
<pre><span style="color:black;background-color:transparent;font-family:Courier New;font-size:11px;"><span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">static</span> <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">void</span> Main(<span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">string</span>[] args) { <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;"> try</span> { Process.Start( <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"TheRealApp.exe"</span> ); } <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;">catch</span> ( Exception x ) { <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;"> string</span> msg <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"Error launch application:\n\n"</span> <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">+</span> x; <span style="color:blue;background-color:transparent;font-family:Courier New;font-size:11px;"> string</span> cap <span style="color:red;background-color:transparent;font-family:Courier New;font-size:11px;">=</span> <span style="color:#666666;background-color:#e4e4e4;font-family:Courier New;font-size:11px;">"Error Launching Application"</span>; MessageBox.Show( msg, cap, MessageBoxButtons.OK, MessageBoxIcon.Error ); } } </span></pre>
</li>
<li>Set the build path of your C++ app to be in the main folder for your .NET application.</li>
<li>Add the C++ app and its libraries (if any) as existing items in the .NET app.</li>
<li>Change the build action to &#8220;Always Copy&#8221; as shown here:<br />
<table>
<tbody>
<tr>
<td valign="top"><img src="http://www.michaelckennedy.net/blog/content/binary/ClickProperties.jpg" alt="" /></td>
<td valign="top"><img src="http://www.michaelckennedy.net/blog/content/binary/ClickSolution.jpg" alt="" /></td>
</tr>
</tbody>
</table>
</li>
<li>Then you publish your .NET application and when it runs, TADA!, the C++ app is deployed, versioned, and kept up to date as well.</li>
</ol>
<p><img src="http://www.michaelckennedy.net/blog/content/binary/ClickApp.jpg" alt="" /></p>
<p>If you want to try it yourself, you can run this sample application here:</p>
<p><a href="http://www.michaelckennedy.com/Samples/ClickOnceCpp/ClickOnceCpp.application">Run Michael&#8217;s Useless C++ App via ClickOnce&#8230;</a></p>
<p>You can also <a href="http://www.michaelckennedy.net/samples/clickoncecppsource.zip">download the source</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/michaelckennedy.wordpress.com/172/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/michaelckennedy.wordpress.com/172/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=172&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2008/08/25/clickonce-deployment-for-unmanaged-code-c-vb6-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/ClickProperties.jpg" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/ClickSolution.jpg" medium="image" />

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/ClickApp.jpg" medium="image" />
	</item>
		<item>
		<title>ThreadPool Bug in .NET 2.0 SP1 is Fixed!</title>
		<link>http://blog.michaelckennedy.net/2008/08/20/threadpool-bug-in-net-2-0-sp1-is-fixed/</link>
		<comments>http://blog.michaelckennedy.net/2008/08/20/threadpool-bug-in-net-2-0-sp1-is-fixed/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 03:17:33 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Debugging]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=174</guid>
		<description><![CDATA[I&#8217;m glad to confirm that the ThreadPool bug introduced in .NET 3.5 has been fixed in SP1 for .NET 3.5. For more background information, look at these posts. .NET 3.5 Brings Breaking Changes to ThreadPool Breaking Changes in the ThreadPool: &#8230; <a href="http://blog.michaelckennedy.net/2008/08/20/threadpool-bug-in-net-2-0-sp1-is-fixed/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=174&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m glad to confirm that the ThreadPool bug introduced in .NET 3.5 has been fixed in SP1 for .NET 3.5.</p>
<p>For more background information, look at these posts.<a href="http://www.michaelckennedy.net/blog/PermaLink,guid,708ee9c0-a1fd-46e5-8fa0-b1894ad6ce0f.aspx" target="_blank"><br />
</a></p>
<ol>
<li><a href="http://www.michaelckennedy.net/blog/PermaLink,guid,708ee9c0-a1fd-46e5-8fa0-b1894ad6ce0f.aspx" target="_blank">.NET 3.5 Brings Breaking Changes to ThreadPool</a></li>
<li><a href="http://www.michaelckennedy.net/blog/PermaLink,guid,040a74fe-6ea5-46fb-b3cb-049030ffd8c3.aspx" target="_blank">Breaking Changes in the ThreadPool: The Movie</a></li>
<li><a href="http://www.michaelckennedy.net/blog/PermaLink,guid,f57cf127-7bf7-445e-bef4-14c3598f92eb.aspx" target="_blank">Follow up on .NET 2.0 SP1 ThreadPool Bug</a></li>
<li><a href="http://www.michaelckennedy.net/blog/2008/04/17/MoreOnTheThreadPoolBugInNET20SP1.aspx" target="_blank">More on the ThreadPool Bug in .NET 2.0 SP1</a></li>
</ol>
<p>Now go forth and create some threads!</p>
<p>&nbsp;</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/michaelckennedy.wordpress.com/174/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/michaelckennedy.wordpress.com/174/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=174&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2008/08/20/threadpool-bug-in-net-2-0-sp1-is-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>
	</item>
		<item>
		<title>Dynamic Data Access with LINQ</title>
		<link>http://blog.michaelckennedy.net/2008/07/02/dynamic-data-access-with-linq/</link>
		<comments>http://blog.michaelckennedy.net/2008/07/02/dynamic-data-access-with-linq/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 03:19:22 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Screencasts]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=176</guid>
		<description><![CDATA[When I talk about LINQ people often ask whether it’s possible to have dynamic queries with LINQ. An example of this is presenting the user with a UI that allows them to optionally filter by some criteria or other and &#8230; <a href="http://blog.michaelckennedy.net/2008/07/02/dynamic-data-access-with-linq/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=176&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='584' height='359' src='http://www.youtube.com/embed/XE-75veRxQg?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;hd=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<p>When I talk about LINQ people often ask whether it’s possible to have dynamic queries with LINQ. An example of this is presenting the user with a UI that allows them to optionally filter by some criteria or other and sort by some criteria. This was straightforward if you built-up a SQL string in code.</p>
<p>The compiled, static nature of LINQ makes dynamic queries appear difficult at first. They are not and this video and sample application shows you how to accomplish just this.</p>
<p style="text-align:center;"><img class="aligncenter" style="border-color:initial;border-style:initial;border-width:0;" src="http://www.michaelckennedy.net/blog/content/binary/DynamicLinqScreenShot.jpg" alt="" width="637" height="511" border="0" /> Screen shot of sample application</p>
<p><span style="font-size:11pt;line-height:115%;">You</span><span style="font-size:11pt;line-height:115%;"> <span style="line-height:115%;">can download the source code here</span></span>:</p>
<p><a href="http://www.michaelckennedy.net/blog/content/binary/Kennedy-Dynamic-Linq.zip">Kennedy-Dynamic-Linq.zip (88.34 KB)</a></p>
<p>And you can download the screencast video here:</p>
<p><a href="http://www.michaelckennedy.net/Downloads/videos/Kennedy-Dynamic-Linq.wmv">Kennedy-Dynamic-Linq.wmv (35.7 MB)</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/michaelckennedy.wordpress.com/176/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/michaelckennedy.wordpress.com/176/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/michaelckennedy.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/michaelckennedy.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/michaelckennedy.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/michaelckennedy.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/michaelckennedy.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/michaelckennedy.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/michaelckennedy.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/michaelckennedy.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/michaelckennedy.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/michaelckennedy.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/michaelckennedy.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/michaelckennedy.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=176&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2008/07/02/dynamic-data-access-with-linq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.michaelckennedy.net/Downloads/videos/Kennedy-Dynamic-Linq.wmv" length="37475809" type="video/asf" />
	
		<media:content url="http://0.gravatar.com/avatar/cb053688f95dbebf60e5c19a3d05110c?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mkennedy66996693</media:title>
		</media:content>

		<media:content url="http://www.michaelckennedy.net/blog/content/binary/DynamicLinqScreenShot.jpg" medium="image" />
	</item>
	</channel>
</rss>
