<?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 .NET</description>
	<lastBuildDate>Thu, 09 Feb 2012 03:02:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Mark</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/#comment-21030</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sun, 03 Oct 2010 23:30:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-21030</guid>
		<description>I&#039;m new to WPF and MVVM. This discussion helped me a lot. I like the author’s clear examples in the text and in the sample code. 

Nice quote there from Josh Smith. But yeah,why not allocate the steroids to the parts that can make best use of them, including reusable View parts that aren’t coupled to business objects, like the author’s PhoneNumberControl?

In my shop, I think developers will buy into the separation of concerns argument and the ease of automated unit testing argument for MVVM. But I don’t think anybody’s going to favor walking through and maintaining extra code for ViewModel objects that aren’t clearly necessary or that do work that can more easily be done with built-in types accessible from the View or reusable View objects that are not coupled to business objects.  

As for unit testing, i.e, ensuring 100% test coverage of all statements or all branches or all basis paths or some other criteria, you have to do that either way, whether you extend the ViewModel or the View. Surely the guys who make controls for a living aren’t cutting corners on unit testing or on automating as many tests as possible.</description>
		<content:encoded><![CDATA[<p>I&#8217;m new to WPF and MVVM. This discussion helped me a lot. I like the author’s clear examples in the text and in the sample code. </p>
<p>Nice quote there from Josh Smith. But yeah,why not allocate the steroids to the parts that can make best use of them, including reusable View parts that aren’t coupled to business objects, like the author’s PhoneNumberControl?</p>
<p>In my shop, I think developers will buy into the separation of concerns argument and the ease of automated unit testing argument for MVVM. But I don’t think anybody’s going to favor walking through and maintaining extra code for ViewModel objects that aren’t clearly necessary or that do work that can more easily be done with built-in types accessible from the View or reusable View objects that are not coupled to business objects.  </p>
<p>As for unit testing, i.e, ensuring 100% test coverage of all statements or all branches or all basis paths or some other criteria, you have to do that either way, whether you extend the ViewModel or the View. Surely the guys who make controls for a living aren’t cutting corners on unit testing or on automating as many tests as possible.</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-19938</link>
		<dc:creator>Colin Eberhardt</dc:creator>
		<pubDate>Tue, 21 Sep 2010 05:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-19938</guid>
		<description>Hi,

Sorry - I don&#039;t have time to solve individual problems. Please try the WPF forums:

social.msdn.microsoft.com/forums/en/wpf/threads/

Colin E.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Sorry &#8211; I don&#8217;t have time to solve individual problems. Please try the WPF forums:</p>
<p>social.msdn.microsoft.com/forums/en/wpf/threads/</p>
<p>Colin E.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunil</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/#comment-19824</link>
		<dc:creator>Sunil</dc:creator>
		<pubDate>Sun, 19 Sep 2010 16:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-19824</guid>
		<description>Just to elaborate more.. 
I am using mini view model and passing user control containing multiselect list box. However its not raising SelectionChanged event of ListBox. Please guide me if any workaround.</description>
		<content:encoded><![CDATA[<p>Just to elaborate more..<br />
I am using mini view model and passing user control containing multiselect list box. However its not raising SelectionChanged event of ListBox. Please guide me if any workaround.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunil</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/#comment-19823</link>
		<dc:creator>Sunil</dc:creator>
		<pubDate>Sun, 19 Sep 2010 16:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-19823</guid>
		<description>Hi,

I am passing CheckListBox ( for multiple selection) , However its not raising SelectionChangeEvent of list, any workaround ?</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I am passing CheckListBox ( for multiple selection) , However its not raising SelectionChangeEvent of list, any workaround ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wiley Vero</title>
		<link>http://www.scottlogic.co.uk/blog/colin/2009/08/the-mini-viewmodel-pattern/#comment-12199</link>
		<dc:creator>Wiley Vero</dc:creator>
		<pubDate>Mon, 14 Jun 2010 06:49:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.scottlogic.co.uk/blog/colin/?p=460#comment-12199</guid>
		<description>Another Excellent write up, I will be sure to save this in my Reddit account. Have a great evening.</description>
		<content:encoded><![CDATA[<p>Another Excellent write up, I will be sure to save this in my Reddit account. Have a great evening.</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-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-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-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>
</channel>
</rss>

