BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

Managed Extensibility Framework Preview 4

| by Al Tenhundfeld on Feb 08, 2009. Estimated reading time: 1 minute |

MEF Logo

Microsoft's Managed Extensibility Framework (MEF) is an open source (MS-PL) .NET application composition framework available on CodePlex. MEF provides aspects of a plug-in model and an inversion of control container.

MEF is currently under development, still in in alpha, but its goal is to enable greater reuse of applications and components. The idea is to shift an application from being "statically compiled to dynamically composed." Traditional inversion of control containers are used with an inward focus on well-defined needs, e.g., this class needs a logger and transaction context. MEF is more similar to a plug-in provider, with an external focus on exposing extensibility points.

MEF Source Code Preview 4 is now available for download. Preview 4 release notes:

  • Diagnostics improvements - More information is provided in error messages when a composition error occurs.
  • Lifetime (creation) Policy improvements - Importers can request a specific creation policy for an injected object. Non-disposable non-shared objects will now be garbage collected before the container is disposed, fixing a bug that held onto them indefinitely.
  • AllowNonPublicCompositionAttribute removed - Private and internal members will now always be injected.
  • Namespace cleanup - Two new namespaces have been added under System.ComponentModel.Composition: .Hosting and .Primitives. "Hosting contains types commonly used only by host applications, such as ExportProvider, CompositionContainer and the catalogs. Primitives contains types for implementing a custom programming model, such as ComposablePart, ImportDefinition and ExportDefinition."
  • Type name cleanup - many type names have been shortened, resulting breaking changes:
    • ComposablePartCatalog and related types were moved from System.ComponentModel.Composition to System.ComponentModel.Compositioni.Primitives.
    • AttributedTypesPartCatalog was renamed to TypeCatalog
    • AttributedAssemblyPartCatalog was renamed to AssemblyCatalog
    • DirectoryPartCatalog was renamed to DirectoryCatalog
    • AggregatingComposablePartCatalog was renamed to AggregateCatalog
    • Catalog Caching extensibility API’s have been made internal.
  • Sample applications have been updated:
    • Meflook - Outlook like client
    • Meftris - Tetris like game with shapes as plug-ins.
    • Extensible File Explorer - File explorer with extensible views, favories file viewers and shell services

Managed Extensibility Framework requires .NET Framework 3.5 and Visual Studio 2008 for development.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and dont miss out on content that matters to you

BT