<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Wes' Puzzling Blog : MEF</title><link>http://weblogs.asp.net/whaggard/archive/tags/MEF/default.aspx</link><description>Tags: MEF</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>MEF preview 5 released</title><link>http://weblogs.asp.net/whaggard/archive/2009/04/07/mef-preview-5-released.aspx</link><pubDate>Wed, 08 Apr 2009 02:20:17 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7034690</guid><dc:creator>puzzlehacker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/whaggard/rsscomments.aspx?PostID=7034690</wfw:commentRss><comments>http://weblogs.asp.net/whaggard/archive/2009/04/07/mef-preview-5-released.aspx#comments</comments><description>&lt;p&gt;My team released the 5th source code preview of &lt;a href="http://codeplex.com/mef"&gt;MEF&lt;/a&gt; (Managed Extensibility Framework). You can get the latest bits at &lt;a href="http://mef.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25797"&gt;MEF preview 5&lt;/a&gt;. A summary of the changes can be found on in the &lt;a href="http://mef.codeplex.com/Wiki/View.aspx?title=Release5"&gt;release notes&lt;/a&gt; but I will copy them here for convenience. If you have questions or concerns feel free to join the &lt;a href="http://mef.codeplex.com/Thread/List.aspx"&gt;discussion&lt;/a&gt;.&lt;/p&gt;  &lt;h4&gt;Namespace changes &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;System.ComponentModel.Composition – For part authors. This namespace contains the import and export attributes as well as other APIs that part authors are likely to use. &lt;/li&gt;    &lt;li&gt;System.ComponentModel.Composition.Hosting – For hosters. This namespace contains the CompositionContainer, catalog implementations, and other APIs that hosters are likely to use. &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Part discovery changes &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;CompositionOptionsAttribute and DiscoveryMode have been removed. &lt;/li&gt;    &lt;li&gt;PartNotDiscoverableAttribute replaces [CompositionOptions(DiscoveryMode = DiscoveryMode.Never)] &lt;/li&gt;    &lt;li&gt;PartCreationPolicyAttribute can be used to specify part creation policy (Replaces CompositionOptionsAttribute.CreationPolicy) &lt;/li&gt;    &lt;li&gt;By default, exports on a base class will not be included in the exports for a derived class. &lt;/li&gt;    &lt;li&gt;The PartExportsInheritedAttribute can be applied to a base class to specify that exports on that class will be included in derived classes. &lt;b&gt;NOTE&lt;/b&gt;: If this attribute is used, and both the base and derived class have export attributes applied to them, there will be &lt;u&gt;multiple exports&lt;/u&gt; created for the same class. Also note that whatever metadata is applied to the export on the base class can’t be added to or overridden by the derived class &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Collection imports &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;ImportManyAttribute should now be used on collection imports (in the future, an ImportAttribute will not be interpreted as a collection import even if it is applied to a collection type). &lt;/li&gt;    &lt;li&gt;Array imports are now supported. &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Typed Imports/Exports &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;Imports and Exports now match on type as well as contract. &lt;/li&gt;    &lt;li&gt;Exporters of string contracts such as [Export(“Foo”)] must now specify the type they expect to be imported as well. e.g. [Export(“Foo”, typeof(string))] &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Method exports &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;Method exports can now be imported as custom delegates in addition to Action&amp;lt;…&amp;gt; and Func&amp;lt;…&amp;gt; delegates &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Directory Catalog &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;The directory watching functionality has been removed. The Refresh() method has been added to explicitly update the catalog with new assemblies in the directory. &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Removal of Caching / new infrastructure &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;The old caching infrastructure has been removed. We’ve added a general purpose API that allows the implementation of catalog caching as well as supporting builders of custom programming models. The APIs are members of the static class System.ComponentModel.Composition.ReflectionModel.ReflectionModelServices. In the future we plan to ship a sample that shows how these APIs can be used to create cached catalogs. &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;New sample application &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;MEF Studio – a designer hosting sample. &lt;/li&gt; &lt;/ul&gt;  &lt;h4&gt;Common compilation errors to expect when migrating previous code bases &lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;System.ComponentModel.Composition.Container does not exist -&amp;gt; Add reference to System.ComponentModel.Composition.Hosting namespace &lt;/li&gt;    &lt;li&gt;CompositionContainer does not contain method AddPart or Compose -&amp;gt; Need to start using CompositionBatch, or one of the helper extension methods ComposeParts or ComposeExportedObjects &lt;/li&gt;    &lt;li&gt;CompositionOptionsAttribute does not exist -&amp;gt; For CreationPolicy use PartCreationPolicyAttribute &lt;/li&gt;    &lt;li&gt;INotifyImportCompleted does not exist -&amp;gt; Use IPartImportsSatisfiedNotification interface and change method from ImportCompleted to OnImportsSatisfied &lt;/li&gt; &lt;/ul&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7034690" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/whaggard/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/whaggard/archive/tags/News/default.aspx">News</category><category domain="http://weblogs.asp.net/whaggard/archive/tags/MEF/default.aspx">MEF</category></item><item><title>Should MEF support non-shared components?</title><link>http://weblogs.asp.net/whaggard/archive/2008/11/10/should-mef-support-non-shared-components.aspx</link><pubDate>Mon, 10 Nov 2008 19:16:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6728627</guid><dc:creator>puzzlehacker</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/whaggard/rsscomments.aspx?PostID=6728627</wfw:commentRss><comments>http://weblogs.asp.net/whaggard/archive/2008/11/10/should-mef-support-non-shared-components.aspx#comments</comments><description>&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;Hamilton has &lt;A href="http://hammett.castleproject.org/?p=332" mce_href="http://hammett.castleproject.org/?p=332"&gt;posted&lt;/A&gt; about the question of whether or not MEF should support non-shared as well as shared components (non-shared==factory and shared==singleton in our current public bits). &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;In an ideal world we would love to support both but currently every solution we've come up with to support non-shared components has issues. We could pick a solution that we feel properly balances the advantages and disadvantages but that would require us to foresee exactly how the world is going to use MEF. While we believe we could pick a reasonable balance there is fear that we would pick the wrong balance for the majority of our future users. Therefore one approach to combat this is to not support non-shared components, at least in V1, and see what usage patterns reveal themselves in the wild and target that balance in V2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt; 
&lt;P&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;I style="mso-bidi-font-style: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;Do you feel that it would be a mistake for the MEF team to only support shared/singleton components in V1?&lt;/SPAN&gt;&lt;/I&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt; Keep in mind that there are patterns, as Hamilton &lt;A href="http://hammett.castleproject.org/?p=332"&gt;pointed out&lt;/A&gt;, to still support non-shared/factory if you needed that support in V1.&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6728627" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/whaggard/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/whaggard/archive/tags/MEF/default.aspx">MEF</category></item><item><title>MEF CTP2 released with source code.</title><link>http://weblogs.asp.net/whaggard/archive/2008/09/09/mef-ctp2-released-with-source-code.aspx</link><pubDate>Wed, 10 Sep 2008 05:28:21 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6615330</guid><dc:creator>puzzlehacker</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/whaggard/rsscomments.aspx?PostID=6615330</wfw:commentRss><comments>http://weblogs.asp.net/whaggard/archive/2008/09/09/mef-ctp2-released-with-source-code.aspx#comments</comments><description>&lt;p&gt;My team &lt;a href="http://www.codeplex.com/MEF/Release/ProjectReleases.aspx?ReleaseId=17033"&gt;released&lt;/a&gt; MEF CTP2 on codeplex at &lt;a title="http://www.codeplex.com/MEF" href="http://www.codeplex.com/MEF"&gt;http://www.codeplex.com/MEF&lt;/a&gt;, this time with source code. We also created a number of documents (i.e. wiki pages) and samples that demonstrate how to use MEF. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;&lt;strong&gt;What problems does MEF solve? &lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;   &lt;em&gt;MEF presents a simple solution for the runtime extensibility problem. Until now, any application that wanted to support a &lt;/em&gt;&lt;a href="http://en.wikipedia.org/wiki/Plugin"&gt;&lt;em&gt;plugin model&lt;/em&gt;&lt;/a&gt;&lt;em&gt; needed to create its own infrastructure from scratch. Those plugins would often be application-specific and could not be reused across multiple implementations.&lt;/em&gt;     &lt;ul&gt;     &lt;li&gt;&lt;em&gt;MEF provides a standard way for the host application to expose itself and consume external extensions. Extensions, by their nature, can be reused amongst different applications. However, an extension could still be implemented in a way that is application-specific. Extensions themselves can depend on one another and MEF will make sure they are wired together in the correct order (another thing you won't have to worry about). &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;MEF offers a set of discovery approaches for your application to locate and load available extensions. &lt;/em&gt;&lt;/li&gt;      &lt;li&gt;&lt;em&gt;MEF allows tagging extensions with additional metadata which facilitates rich querying and filtering&lt;/em&gt; &lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;&lt;em&gt;[&lt;a href="http://www.codeplex.com/MEF/Wiki/View.aspx?title=Overview&amp;amp;referringTitle=Home"&gt;MEF Overview&lt;/a&gt;]&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;By all means please provide us with what you like and\or dislike about MEF at &lt;a href="http://www.codeplex.com/MEF/Thread/List.aspx"&gt;Discussions&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6615330" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/whaggard/archive/tags/News/default.aspx">News</category><category domain="http://weblogs.asp.net/whaggard/archive/tags/MEF/default.aspx">MEF</category></item><item><title>First Managed Extensibility Framework (MEF) bits released</title><link>http://weblogs.asp.net/whaggard/archive/2008/06/04/first-managed-extensibility-framework-mef-bits-released.aspx</link><pubDate>Thu, 05 Jun 2008 05:07:39 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6249078</guid><dc:creator>puzzlehacker</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/whaggard/rsscomments.aspx?PostID=6249078</wfw:commentRss><comments>http://weblogs.asp.net/whaggard/archive/2008/06/04/first-managed-extensibility-framework-mef-bits-released.aspx#comments</comments><description>&lt;p&gt;Today was a big day for my team because we released the bits for the first CTP of the &lt;a href="http://code.msdn.microsoft.com/mef"&gt;Managed Extensibility Framework (MEF).&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/mef"&gt;MEF&lt;/a&gt; is a framework that allows developers to declare what they need (i.e. Imports) and what they provide (i.e. Exports) and then automatically wire up everything at run-time. While that may be a slight over simplification it is the basic idea and can lead to a very loosely coupled system which can easily be extended and evolve overtime.&lt;/p&gt;  &lt;p&gt;The primary goal of this CTP is to get the bits into people’s hands early to gather feedback from the community and feed it back into the product. We have already gotten some good feedback in response to &lt;a href="http://blogs.msdn.com/kcwalina/default.aspx"&gt;Krzysztof&lt;/a&gt;’s blog &lt;a href="http://blogs.msdn.com/kcwalina/archive/2008/04/25/MEF.aspx"&gt;post about MEF&lt;/a&gt;, and some of that feedback has already made its way into the CTP. Rest assured that there are still community asks that we are still actively working hard on.&lt;/p&gt;  &lt;p&gt;Keep in mind these bits are very early and you should not get hung up on the names and exact shape of the API’s because they are likely to change. What we would really like is feedback on the basic concepts and any scenarios you feel MEF would be useful for but needs some fine tuning.&lt;/p&gt;  &lt;p&gt;To get your hands dirty &lt;a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=mef&amp;amp;DownloadId=2217"&gt;download&lt;/a&gt; the bits and have a look at the sample applications and docs. If you have questions or feedback by all means don’t hesitate to stop by our &lt;a href="http://forums.msdn.microsoft.com/en-US/MEFramework/threads/"&gt;forum&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Expect so see some more posts from me and some of my teammates (&lt;a href="http://blogs.msdn.com/mirceat/default.aspx"&gt;Mitch&lt;/a&gt;, &lt;a href="http://davesbox.com/"&gt;David&lt;/a&gt;, &lt;a href="http://blogs.msdn.com/kcwalina/default.aspx"&gt;Krzysztof&lt;/a&gt;) on &lt;a href="http://code.msdn.microsoft.com/mef"&gt;MEF&lt;/a&gt; in the coming months. &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6249078" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/whaggard/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/whaggard/archive/tags/News/default.aspx">News</category><category domain="http://weblogs.asp.net/whaggard/archive/tags/MEF/default.aspx">MEF</category></item></channel></rss>