The MEF team keep saying it is about plug-in model. So, are we talking about UI plugins? How can we use this stuff in non-UI code? I downloaded the code and the examples are all about GUI. Am I guessing it wrong?
Ayende sums up MEF rather nicely here:
http://ayende.com/Blog/archive/2008/09/25/the-managed-extensibility-framework.aspx
Also the herding code lads had a great interview with Glenn Block, one of the MS MEF guys:
If you're talking about Microsoft Managed Extensibility Framework then no, it's definitely not just about UI.
By doing something visual in the samples you just make it easier for people to understand the concept. You could not make it clearer that an Tetris game with plug-in blocks.
MEF seems to be more about extending your application's functionality. In our applications we've been looking at MEF for allowing users to use different editions of a rating engine. There's no UI for those modules. It can add UI features, but it's not necessary.
Ilya
MEF is absolutely not only for UI. Nothing about MEF is UI-dependent, which is why it lives in the System.ComponentModel namespace. You can use MEF in desktop apps, web apps, or services.
In terms of samples, thank you for the feedback. We do need better samples that illustrate that it is a non-UI based technology. I think the reason alot of the samples have gravitated around UI is that our chief partners like Visual Studio, are using MEF in desktop apps. I'll talk to the team about some non-UI based samples.
Thanks Glenn