Is MEF about UI? If not, why are all examples about GUI composition?
Asked Answered
mef
C

5

7

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?

Comstock answered 26/9, 2008 at 14:25 Comment(0)
W
9

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

Wellturned answered 1/2, 2009 at 8:20 Comment(0)
B
4

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:

http://herdingcode.com/?p=28
http://herdingcode.com/?p=31

Blubbery answered 26/9, 2008 at 14:30 Comment(3)
Ayende just compares/contrasts IoC to MEF in the article you referenced. The OP is asking if MEF is just a GUI framework. How does this article address that question?Ahl
@DanEsparza - OP actually asks: "How can we use this stuff in non-UI code?" - I posted these links as informative podcasts/blog posts about what MEF can do outside of the realm of being a GUI framework and Ayende's article is a valid review/analysis/bunch of thoughts. But that said, this was back in 2008 and before the rules of "no link only answers". If I get time this week I'll try and improve the post, otherwise feel free to flag for mod deletion.Blubbery
I'll leave it. The links still work, and I appreciate the clarificationAhl
S
0

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.

Santa answered 26/9, 2008 at 14:31 Comment(0)
D
0

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.

Demography answered 6/12, 2008 at 8:21 Comment(0)
M
0

Prism might be worth noticing. MEF can be used to define components that import / export arbitrary contracts while Prism can be used to define UI regions in a decupled UI app.

Misconduct answered 11/2, 2014 at 16:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.