<?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; c#</title>
	<atom:link href="http://www.adammokan.com/category/development/dot-net/c-sharp/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>Slides from my &#8220;Intro to SignalR&#8221; presentation at Desert Code Camp</title>
		<link>http://www.adammokan.com/2011/11/08/intro-to-signalr-slides/</link>
		<comments>http://www.adammokan.com/2011/11/08/intro-to-signalr-slides/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 04:45:36 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[desert code camp 2011.2]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[nuget]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[signalr]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[asp.net mvc 3]]></category>
		<category><![CDATA[dcc11]]></category>
		<category><![CDATA[desert code camp]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[long-polling]]></category>
		<category><![CDATA[SignalR]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=84</guid>
		<description><![CDATA[I uploaded the slides from my &#8220;Intro to SignalR&#8221; presentation at Desert Code Camp 2011.2 which was held this past weekend (11/05/2011) at Chandler-Gilbert Community College. I did add some additional bullet points and text content to the slide deck since I&#8217;m not a big fan of standing in front of a bunch of that [...]]]></description>
			<content:encoded><![CDATA[<p>I uploaded the slides from my &#8220;Intro to SignalR&#8221; presentation at Desert Code Camp 2011.2 which was held this past weekend (11/05/2011) at Chandler-Gilbert Community College.</p>
<p>I did add some additional bullet points and text content to the slide deck since I&#8217;m not a big fan of standing in front of a bunch of that during a presentation and would rather talk with the attendees and show some code. Either way, check the slides out if you&#8217;d like.</p>
<p><a href="http://www.slideshare.net/adammokan/introduction-to-signalr-10082193" target="_blank">http://www.slideshare.net/adammokan/introduction-to-signalr-10082193</a></p>
<p>Next up is some tweaks to my samples, which were not cooperating with me so much during my session. I will expose that repo on Github soon and post an update.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/11/08/intro-to-signalr-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Presenting on SignalR at Desert Code Camp 2011.2</title>
		<link>http://www.adammokan.com/2011/11/02/presenting-on-signalr-at-desert-code-camp-2011-2/</link>
		<comments>http://www.adammokan.com/2011/11/02/presenting-on-signalr-at-desert-code-camp-2011-2/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 01:35:44 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net mvc3]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[desert code camp 2011.2]]></category>
		<category><![CDATA[dot net]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[signalr]]></category>
		<category><![CDATA[asp.net mvc 3]]></category>
		<category><![CDATA[dcc]]></category>
		<category><![CDATA[SignalR]]></category>
		<category><![CDATA[web sockets]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/?p=81</guid>
		<description><![CDATA[I will be presenting on SignalR at Desert Code Camp this weekend (November 5th, 2011), for anyone in the metro-Phoenix area. My SignalR session begins at 11:30am (hour long) and will be held in room IRN-125. For more info on Desert Code Camp, visit http://nov2011.desertcodecamp.com]]></description>
			<content:encoded><![CDATA[<p>I will be <a href="http://nov2011.desertcodecamp.com/session/413" target="_blank">presenting on SignalR</a> at Desert Code Camp this weekend (November 5th, 2011), for anyone in the metro-Phoenix area.</p>
<p>My SignalR session begins at 11:30am (hour long) and will be held in room IRN-125.</p>
<p>For more info on Desert Code Camp, visit <a href="http://nov2011.desertcodecamp.com" target="_blank">http://nov2011.desertcodecamp.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2011/11/02/presenting-on-signalr-at-desert-code-camp-2011-2/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>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>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>Windows Phone 7 development</title>
		<link>http://www.adammokan.com/2010/03/18/windows-phone-7-development/</link>
		<comments>http://www.adammokan.com/2010/03/18/windows-phone-7-development/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 14:30:00 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[c#]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[xna]]></category>
		<category><![CDATA[mix10]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[silverlight 4]]></category>
		<category><![CDATA[windows phone]]></category>
		<category><![CDATA[winphone7]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/2010/03/18/windows-phone-7-development/</guid>
		<description><![CDATA[So, the WinPhone7 development tools &#34;preview&#34; (or whatever its called) was released earlier this week. I&#39;m, personally, pretty excited. Silverlight development is something I&#39;ve been wanting to do more of and I&#39;m an absolute nerd when it comes to gadgets. I was an early smartphone adopter going back to the WindowsCE/Mobile days, then a PalmOS [...]]]></description>
			<content:encoded><![CDATA[<p>So, the WinPhone7 development tools &quot;preview&quot; (or whatever its called) was released earlier this week. I&#39;m, personally, pretty excited. Silverlight development is something I&#39;ve been wanting to do more of and I&#39;m an absolute nerd when it comes to gadgets.</p>
<p>I was an early smartphone adopter going back to the WindowsCE/Mobile days, then a PalmOS phone, then an iPhone, and now I&#39;m using a Google Nexus One. I love my Nexus One, but I&#39;ve not found the time to get my Java hat on and mess with much development lately. Being that the new WinPhone7 development is Silverlight, XNA, and C#, that will be very easy for me to mess with some development during lunch at work and things like that. I have some XNA experience from years ago and have been wanting to mess with that again sometime, too. This all gives me a good excuse.</p>
<p>I&#39;m pretty excited about the technology stack.&#0160;<a href="http://hodnick.com/post/453609901/wp7devtoolsimpressions" target="_blank" title="http://hodnick.com/post/453609901/wp7devtoolsimpressions">This</a>&#0160;blog post by Mike Hodnick (who does some awesome Silverlight audio/synthesizer development) describes his first-impressions of the tools. Sounds like the emulator is somewhat limited, but I&#39;m sure we will see improvements over the next few months.</p>
<p>With this announcement and the Silverlight 4 RC release at MIX10, I expect this year to blow up with Silverlight development.</p>
<p><a href="http://www.silverlight.net/getstarted/silverlight-4/" target="_blank">Get started with Silverlight 4</a></p>
<p><a href="http://www.silverlight.net/getstarted/silverlight-4/" target="_blank"></a> <a href="http://developer.windowsphone.com/windows-phone-7-series/" target="_blank">Windows Phone 7 development site</a> </p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2010/03/18/windows-phone-7-development/feed/</wfw:commentRss>
		<slash:comments>0</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>
		<item>
		<title>jQuery autocomplete plugin with ASMX web service and JSON</title>
		<link>http://www.adammokan.com/2009/11/04/jquery-autocomplete-plugin-with-asmx-web-service-and-json/</link>
		<comments>http://www.adammokan.com/2009/11/04/jquery-autocomplete-plugin-with-asmx-web-service-and-json/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 07:00:00 +0000</pubDate>
		<dc:creator>adam.mokan</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[soa]]></category>
		<category><![CDATA[asmx]]></category>
		<category><![CDATA[autocomplete]]></category>

		<guid isPermaLink="false">http://www.adammokan.com/2009/11/04/jquery-autocomplete-plugin-with-asmx-web-service-and-json/</guid>
		<description><![CDATA[I&#8217;m trying to find more reasons to switch a lot of my js/ajax ui over to jQuery recently. This is due to my excursions into Rails and Sinatra outside of work, and also because I feel like some of the MS Ajax Toolkit extenders seem to be bloated at times. I also figure that since [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to find more reasons to switch a lot of my js/ajax ui over to jQuery recently. This is due to my excursions into Rails and Sinatra outside of work, and also because I feel like some of the MS Ajax Toolkit extenders seem to be bloated at times. I also figure that since I intend to dip my feet more into the ASP.NET MVC framework, jQuery seems to be very standard there.&nbsp;</p>
<p>That brings me to (one of) the jQuery Autocomplete plugins. I need this functionality in an ASP.NET webforms application and wanted to give it a shot. I started messing with &#8220;jQuery Autocomplete plugin 1.1&#8243; by Jörn Zaefferer. You can find the code and info at&nbsp;<a href="http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/">http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/</a>.&nbsp;</p>
<p>I&#8217;m mostly interested in doing an autocomplete via a remote web service call that returns json data. The example in the zip file includes a little php page that just responds to a HTTP-GET and spits out some hard-coded json. I&#8217;m working in .NET, so I made a simple ASMX web service to query my database and return a DataTable as json. (Note &#8211; There are isues with the built-in serializer to return a DataTable as json. A google search will find you a number of functions or alternate ways to generate a json string from a DataTable.)&nbsp;
</p>
<p>Right away, I found I was having problems with the autocomplete in this environment. First off, you have the whole issue with ASMX web methods only accepting a POST by default. This is easy to change, but not advised. You can find info on that issue here &#8211; <a href="http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/">http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/</a> and some other good info here &#8211; <a href="http://encosia.com/2008/06/05/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/">http://encosia.com/2008/06/05/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/</a>&nbsp;
</p>
<p>You&#8217;ll also notice in the above blog links that there can often be issues when POST-ing to a web method with encoding set to json, that you will need to pass your json params as a string. If you&#8217;re using something like Firebug to watch your ajax posts, you&#8217;ll catch this right away.&nbsp;
</p>
<p>But the main issue for me were&nbsp;the assumptions that the autocomplete plugin makes. It, by default, will only do a HTTP-GET. You can use the $.ajaxSetup in jQuery to set your future ajax calls to a default, but I wanted the ability to make this decision when calling the autocomplete plugin.&nbsp;
</p>
<p>I made these changes to jquery.autocomplete.js in the $.ajax section :</p>
<pre class="brush: js; highlight:[7,8,9,10];">
$.ajax({
// try to leverage ajaxQueue plugin to abort previous requests
mode: "abort",
// limit abortion to this input
port: "autocomplete" + input.name,
dataType: options.dataType,
//setup new options for asmx - amokan
type: options.httpMethod,
contentType: options.contentType,
//end new options - amokan
url: options.url,
</pre>
<p>This allows me to now handle my client side code a little better.</p>
<pre class="brush: js; highlight:[5,6];">
$("#task").autocomplete(
"http://somecomputername/jsonServiceTest/Testing.asmx/GetSomeDataNoParam",
{
dataType: 'json',
httpMethod: 'POST',
contentType: 'application/json; charset=utf-8',
max: 100,
scroll: true,
matchContains: true,
minChars: 3,
parse: function(data) {
var rows = new Array();
//your parsing logic
},
formatItem: function(row, i, n) {
//do something
},
width: 260
}
);
</pre>
<p>I&#8217;m still working on cleaning up the data parameter section of the plugin a bit before I post the full code.<br />
If you&#8217;re curious, here is my ASMX method. Be sure to add the [ScriptService] attribute to your class in the ASMX file so it can handle AJAX properly. If you are using an older .NET without the System.Web.Script.Services namespace, this will not work for you. Note that the parameters &#8220;q&#8221; and &#8220;limit&#8221; are sent automatically by the autocomplete plugin. &#8220;Q&#8221; is the string currently typed into the text control so you can filter your query based on what the user has typed and &#8220;limit&#8221; is the max number of rows. Obviously, its up to you to implement these in your query if you chose to. &nbsp;</p>
<pre class="brush: csharp">
[WebMethod]
[ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
public string GetSomeDataNoParam(string q, int limit)
{
DataTable dtSomething;
//connect to db, do your exception handling, etc
dtSomething = //your DAL or whatever you use
//use my method to parse the datatable into json
return GetJSONString(dtSomething);
}
</pre>
<p>Hope this helps a bit and I will be sure to upload some more code as I get this working a bit smoother in my environment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.adammokan.com/2009/11/04/jquery-autocomplete-plugin-with-asmx-web-service-and-json/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

