<?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>The Blog of Zachary Snow &#187; WinForms</title>
	<atom:link href="http://zacharysnow.net/tag/winforms-dotnet-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://zacharysnow.net</link>
	<description></description>
	<lastBuildDate>Tue, 20 Dec 2011 19:41:02 +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>500 Downloads of the Same Game</title>
		<link>http://zacharysnow.net/2010/06/09/500-downloads-of-the-same-game/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=500-downloads-of-the-same-game</link>
		<comments>http://zacharysnow.net/2010/06/09/500-downloads-of-the-same-game/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 20:17:28 +0000</pubDate>
		<dc:creator>Zachary</dc:creator>
				<category><![CDATA[XNA]]></category>
		<category><![CDATA[codeplex]]></category>
		<category><![CDATA[SameGameXna]]></category>
		<category><![CDATA[WinForms]]></category>

		<guid isPermaLink="false">http://zacharysnow.net/2010/06/09/500-downloads-of-the-same-game/</guid>
		<description><![CDATA[My little Xna game that I wrote nearly 2 years ago reached the 500 downloads mark (binaries and source) the other day. With that said, I&#8217;d like to say that I&#8217;m working on version 2.0. In version 2.0 I&#8217;m going &#8230; <a href="http://zacharysnow.net/2010/06/09/500-downloads-of-the-same-game/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My little Xna game that I wrote nearly 2 years ago reached the 500 downloads mark (binaries and source) the other day. With that said, I&#8217;d like to say that I&#8217;m working on version 2.0.</p>
<p>In version 2.0 I&#8217;m going to make the code more event driven. The old code uses the Xna Game class and in the new version I&#8217;ll be making it WinForms based. Almost a complete rewrite.</p>
<p>My work so far is available through SVN on the project&#8217;s <a href="http://samegamexna.codeplex.com/">Codeplex page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zacharysnow.net/2010/06/09/500-downloads-of-the-same-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WinForms and MVC</title>
		<link>http://zacharysnow.net/2010/05/26/winforms-and-mvc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=winforms-and-mvc</link>
		<comments>http://zacharysnow.net/2010/05/26/winforms-and-mvc/#comments</comments>
		<pubDate>Wed, 26 May 2010 18:53:09 +0000</pubDate>
		<dc:creator>Zachary</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[WinForms]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://zacharysnow.net/?p=304</guid>
		<description><![CDATA[I recently became interested in doing MVC inside of a Windows Forms app. I found a few MVC frameworks which work with WinForms (see here) but they didn&#8217;t really interest me. Too heavy I felt for what I was looking &#8230; <a href="http://zacharysnow.net/2010/05/26/winforms-and-mvc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently became interested in doing MVC inside of a Windows Forms app. I found a few MVC frameworks which work with WinForms (<a href="http://stackoverflow.com/questions/2406/looking-for-a-mvc-sample-for-winforms">see here</a>) but they didn&#8217;t really interest me. Too heavy I felt for what I was looking to do. I ended up with a solution looking something like this:</p>
<p><a href="http://zacharysnow.net/wp-content/uploads/2010/05/WinFormsMvcSolution.png"><img src="http://zacharysnow.net/wp-content/uploads/2010/05/WinFormsMvcSolution-150x150.png" alt="WinForms MVC Solution" title="WinForms MVC Solution" width="150" height="150" class="alignnone size-thumbnail wp-image-305" /></a></p>
<p>There is really only one controller and that is the &#8220;Application&#8221; class. It contains all the methods your app can call to manipulate your models, which are in the &#8220;Data&#8221; folder / namespace. The &#8220;WinFormsApplication&#8221; class inherits from the &#8220;Application&#8221; class and just sets the view to an instance of &#8220;WinFormsView&#8221;. The &#8220;Application&#8221; class communicates with the view through the &#8220;IView&#8221; interface. The &#8220;WinFormsView&#8221; class is a Windows Forms implementation of that view. The &#8220;Application&#8221; class and your models are not coupled in any way to your Windows Forms implementation of the view.</p>
<p>If you want you view to be as dumb as possible, your view can communicate with the &#8220;Application&#8221; class only through events. In my case though, I choose to go with a smart view and have the view call back to methods in the &#8220;Application&#8221; class. The &#8220;Application&#8221; class tells the view when models are loaded and unloaded. The view subscribes to events on the models and reacts to the events.</p>
<p>All of my forms and controls communicate with each other through the &#8220;WinFormsView&#8221; class. One control might change the value of a property in the &#8220;WinFormsView&#8221; class and another control might subscribe to a change event and update as necessary. This keeps the controls and forms slightly less coupled.</p>
<p>It&#8217;s not a perfect implementation of MVC but it keeps my model logic decoupled enough from my view logic that I can later implement a WPF version of the view I think.</p>
]]></content:encoded>
			<wfw:commentRss>http://zacharysnow.net/2010/05/26/winforms-and-mvc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

