This project has moved. For the latest updates, please go here.

MEF and Google Guice

Mar 10, 2011 at 4:18 PM


First let me start by saying I'm not trying to measure which framework is better, larger, faster, cleaner.

I am not currently using any DI framework and I just like to know if the things I've learn about guice from google published videos also right for MEF.

I'm talking about the fact that using MEF should help me make my app more testable, easier to maintain, easier to extend, etc.

And my last question is does MEF is a Dependency Injection framework with the possible answers of

  1. Yes
  2. No
  3. It depends

Thank you,


Mar 10, 2011 at 6:35 PM

They probably have similarities, yes, since there's an overlap on the problems both try to solve.

Mar 15, 2011 at 8:54 PM


So my next question is this: I read that the attribute model is one way to use MEF but that's not the only way.

What does it take to add to MEF the usage model of guice - that is have a module class register the mappings (that is the Export part) and use exist Import annotations for the import part?

I'm not saying it better or worth then the current model, I want to understand how to do it to understand MEF a little better.


Thank you,