<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>adam mokan &#187; asp.net mvc</title>
	<atom:link href="http://www.adammokan.com/category/development/dot-net/asp-net-mvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adammokan.com</link>
	<description>ramblings of a software developer, mad scientist, geek, and father</description>
	<lastBuildDate>Tue, 22 Nov 2011 19:11:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MVC Mini Profiler</title>
		<link>http://www.adammokan.com/2011/11/14/mvc-mini-profiler/</link>
		<comments>http://www.adammokan.com/2011/11/14/mvc-mini-profiler/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 18:07:37 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[asp.net mvc3]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[nuget]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[asp.net mvc 3]]></category>
		<category><![CDATA[mvc-mini-profiler]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=82</guid>
		<description><![CDATA[I&#8217;ve started to use the very helpful Mini-Profiler in my apps and love the base functionality provided and optional approach to profiling specific portions of your application. It&#8217;s worth mentioning that Mini-Profiler is open source and used in production by the folks at StackOverflow, so feel confident that it is a solid assembly with plenty [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started to use the very helpful <a href="http://code.google.com/p/mvc-mini-profiler/" target="_blank">Mini-Profiler</a> in my apps and love the base functionality provided and optional approach to profiling specific portions of your application. It&#8217;s worth mentioning that Mini-Profiler is open source and used in production by the folks at <a href="http://stackoverflow.com" target="_blank">StackOverflow</a>, so feel confident that it is a solid assembly with plenty of options to meet your needs.</p>
<p>For those that haven&#8217;t checked it out, bring MiniProfiler into your application <a href="http://nuget.org/List/Packages/MiniProfiler" target="_blank">via NuGet</a> with a</p>
<pre>Install-Package MiniProfiler</pre>
<p>If you are working in a web project (MVC, WebForms), you simply add the following line of code in your head block <em>AFTER</em> your jQuery reference (this line is formatted as Razor for MVC 3) -</p>
<pre>@MvcMiniProfiler.MiniProfiler.RenderIncludes()</pre>
<p>One thing worth mentioning is that on IE9, I had some issues with the UI of the profiler displaying appropriately. I looked around and found a post mentioning adding the following to your CSS file and sure enough, it fixed my IE9 issue. So, give it a shot if you have any problems displaying the profile on Internet Explorer.</p>
<pre>div.profiler-popup
{
    overflow: visible !important;
}</pre>
<div id="attachment_86" class="wp-caption alignnone" style="width: 310px"><a href="http://www.adammokan.com/wp-content/uploads/2011/11/mini_profiler.png"><img class="size-medium wp-image-86" title="mvc-mini-profiler" src="http://www.adammokan.com/wp-content/uploads/2011/11/mini_profiler-300x93.png" alt="" width="300" height="93" /></a><p class="wp-caption-text">Mini-Profiler UI on a simple ASP.NET MVC 3 page</p></div>
<p>I&#8217;ve had success using this for profiling ASP.NET MVC3 applications as well as Entity Framework 4.2 &#8220;Code First&#8221; queries within the apps, which is great. I still really like the <a href="http://efprof.com/" target="_blank">Entity Framework Profiler</a> tool from Hibernating Rhinos and rely on it heavily, but Mini-Profiler does a good job of showing ORM query issues.</p>
<p>I plan to try this out with some old WCF projects in the near future as well. In the meantime, pop it into one of your development applications and make sure your code is performing how you expect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/11/14/mvc-mini-profiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Looking for feedback on future content</title>
		<link>http://www.adammokan.com/2011/07/18/looking-for-feedback-on-future-content/</link>
		<comments>http://www.adammokan.com/2011/07/18/looking-for-feedback-on-future-content/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 19:26:46 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[asp.net mvc3]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[mvcscaffolding]]></category>
		<category><![CDATA[node.js]]></category>
		<category><![CDATA[nuget]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[teamcity]]></category>
		<category><![CDATA[templify]]></category>
		<category><![CDATA[unit testing]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[htmlhelpers]]></category>
		<category><![CDATA[ninject]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=74</guid>
		<description><![CDATA[Yeah, yeah. I know this will probably show up as an empty promise since I always have the best intentions to post more, but I have some blog posts and samples in the works (some were literally ready to post and then a change came out and I have to make adjustments). My goal is [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, yeah. I know this will probably show up as an empty promise since I always have the best intentions to post more, but I have some blog posts and samples in the works (some were literally ready to post and then a change came out and I have to make adjustments). My goal is to get at least one of them out by the end of July. If anyone has feedback on what they&#8217;d like to see first, please comment.</p>
<p>On deck, in no particular order :</p>
<ul>
<li>A detailed post (with code and a Templify template to get you started) on a generic repository pattern for ASP.NET MVC 3 and Entity Framework 4.1 along with a unit tests that utilize SQL Compact edition that automatically create a new SQL Compact file upon starting tests, populates the schema with sample data, and then subsequently deletes the file after tests are complete. Dependency injection is done via Ninject, which is my IoC of choice for MVC3.</li>
<li>A post on consuming portable areas in MVC 3 for a plugin-like architecture. Think &#8220;modules&#8221; that can be dynamically loaded.</li>
<li>A post on the MVC lifecycle and when and why to use the various filter interfaces provided by ASP.NET MVC3.</li>
<li>A post on Node.js from a .NET developers perspective and how to get started with hosting, the current state of node on Windows and so-on.</li>
<li>A post on custom HtmlHelpers for MVC3 showing various techniques to keep those views nice and DRY.</li>
<li>A post on running JetBrains TeamCity 6.5 in the cloud using Amazon&#8217;s EC2 &#8220;micro&#8221; instance and automatically bringing up build agents and terminating them after the build. The post would be aimed at .NET development.</li>
</ul>
<div>If you have any feedback on what you&#8217;d like to see, please comment.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/07/18/looking-for-feedback-on-future-content/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Desert Code Camp Session Resources &#8211; Part One</title>
		<link>http://www.adammokan.com/2011/04/03/dcc-session-resources-part1/</link>
		<comments>http://www.adammokan.com/2011/04/03/dcc-session-resources-part1/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 05:19:17 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[asp.net mvc3]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[desert code camp 2011.1]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[nuget]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[templify]]></category>
		<category><![CDATA[april 2011]]></category>
		<category><![CDATA[dcc11]]></category>
		<category><![CDATA[desert code camp]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=65</guid>
		<description><![CDATA[I will be making a number of posts over the next few days in regards to content I glossed over during my two technical sessions at Desert Code Camp 2011.1 on April 2nd, 2011. This is the first of many and focused on the Templify tool, the template I used, and some links to scaffolding/t4 [...]]]></description>
			<content:encoded><![CDATA[<p><em>I will be making a number of posts over the next few days in regards to content I glossed over during my two technical sessions at Desert Code Camp 2011.1 on April 2nd, 2011. This is the first of many and focused on the Templify tool, the template I used, and some links to scaffolding/t4 templates. These topics have generated the most interest/emails/tweets since yesterday. Keep checking back for more content, though.</em></p>
<p><em> </em></p>
<p><em>* If you attended any of my sessions, <strong>please</strong> <a href="http://bit.ly/rate_my_dcc_presentations" target="_blank">rate them</a> for me. The feedback helps. I understand a lot of things were skipped due to time constraints, but I&#8217;d appreciate any constructive criticism as this was my first time speaking in a short one hour format. I learned, the hard way, topics need to be extremely concise!</em></p>
<hr />
<h2><strong>Tools</strong></h2>
<ul>
<li><strong>Templify &#8211; </strong><a href="http://opensource.endjin.com/templify/" target="_blank">http://opensource.endjin.com/templify/</a>
<ul>
<li>The Templify template I used to start my MVC project during my 11:30am session can be found <a title="Adam Mokan MVC 3 templify template" href="http://dl.dropbox.com/u/6656253/adammokan_mvc-3.0-template.zip">here</a> (in zip format).</li>
<li>I intend, <em>when I have time</em>, to put the template project on GitHub and add a build task to generate the template automatically. Until then:
<ul>
<li>To install the template, unzip the file. You should see a *.pkg file.</li>
<li>Copy the pkg file to your AppData\Roaming\Endjin\Templify\repo (as an example, on Win7, mine is <em>C:\Users\amokan\AppData\Roaming\Endjin\Templify\repo</em>)</li>
<li>You should then be able to make a new folder in Windows Explorer, right click on it and say &#8220;Templify Here&#8221;.</li>
<li>Enjoy my weird project conventions, find gaping issues with my template, make your own, or just downright loathe the whole situation.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h2><strong>Web Links/Bundles</strong></h2>
<ul>
<li><strong>MVC Scaffolding &#8211; </strong><a href="http://bit.ly/mvc_scaffolding" target="_blank">http://bit.ly/mvc_scaffolding</a></li>
<li><strong>PowerShell &amp; T4 Template docs at MSDN &#8211; </strong><a href="http://bit.ly/powershell_and_t4" target="_blank">http://bit.ly/powershell_and_t4</a></li>
</ul>
<p>That&#8217;s it for tonight. More coming soon along with code on GitHub!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/04/03/dcc-session-resources-part1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presenting at the PCSUG on April 6th</title>
		<link>http://www.adammokan.com/2011/03/24/pcsug-april2011/</link>
		<comments>http://www.adammokan.com/2011/03/24/pcsug-april2011/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 19:52:44 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[asp.net mvc3]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[pcsug]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[soa]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[april 2011]]></category>
		<category><![CDATA[atom]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=63</guid>
		<description><![CDATA[On Wednesday, April 6th I will be presenting at the Phoenix Connected Systems User Group on utilizing ASP.NET MVC as an &#8220;alternative&#8221; to various web service options in the .NET stack (WCF, ASMX, etc). The group meets at Interface Technical Training near the corner of Thomas and Central in downtown Phoenix. More info can be [...]]]></description>
			<content:encoded><![CDATA[<p>On Wednesday, April 6th I will be presenting at the Phoenix Connected Systems User Group on utilizing ASP.NET MVC as an &#8220;alternative&#8221; to various web service options in the .NET stack (WCF, ASMX, etc).</p>
<p>The group meets at Interface Technical Training near the corner of Thomas and Central in downtown Phoenix.</p>
<p>More info can be found here &#8211; <a href="http://bit.ly/pcsug_apr11" target="_blank">http://bit.ly/pcsug_apr11</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/03/24/pcsug-april2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Links shown during my MVC3 presentation at the Southeast Valley .NET User Group</title>
		<link>http://www.adammokan.com/2011/02/24/links-shown-during-my-sevdnug-mvc3-presentation/</link>
		<comments>http://www.adammokan.com/2011/02/24/links-shown-during-my-sevdnug-mvc3-presentation/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 01:05:42 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[architectural patterns]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[asp.net mvc3]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[nuget]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[sevdnug]]></category>
		<category><![CDATA[templify]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[mvc3]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=58</guid>
		<description><![CDATA[If you attended my presentation or not, I have compiled a list of valuable links to cover many aspects of ASP.NET MVC3 discussed in the presentation on Feb 24, 2011. Here is a bundle thanks to bit.ly and bridgeurl. http://bit.ly/sevdnug_mvc3_presentation_links]]></description>
			<content:encoded><![CDATA[<p>If you attended my presentation or not, I have compiled a list of valuable links to cover many aspects of ASP.NET MVC3 discussed in the presentation on Feb 24, 2011.</p>
<p>Here is a bundle thanks to bit.ly and bridgeurl.</p>
<p><a href="http://bit.ly/sevdnug_mvc3_presentation_links">http://bit.ly/sevdnug_mvc3_presentation_links</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/02/24/links-shown-during-my-sevdnug-mvc3-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Desert Code Camp 2011.1 presentation &#8211; Getting Things Done With ASP.NET MVC3</title>
		<link>http://www.adammokan.com/2011/01/26/desert-code-camp-2011-1-presentation-getting-things-done-with-asp-net-mvc3/</link>
		<comments>http://www.adammokan.com/2011/01/26/desert-code-camp-2011-1-presentation-getting-things-done-with-asp-net-mvc3/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 23:47:42 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[asp.net mvc3]]></category>
		<category><![CDATA[desert code camp 2011.1]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[nuget]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[dcc11]]></category>
		<category><![CDATA[desert code camp]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=55</guid>
		<description><![CDATA[I just noticed my session was approved for Desert Code Camp 2011.1, which is a free all-day event in lovely Chandler, Arizona and held at the Chandler-Gilbert Community College campus. The first DCC of 2011 will be held on April 2nd and goes from 8:00am-5:00pm. Joe Guadagno, who organizes the event (along with a number [...]]]></description>
			<content:encoded><![CDATA[<p>I just noticed my session was approved for <a title="Desert Code Camp 2011.1" href="http://apr2011.desertcodecamp.com/" target="_blank">Desert Code Camp 2011.1</a>, which is a free all-day event in lovely Chandler, Arizona and held at the Chandler-Gilbert Community College <a href="http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=Chandler-Gilbert+Community+College&amp;aq=&amp;sll=33.292611,-111.796591&amp;sspn=0.017075,0.026157&amp;gl=us&amp;g=2626+E+Pecos+Rd,+Chandler,+AZ+85225&amp;ie=UTF8&amp;z=16" target="_blank">campus</a>. The first DCC of 2011 will be held on April 2nd and goes from 8:00am-5:00pm. <a href="http://twitter.com/jguadagno" target="_blank">Joe Guadagno</a>, who organizes the event (along with a number of other events/groups here in metro Phoenix) deserves a lot of credit for the third code camp here since last May.</p>
<p>If you are in the valley and have never attended, I highly recommend you do so. Nothing like a day of free sessions on all aspects of the industry from development (on nearly every platform), project management, data visualization, web development, etc.</p>
<p>My session will be focused on productivity using <a href="http://www.asp.net/mvc/mvc3" target="_blank">ASP.NET MVC3</a> and I will be demonstrating tools for custom project templates, <a title="NuGet package manager" href="http://nuget.codeplex.com/" target="_blank">NuGet</a> (and how to use it within your organization to leverage good building blocks), <a href="http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx" target="_blank">Razor</a>, and more.</p>
<p><a title="Desert Code Camp 2011.1 - Adam Mokan presentation" rel="nofollow" href="http://bit.ly/adammokan_dcc2011" target="_blank">http://bit.ly/adammokan_dcc2011</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/01/26/desert-code-camp-2011-1-presentation-getting-things-done-with-asp-net-mvc3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEVDNUG Feb 2011 presentation on ASP.NET MVC3</title>
		<link>http://www.adammokan.com/2011/01/06/sevdnug-feb-2011-presentation-on-asp-net-mvc3/</link>
		<comments>http://www.adammokan.com/2011/01/06/sevdnug-feb-2011-presentation-on-asp-net-mvc3/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 17:00:24 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[asp.net mvc3]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[gangplank]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[sevdnug]]></category>
		<category><![CDATA[chandler]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[mvc3]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=51</guid>
		<description><![CDATA[I will be presenting on ASP.NET MVC3 at the Southeast Valley Dot Net User Group (SEVDNUG) meeting on Febuary 24, 2011. I will be covering changes from MVC2, the Razor View Engine, and many other items. Lot&#8217;s of actual code and real-life scenarios. Expectations are that attendees know the MVC pattern and have some experience [...]]]></description>
			<content:encoded><![CDATA[<p>I will be presenting on <a href="http://www.asp.net/mvc/mvc3" target="_blank">ASP.NET MVC3</a> at the <a href="http://www.sevdnug.org" target="_blank">Southeast Valley Dot Net User Group</a> (SEVDNUG) meeting on Febuary 24, 2011. I will be covering changes from MVC2, the Razor View Engine, and many other items. Lot&#8217;s of actual code and real-life scenarios. Expectations are that attendees know the MVC pattern and have some experience with the Microsoft implementation. If you have no experience with MVC, I still encourage you to attend and will gladly answer basic questions after the meeting for those coming from web forms or another platform.</p>
<p>I will also be posting all code samples on my GitHub account a few minutes before the presentation and posting the URL here and on <a href="http://twitter.com/adammokan" target="_blank">my twitter account</a>.</p>
<p>The meeting will start at 6pm and is held at <a href="http://www.gangplankhq.com" target="_blank">Gangplank </a>in downtown Chandler, Arizona.</p>
<p>More info and details can be found here &#8211; <a href="http://bit.ly/sevdnug_mvc" target="_blank">http://bit.ly/sevdnug_mvc</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/01/06/sevdnug-feb-2011-presentation-on-asp-net-mvc3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC Controller Navigator</title>
		<link>http://www.adammokan.com/2010/10/06/asp-net-mvc-controller-navigator/</link>
		<comments>http://www.adammokan.com/2010/10/06/asp-net-mvc-controller-navigator/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 18:36:26 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[controllernavigator]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=37</guid>
		<description><![CDATA[I have watched a number of developers new to ASP.NET MVC start a new project and have trouble with concepts like routing. The concepts of routing and controllers can be tough to grasp after years of development where you are thinking about a file on disk and you just entered the URL for that file. [...]]]></description>
			<content:encoded><![CDATA[<p>I have watched a number of developers new to ASP.NET MVC start a new project and have trouble with concepts like routing. The concepts of routing and controllers can be tough to grasp after years of development where you are thinking about a file on disk and you just entered the URL for that file. It got me thinking about making life a little easier during the development process when you may not have your navigation plumbing in place and just want to zip through a couple controllers and show someone your app. Phil Haack&#8217;s <a href="http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx">Routing Debugger</a> has always been a great help during development on a site with custom routes and his tool (and source code) gave me a huge head start on what I wanted to do.</p>
<p>So I came up with an assembly I&#8217;m calling &#8220;ControllerNavigator&#8221; for now (<a href="http://github.com/amokan/ControllerNavigator">http://github.com/amokan/ControllerNavigator</a>). I didn&#8217;t spend time to come up with a cool name like the Ruby folks normally do yet. Will have to reference a cult-classic 80s flick or something if I do much more work on it. To use ControllerNavigator (man, I&#8217;m hating the name already), you reference the assembly in your MVC project, and add a line to your Application_Start() in Global.asax.</p>
<pre class="brush: csharp; highlight:[7];">
protected void Application_Start()
{
	AreaRegistration.RegisterAllAreas();

	RegisterRoutes(RouteTable.Routes);

	ControllerNavigator.Navigator.DisplayNavigator(RouteTable.Routes);
}
</pre>
<p>That generates this markup at a custom route, which you could set as the default start page in Visual Studio during development.</p>
<p><a href="http://www.adammokan.com/wp-content/uploads/2010/10/ControllerNavigator.png"><img src="http://www.adammokan.com/wp-content/uploads/2010/10/ControllerNavigator.png" alt="" title="ControllerNavigator" width="794" height="300" class="alignnone size-full wp-image-38" /></a></p>
<p>What happens in DisplayNavigator is some fun C# reflection code that queries your MVC assembly to find all of the controllers, methods in those controllers, and any actionfilters/attributes they have. There are options before calling DisplayNavigator() to filter out certain attributes and also to specify which base class your controllers are inherited from, if different than System.Web.Mvc.Controller. Then, by stealing some of Mr Haack&#8217;s code from his RouteDebugger, it takes the data and generates a custom route (defaults to &#8220;/Navigator&#8221;) that shows a table listing your controllers, methods, method return types (ActionMethod, JsonMethod, etc), and finally a hyperlink that will launch that route in a new window.</p>
<p>I have some more ideas to make this more useful, which are listed on <a href="http://github.com/amokan/ControllerNavigator">the GitHub page</a>, but in the meantime feel free to check it out or steal the code to make your own version. If you have questions or comments, hit me up on <a href="http://twitter.com/adammokan">twitter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2010/10/06/asp-net-mvc-controller-navigator/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ELMAH = awesome</title>
		<link>http://www.adammokan.com/2009/12/02/elmah-awesome/</link>
		<comments>http://www.adammokan.com/2009/12/02/elmah-awesome/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 07:00:00 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[asp.net mvc]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[elmah]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/2009/12/02/elmah-awesome/</guid>
		<description><![CDATA[So, I&#39;m a bit late to the game on this. But ELMAH (Error Logging Modules and Handlers) is awesome. Basically just drop the dll in your bin folder on your project and adjust your web.config. It handles your error handling and logging automatically. Very slick. I got it in place today on a couple apps [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#39;m a bit late to the game on this. But <a href="http://elmah.googlecode.com/">ELMAH</a> (Error Logging Modules and Handlers) is awesome.<br />
Basically just drop the dll in your bin folder on your project and adjust your web.config. It handles your error handling and logging automatically. Very slick.<br />
I got it in place today on a couple apps (ASP.NET webforms and ASP.NET MVC 2) and it writes to a SQL database (one of many options for logging).<br />
But, as with most things I mess with, its not enough (and not its own fault). I have an internal system already in place for tracking and managing our applications. I setup the ELMAH table in the same database as my tracking app and want to have a way to tie them together. So, now I am modifying the Error.cs class in the Elmah source to allow me to put the ApplicationID in the web.config so I can query the Elmah error table in relation to my existing application metrics.<br />
I highly recommend checking this little utility out if you&#39;re doing .NET development.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2009/12/02/elmah-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

