<?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: Experiments using MEF, MVVM and Silverlight 4 Beta – Part 3: Part Creator and Creation Policy</title>
	<atom:link href="http://www.davidezordan.net/blog/?feed=rss2&#038;p=1624" rel="self" type="application/rss+xml" />
	<link>http://www.davidezordan.net/blog/?p=1624</link>
	<description>XAML, HTML5, WinRT, Metro, Silverlight, WPF, Windows Phone, Cloud Computing and New Technologies</description>
	<lastBuildDate>Mon, 30 Apr 2012 12:26:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Experiments using MEF, MVVM and Silverlight 4 Beta &#8211; Part 2: Custom attributes &#124; DavideZordan.net</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1185</link>
		<dc:creator>Experiments using MEF, MVVM and Silverlight 4 Beta &#8211; Part 2: Custom attributes &#124; DavideZordan.net</dc:creator>
		<pubDate>Thu, 07 Jan 2010 00:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1185</guid>
		<description>[...] Part 3: Part Creator and Creation Policy [...]</description>
		<content:encoded><![CDATA[<p>[...] Part 3: Part Creator and Creation Policy [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Experiments using MEF, MVVM and Silverlight 4 Beta – Part 6: Design-mode ViewModel and calling a WCF Service &#124; DavideZordan.net</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1081</link>
		<dc:creator>Experiments using MEF, MVVM and Silverlight 4 Beta – Part 6: Design-mode ViewModel and calling a WCF Service &#124; DavideZordan.net</dc:creator>
		<pubDate>Sun, 13 Dec 2009 21:32:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1081</guid>
		<description>[...] Part 3: Part Creator and Creation Policy [...]</description>
		<content:encoded><![CDATA[<p>[...] Part 3: Part Creator and Creation Policy [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davide</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1045</link>
		<dc:creator>Davide</dc:creator>
		<pubDate>Mon, 07 Dec 2009 17:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1045</guid>
		<description>Thanks Glenn for the tip, I was looking at it in order to enable blendability and see sample data in design time, this one was the reason for which I was trying the PartCreator&lt;T&gt; approach in the post ;) I&#039;ll look at the attached behavior :)</description>
		<content:encoded><![CDATA[<p>Thanks Glenn for the tip, I was looking at it in order to enable blendability and see sample data in design time, this one was the reason for which I was trying the PartCreator<t> approach in the post <img src='http://www.davidezordan.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  I&#8217;ll look at the attached behavior <img src='http://www.davidezordan.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </t></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Block</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1042</link>
		<dc:creator>Glenn Block</dc:creator>
		<pubDate>Mon, 07 Dec 2009 17:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1042</guid>
		<description>Hi Davide

As far as wiring up the V and the VM. One clean way to do it is to just externalize it in an attached behavior. There have been several approaches at doing this. I am working on one now for MEF, basically the behavior pulls from the container and injects the VM into the DataContext. David Hill I believe has a post on this.</description>
		<content:encoded><![CDATA[<p>Hi Davide</p>
<p>As far as wiring up the V and the VM. One clean way to do it is to just externalize it in an attached behavior. There have been several approaches at doing this. I am working on one now for MEF, basically the behavior pulls from the container and injects the VM into the DataContext. David Hill I believe has a post on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Experiments using MEF, MVVM and Silverlight 4 Beta – Part 4: Part Creator reprise &#124; DavideZordan.net</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1041</link>
		<dc:creator>Experiments using MEF, MVVM and Silverlight 4 Beta – Part 4: Part Creator reprise &#124; DavideZordan.net</dc:creator>
		<pubDate>Mon, 07 Dec 2009 16:53:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1041</guid>
		<description>[...] the last post I&#8217;ve updated the MEF MVVM example inserting some PartCreator&lt;T&gt; experiments and [...]</description>
		<content:encoded><![CDATA[<p>[...] the last post I&#8217;ve updated the MEF MVVM example inserting some PartCreator&lt;T&gt; experiments and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davide</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1040</link>
		<dc:creator>Davide</dc:creator>
		<pubDate>Mon, 07 Dec 2009 16:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1040</guid>
		<description>Hi Owain, thanks for the feedback!</description>
		<content:encoded><![CDATA[<p>Hi Owain, thanks for the feedback!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Owain Cleaver</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1039</link>
		<dc:creator>Owain Cleaver</dc:creator>
		<pubDate>Mon, 07 Dec 2009 15:56:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1039</guid>
		<description>Not sure this is a great example of the PartCreator class; a view model has the same lifetime as the control bound to it so there&#039;s no reason for a PartCreator, it&#039;s use is the ability to dynamically resolve types without the need to access the container directly as per Nicholas Blumhardt&#039;s example.</description>
		<content:encoded><![CDATA[<p>Not sure this is a great example of the PartCreator class; a view model has the same lifetime as the control bound to it so there&#8217;s no reason for a PartCreator, it&#8217;s use is the ability to dynamically resolve types without the need to access the container directly as per Nicholas Blumhardt&#8217;s example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davide</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1038</link>
		<dc:creator>Davide</dc:creator>
		<pubDate>Mon, 07 Dec 2009 12:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1038</guid>
		<description>Hi Glenn, as usually thanks for the great suggestions! :) I agree with you for the import approach of the VM in the case of a single instance, I&#039;m currently experimenting the possibility to strong decouple all the objects involved in the pattern (including commands and properties) and also the association (marriage?) between the xaml and different viewmodel instances. I&#039;ve watched the video, excellent, I&#039;ll investigate further! Thanks :)</description>
		<content:encoded><![CDATA[<p>Hi Glenn, as usually thanks for the great suggestions! <img src='http://www.davidezordan.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I agree with you for the import approach of the VM in the case of a single instance, I&#8217;m currently experimenting the possibility to strong decouple all the objects involved in the pattern (including commands and properties) and also the association (marriage?) between the xaml and different viewmodel instances. I&#8217;ve watched the video, excellent, I&#8217;ll investigate further! Thanks <img src='http://www.davidezordan.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Block</title>
		<link>http://www.davidezordan.net/blog/?p=1624&#038;cpage=1#comment-1035</link>
		<dc:creator>Glenn Block</dc:creator>
		<pubDate>Mon, 07 Dec 2009 07:11:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidezordan.net/blog/?p=1624#comment-1035</guid>
		<description>Nice post, but I have to critique it a bit :-) 

I may be missing something, but it looks like PartCreator is being used here to create a single VM for a view rather than just importing it. If that is the case, then you really shouldn&#039;t be using PartCreator rather you should be just importing the VM directly. This benefits you in several ways including static analysis (which MEF performs).

The places PartCreator is interesting to use is when you need to spin up new instances dynamically after the part has been composed. An example of this would be if you need to create new Order views every time someone clicks on the &quot;New Order&quot; button. This happens within a part (like the OrdersController) after it has been composed, so PartCreator is the right thing.

In the channel 9 video we did on MEF Preview 7, I showed an example of an OrderEntry scenario that uses PartCreator in a similar fashion. In this case orders are created within the MainPageVM each time the NewOrder command is called.

You can get to the talk here: 
http://channel9.msdn.com/shows/10-4/10-4-Episode-32-MEF-Preview-7/

Thanks
Glenn</description>
		<content:encoded><![CDATA[<p>Nice post, but I have to critique it a bit <img src='http://www.davidezordan.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p>I may be missing something, but it looks like PartCreator is being used here to create a single VM for a view rather than just importing it. If that is the case, then you really shouldn&#8217;t be using PartCreator rather you should be just importing the VM directly. This benefits you in several ways including static analysis (which MEF performs).</p>
<p>The places PartCreator is interesting to use is when you need to spin up new instances dynamically after the part has been composed. An example of this would be if you need to create new Order views every time someone clicks on the &#8220;New Order&#8221; button. This happens within a part (like the OrdersController) after it has been composed, so PartCreator is the right thing.</p>
<p>In the channel 9 video we did on MEF Preview 7, I showed an example of an OrderEntry scenario that uses PartCreator in a similar fashion. In this case orders are created within the MainPageVM each time the NewOrder command is called.</p>
<p>You can get to the talk here:<br />
<a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-32-MEF-Preview-7/" rel="nofollow">http://channel9.msdn.com/shows/10-4/10-4-Episode-32-MEF-Preview-7/</a></p>
<p>Thanks<br />
Glenn</p>
]]></content:encoded>
	</item>
</channel>
</rss>

