3

Just like to see how others make use of MAF:

  • What are to define as contracts?
  • Using IoC and MAF together?
  • How do addins communicate with each other?
  • How does MAF help building a winforms application? ...
John Saunders
  • 160,644
  • 26
  • 247
  • 397
bo bo
  • 824
  • 1
  • 8
  • 11

1 Answers1

2

As has already been hinted in the comments, System.AddIn is largely considered obsolete in the face of a revamped API that is much easier to use. This resides in System.ComponentModel.Composition and is popularly known as MEF (short for Managed Extensibility Framework). I'd advise you to skip MAF and skip directly to using MEF.

FWIW, Visual Studio 2010 uses MEF to dynamically extend the UI, both for features shipping with VS and for extensions provided by 3rd parties.

Morten Mertner
  • 9,414
  • 4
  • 39
  • 56
  • A nice roundup of differences between MEF and MAF can be found here :http://stackoverflow.com/questions/835182/choosing-between-mef-and-maf-system-addin/840441 along with some arguments for scenarios in which MAF is far from obsolete. – GaussZ Feb 22 '12 at 15:38
  • MAF is really just a way of working more structured with AppDomains while MEF is about composition. I agree that MAF may still have its uses, but total isolation is so bad for performance that in most practical use cases MAF is not really an option to consider. Its also impossible to use MAF for UI components, because of the way Windows dispatches UI events. – Morten Mertner Feb 23 '12 at 18:18
  • Yep MAF is a more structured and more "addin"-way. And while performance degrades, quite a lot of cases work very well with MAF, especially if you run the risk of crashing add-ons or want to re-load on the fly. Visual Studio uses MAF extensively for its addin architecture afaik. Also it is quite possible to use UI components loaded through MAF, see http://blogs.msdn.com/b/clraddins/archive/2007/08/06/appdomain-isolated-wpf-add-ins-jesse-kaplan.aspx for an example. – GaussZ Feb 23 '12 at 23:14
  • It does indeed look like you can use MAF for UI components, I didn't know that. Maybe they pulled off some performance tricks as well, but AppDomain switching used to be obscenely slow. May have to give MAF another look so I don't run around saying false things about it :) Thanks. – Morten Mertner Feb 26 '12 at 16:02