<?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: Naked MVVM–simplest possible MVVM approach</title>
	<atom:link href="http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx</link>
	<description>Coding dreams since 1998!</description>
	<lastBuildDate>Thu, 17 Jan 2013 18:15:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Siderite</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-367</link>
		<dc:creator>Siderite</dc:creator>
		<pubDate>Sat, 05 Mar 2011 20:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-367</guid>
		<description><![CDATA[Damn it, Andre Luus, I was going to try to seem smart by linking to Rob Eisenberg&#039;s talk and you got there first. At least I get to point out that you mispelled his name :-P]]></description>
		<content:encoded><![CDATA[<p>Damn it, Andre Luus, I was going to try to seem smart by linking to Rob Eisenberg&#8217;s talk and you got there first. At least I get to point out that you mispelled his name <img src='http://blog.vuscode.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashish</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-366</link>
		<dc:creator>Ashish</dc:creator>
		<pubDate>Mon, 17 Jan 2011 08:19:34 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-366</guid>
		<description><![CDATA[&lt;p&gt;Firstly.. Thanks for this wonderful post... It is really very informative at the same time being precise... &lt;/p&gt;
&lt;p&gt;One point i want to make is: Can&#039;t we make the choice about the type of Container configurable... !!!&lt;/p&gt;
&lt;p&gt;Thanks!!!&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Firstly.. Thanks for this wonderful post&#8230; It is really very informative at the same time being precise&#8230; </p>
<p>One point i want to make is: Can&#39;t we make the choice about the type of Container configurable&#8230; !!!</p>
<p>Thanks!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chetan</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-365</link>
		<dc:creator>Chetan</dc:creator>
		<pubDate>Thu, 16 Dec 2010 12:49:12 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-365</guid>
		<description><![CDATA[&lt;p&gt;Very nice post.... Learned a naked approach to build MVVM.&lt;/p&gt;
&lt;p&gt;Thanks you.....&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Very nice post&#8230;. Learned a naked approach to build MVVM.</p>
<p>Thanks you&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Bugnion</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-364</link>
		<dc:creator>Laurent Bugnion</dc:creator>
		<pubDate>Sun, 28 Nov 2010 23:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-364</guid>
		<description><![CDATA[&lt;p&gt;Because having the real VM executed in Blend allows to work with a better abstraction of real time vs design time. You can then build services to create design time data instead of connecting to the real service. d:DataContext is useful in certain situations, but in my experience it is more difficult to understand than using the real VM and injecting different services at design time. Also, this design time data can be used at test time, so you get a mock for free. I find that using the same injection mechanism at runtime, design time and test time is the most elegant solution to this problem.&lt;/p&gt;
&lt;p&gt;Also, there is no support in Blend to add d:DataContext. This has to be done in XAML. This doesn&#039;t sound like a huge deal, but when you work with designers and try to initiate them to Blend, you try to avoid having to do anything in XAML. Note however that if this is really the best solution, why not, but I have the feeling that there are other ways. This is why I am still working on that and trying to improve the ViewModelLocator.&lt;/p&gt;
&lt;p&gt;The weird thing with the solution you proposed is that the behavior was not executed at all in Blend. This is unusual. I was busy with something else this weekend, but I will definitely dig in deeper. If the behavior was working, it would be a good solution I think. That said, I worked on implementing the super simple IOC container we talked about, and made good progress. I see a lot of value into that. OK it&#039;s not really an IOC container, and as we discussed, I think it will be rather not used outside of its primary purpose to create and locate VMs. But it is small, unobtrusive and does the job.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Laurent&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Because having the real VM executed in Blend allows to work with a better abstraction of real time vs design time. You can then build services to create design time data instead of connecting to the real service. d:DataContext is useful in certain situations, but in my experience it is more difficult to understand than using the real VM and injecting different services at design time. Also, this design time data can be used at test time, so you get a mock for free. I find that using the same injection mechanism at runtime, design time and test time is the most elegant solution to this problem.</p>
<p>Also, there is no support in Blend to add d:DataContext. This has to be done in XAML. This doesn&#39;t sound like a huge deal, but when you work with designers and try to initiate them to Blend, you try to avoid having to do anything in XAML. Note however that if this is really the best solution, why not, but I have the feeling that there are other ways. This is why I am still working on that and trying to improve the ViewModelLocator.</p>
<p>The weird thing with the solution you proposed is that the behavior was not executed at all in Blend. This is unusual. I was busy with something else this weekend, but I will definitely dig in deeper. If the behavior was working, it would be a good solution I think. That said, I worked on implementing the super simple IOC container we talked about, and made good progress. I see a lot of value into that. OK it&#39;s not really an IOC container, and as we discussed, I think it will be rather not used outside of its primary purpose to create and locate VMs. But it is small, unobtrusive and does the job.</p>
<p>Cheers,</p>
<p>Laurent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malovicn</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-363</link>
		<dc:creator>malovicn</dc:creator>
		<pubDate>Sun, 28 Nov 2010 18:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-363</guid>
		<description><![CDATA[&lt;p&gt;I am not sure why would you want to have real VM executed in blend and not something like d:DataContext (that&#039;s what I do), but I&#039;m sure you know why much better then I do - &#160;I&#039;l look at it tomorrow.. &lt;/p&gt;
&lt;p&gt;I guess the reason could be related to the fact that the IoC mappings are missing at the moment blend construct control so I&#039;ll try &#160;to add lazy inti call &#160;to IoCBuilder.CollectViewAndViewModelMappings(); in the behavior itself - guess that migh do the trick.&lt;/p&gt;
&lt;p&gt;Will report tomorrow what happened...&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I am not sure why would you want to have real VM executed in blend and not something like d:DataContext (that&#8217;s what I do), but I&#8217;m sure you know why much better then I do &#8211; &nbsp;I&#8217;l look at it tomorrow.. </p>
<p>I guess the reason could be related to the fact that the IoC mappings are missing at the moment blend construct control so I&#8217;ll try &nbsp;to add lazy inti call &nbsp;to IoCBuilder.CollectViewAndViewModelMappings(); in the behavior itself &#8211; guess that migh do the trick.</p>
<p>Will report tomorrow what happened&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Bugnion</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-362</link>
		<dc:creator>Laurent Bugnion</dc:creator>
		<pubDate>Sat, 27 Nov 2010 17:31:11 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-362</guid>
		<description><![CDATA[&lt;p&gt;Unfortunately, this solution does not work in Blend. I have to admit, I thought it would, but for some reason Blend is not executing the Behavior and binding the View to the DataContext. If you open your solution in Blend, you will see that the TextBlock remains empty.&lt;/p&gt;
&lt;p&gt;And so I go back to the drawing board ;)&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Laurent&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Unfortunately, this solution does not work in Blend. I have to admit, I thought it would, but for some reason Blend is not executing the Behavior and binding the View to the DataContext. If you open your solution in Blend, you will see that the TextBlock remains empty.</p>
<p>And so I go back to the drawing board <img src='http://blog.vuscode.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Cheers,</p>
<p>Laurent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurent Bugnion</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-361</link>
		<dc:creator>Laurent Bugnion</dc:creator>
		<pubDate>Wed, 24 Nov 2010 22:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-361</guid>
		<description><![CDATA[&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;1) Yes you are right, I missed that. I didn&#039;t have time to check the code, and I mistakenly interpreted the first code segment in your blog post. Sorry about that. The approach makes sense.&lt;/p&gt;
&lt;p&gt;2) We both agree.&lt;/p&gt;
&lt;p&gt;3) IOC... I do see your point, but how easy is it if someone wants to use another IOC container instead of Unity (like in your example). Maybe we should take that on email... I am curious because I want to avoid forcing one IOC container rather than another.&lt;/p&gt;
&lt;p&gt;As you might know, I am not satisfied with the ViewModelLocator as MVVM Light has it in V3. I am looking for better solutions. I have some ideas, and this here is definitely helping. &lt;/p&gt;
&lt;p&gt;My email is laurent (at) galasoft (dot) ch, Can you drop me a line?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Laurent&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Hi!</p>
<p>1) Yes you are right, I missed that. I didn&#39;t have time to check the code, and I mistakenly interpreted the first code segment in your blog post. Sorry about that. The approach makes sense.</p>
<p>2) We both agree.</p>
<p>3) IOC&#8230; I do see your point, but how easy is it if someone wants to use another IOC container instead of Unity (like in your example). Maybe we should take that on email&#8230; I am curious because I want to avoid forcing one IOC container rather than another.</p>
<p>As you might know, I am not satisfied with the ViewModelLocator as MVVM Light has it in V3. I am looking for better solutions. I have some ideas, and this here is definitely helping. </p>
<p>My email is laurent (at) galasoft (dot) ch, Can you drop me a line?</p>
<p>Thanks,</p>
<p>Laurent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malovicn</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-360</link>
		<dc:creator>malovicn</dc:creator>
		<pubDate>Wed, 24 Nov 2010 22:11:53 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-360</guid>
		<description><![CDATA[&lt;p&gt;Laurent,&lt;/p&gt;
&lt;p&gt;first of all thank you for spending some of your VERY valuable time on reviewing the Naked MVVM&lt;/p&gt;
&lt;p&gt;Based on some of your comments I not sure if you had time to look at the code itself so please let me clarify couple of things mentioned in your remarks which I believe are not correct and/or accurate statements.&lt;/p&gt;
&lt;p&gt;(1)&lt;/p&gt;
&lt;p&gt;There is no FrameworkElement neither inside of the ViewModel nor elsewhere in the code. The only place where it appears is inside of the behavior itself. Testing the 4 line of that behavior doesn&#039;t make any sense to me, and testing ViewModel (the part of MVVM triangle which needs to be unit tested) is not requiring it also. Just check the last code listing in this blog post to see how the ViewModel looks like. &lt;/p&gt;
&lt;p&gt;In case you still think that your statement is correct, can you please point to where in code sample we can see that inappropriate dependency &lt;/p&gt;
&lt;p&gt;(2) &lt;/p&gt;
&lt;p&gt;I agree with you that a base view model is a good practice and in fact I do have one similar to your ViewModelBase. The reason why I have omitted it from the post is to emphasize that initializing MVVM infrastructure shouldn&#039;t rely on any functionality in any base VM class. &#160; Base VM class should be optional (from the MVVM &#039;framework&#039; perspective) and focused on removing code redundancy etc. &#160;&lt;/p&gt;
&lt;p&gt;(3)&lt;/p&gt;
&lt;p&gt;I agree also with you that IoC container is scary for a lot of users still. That&#039;s why the whole IoC code is dug deep into the single class fully encapsulated, so all a user has to do is call this single method in his App.xaml.cs&lt;/p&gt;
&lt;p&gt;IoCBuilder.CollectViewAndViewModelMappings(); &lt;/p&gt;
&lt;p&gt;That&#039;s the only thing one has to do to fill IoC container - zero knowledge and understanding of IoC required - &#039;full plug &amp; play&#039;.&lt;/p&gt;
&lt;p&gt;As for rolling up my own replacement for IoC container which would be baked in the code I personally don&#039;t like that idea due to the facts that building one is not easy and the penalty for usage of the full IoC here is drop a IoC dll in bin folder and call a IoCBuilder.CollectViewAndViewModelMappings(). &#160;There are no other requirements in how to write ViewModels etc. and no IoC knowledge required at all, so using a IoC in my approach comes very close to &quot;free lunch&#039;&#039; type of thing.&lt;/p&gt;
&lt;p&gt;In case you still think that your statement is correct and user does need to know IoC with this approach, can you please point to where in code sample we can see that?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Laurent,</p>
<p>first of all thank you for spending some of your VERY valuable time on reviewing the Naked MVVM</p>
<p>Based on some of your comments I not sure if you had time to look at the code itself so please let me clarify couple of things mentioned in your remarks which I believe are not correct and/or accurate statements.</p>
<p>(1)</p>
<p>There is no FrameworkElement neither inside of the ViewModel nor elsewhere in the code. The only place where it appears is inside of the behavior itself. Testing the 4 line of that behavior doesn&#8217;t make any sense to me, and testing ViewModel (the part of MVVM triangle which needs to be unit tested) is not requiring it also. Just check the last code listing in this blog post to see how the ViewModel looks like. </p>
<p>In case you still think that your statement is correct, can you please point to where in code sample we can see that inappropriate dependency </p>
<p>(2) </p>
<p>I agree with you that a base view model is a good practice and in fact I do have one similar to your ViewModelBase. The reason why I have omitted it from the post is to emphasize that initializing MVVM infrastructure shouldn&#8217;t rely on any functionality in any base VM class. &nbsp; Base VM class should be optional (from the MVVM &#8216;framework&#8217; perspective) and focused on removing code redundancy etc. &nbsp;</p>
<p>(3)</p>
<p>I agree also with you that IoC container is scary for a lot of users still. That&#8217;s why the whole IoC code is dug deep into the single class fully encapsulated, so all a user has to do is call this single method in his App.xaml.cs</p>
<p>IoCBuilder.CollectViewAndViewModelMappings(); </p>
<p>That&#8217;s the only thing one has to do to fill IoC container &#8211; zero knowledge and understanding of IoC required &#8211; &#8216;full plug &amp; play&#8217;.</p>
<p>As for rolling up my own replacement for IoC container which would be baked in the code I personally don&#8217;t like that idea due to the facts that building one is not easy and the penalty for usage of the full IoC here is drop a IoC dll in bin folder and call a IoCBuilder.CollectViewAndViewModelMappings(). &nbsp;There are no other requirements in how to write ViewModels etc. and no IoC knowledge required at all, so using a IoC in my approach comes very close to &quot;free lunch&#8221; type of thing.</p>
<p>In case you still think that your statement is correct and user does need to know IoC with this approach, can you please point to where in code sample we can see that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: malovicn</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-359</link>
		<dc:creator>malovicn</dc:creator>
		<pubDate>Wed, 24 Nov 2010 21:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-359</guid>
		<description><![CDATA[&lt;p&gt;Slavo,&lt;/p&gt;
&lt;p&gt;I agree with you and that&#039;s why I HAVE USED Unity in this blog post :)&lt;/p&gt;
&lt;p&gt;ServiceLocator.IoC is just a Singleton instantiating UnityContainer, nothing else.&lt;/p&gt;
&lt;p&gt; public static class ServiceLocator&lt;/p&gt;
&lt;p&gt; &#160; &#160;{&lt;/p&gt;
&lt;p&gt; &#160; &#160; &#160; &#160;public static readonly IUnityContainer IoC = new UnityContainer();&lt;/p&gt;
&lt;p&gt; &#160; &#160;}&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Slavo,</p>
<p>I agree with you and that&#8217;s why I HAVE USED Unity in this blog post <img src='http://blog.vuscode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ServiceLocator.IoC is just a Singleton instantiating UnityContainer, nothing else.</p>
<p> public static class ServiceLocator</p>
<p> &nbsp; &nbsp;{</p>
<p> &nbsp; &nbsp; &nbsp; &nbsp;public static readonly IUnityContainer IoC = new UnityContainer();</p>
<p> &nbsp; &nbsp;}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Slava</title>
		<link>http://blog.vuscode.com/malovicn/archive/2010/11/07/naked-mvvm-simplest-possible-mvvm-approach.aspx#comment-358</link>
		<dc:creator>Slava</dc:creator>
		<pubDate>Wed, 24 Nov 2010 15:47:15 +0000</pubDate>
		<guid isPermaLink="false">http://#comment-358</guid>
		<description><![CDATA[&lt;p&gt;Nice article, but I don&#039;t like service locator IOC container. Unity is much better for me or ninject.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Nice article, but I don&#39;t like service locator IOC container. Unity is much better for me or ninject.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
