<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: The mini-ViewModel pattern</title>
	<atom:link href="http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/</link>
	<description>Colin Eberhardt&#039;s Adventures in WPF</description>
	<lastBuildDate>Tue, 09 Mar 2010 08:51:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Colin Eberhardt</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/comment-page-1/#comment-6216</link>
		<dc:creator>Colin Eberhardt</dc:creator>
		<pubDate>Thu, 03 Dec 2009 08:18:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-6216</guid>
		<description>Hi Matt,

Glad you found this article interesting. I have also found myself transferring WPF patterns to WinForms, as you know we use MVVM for our grid controls. (However, MVVM is really just a new and sexy name for the Martin Fowler&#039;s presentation-model pattern!)

Regarding unit testing, I had this same discussion with Gergely yesterday, I don&#039;t believe in unit testing UI code.

With the example I use in this blog post, the ViewModel is being used as a means to format a phone number, something that is hard to achieve with the tools available in the WPF framework. The important point to me is that this is &#039;formatting&#039;, i.e. pure presentation.

Sure, you could try and unit test it, however, what if someone screws up the positioning of the controls, or the font? your tests would pass, but the UI would be all wrong! In my opinion UIs should be tested by humans.

(Having said that, I probably would unit test the parts of the code which manipulate the phone number and extract its component parts - however, I would make this a separate, non UI-centric unit!)

Regards, Colin E.</description>
		<content:encoded><![CDATA[<p>Hi Matt,</p>
<p>Glad you found this article interesting. I have also found myself transferring WPF patterns to WinForms, as you know we use MVVM for our grid controls. (However, MVVM is really just a new and sexy name for the Martin Fowler&#8217;s presentation-model pattern!)</p>
<p>Regarding unit testing, I had this same discussion with Gergely yesterday, I don&#8217;t believe in unit testing UI code.</p>
<p>With the example I use in this blog post, the ViewModel is being used as a means to format a phone number, something that is hard to achieve with the tools available in the WPF framework. The important point to me is that this is &#8216;formatting&#8217;, i.e. pure presentation.</p>
<p>Sure, you could try and unit test it, however, what if someone screws up the positioning of the controls, or the font? your tests would pass, but the UI would be all wrong! In my opinion UIs should be tested by humans.</p>
<p>(Having said that, I probably would unit test the parts of the code which manipulate the phone number and extract its component parts &#8211; however, I would make this a separate, non UI-centric unit!)</p>
<p>Regards, Colin E.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt@scottlogic</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/comment-page-1/#comment-6189</link>
		<dc:creator>matt@scottlogic</dc:creator>
		<pubDate>Wed, 02 Dec 2009 21:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-6189</guid>
		<description>Oops: &quot;is something I’ll add TO MY toolbox.&quot;</description>
		<content:encoded><![CDATA[<p>Oops: &#8220;is something I’ll add TO MY toolbox.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt@scottlogic</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/comment-page-1/#comment-6188</link>
		<dc:creator>matt@scottlogic</dc:creator>
		<pubDate>Wed, 02 Dec 2009 21:34:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-6188</guid>
		<description>Interesting article Colin!

I tried applying this pattern directly to WinForms (given the projects I work with currently are WinForms) and it comes up quite nicely.

I do share Brian Genisio&#039;s concern about unit testing, but its an interesting point about not coupling the View and ViewModel to any business objects - &lt;em&gt;&quot;decompose it into a number of re-usable controls, each containing mini-ViewModels&quot;&lt;/em&gt;. I guess you could introduce an interface for business objects to use, but that adds complexity and defeats the purpose of your article.

Think miniViewModel is something I&#039;ll add toolbox. Thanks Colin.</description>
		<content:encoded><![CDATA[<p>Interesting article Colin!</p>
<p>I tried applying this pattern directly to WinForms (given the projects I work with currently are WinForms) and it comes up quite nicely.</p>
<p>I do share Brian Genisio&#8217;s concern about unit testing, but its an interesting point about not coupling the View and ViewModel to any business objects &#8211; <em>&quot;decompose it into a number of re-usable controls, each containing mini-ViewModels&quot;</em>. I guess you could introduce an interface for business objects to use, but that adds complexity and defeats the purpose of your article.</p>
<p>Think miniViewModel is something I&#8217;ll add toolbox. Thanks Colin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin Eberhardt</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/comment-page-1/#comment-5481</link>
		<dc:creator>Colin Eberhardt</dc:creator>
		<pubDate>Fri, 13 Nov 2009 17:19:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-5481</guid>
		<description>Hi Tim,

Thanks for your feedback. Personally I think the problem (if it is indeed a problem!) is that WPF (and Silverlight) is in itself both a powerful and complex framework. You really need to learn how it works, and DataContext inheritance is part of this learning process.

Regards, Colin E.</description>
		<content:encoded><![CDATA[<p>Hi Tim,</p>
<p>Thanks for your feedback. Personally I think the problem (if it is indeed a problem!) is that WPF (and Silverlight) is in itself both a powerful and complex framework. You really need to learn how it works, and DataContext inheritance is part of this learning process.</p>
<p>Regards, Colin E.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/comment-page-1/#comment-5331</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Mon, 09 Nov 2009 18:58:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-5331</guid>
		<description>Btw, the additional &quot;black magic&quot; to which I was referring was the multiple data contexts for a single control - that inherited by the control itself, and that specified by the control on its LayoutRoot.  James&#039; confusion being a case in point.</description>
		<content:encoded><![CDATA[<p>Btw, the additional &#8220;black magic&#8221; to which I was referring was the multiple data contexts for a single control &#8211; that inherited by the control itself, and that specified by the control on its LayoutRoot.  James&#8217; confusion being a case in point.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
