I once used both autofac and MEF together in a wpf project .. To this day food doesn't taste the same anymore ;)
I personally have no issue with MEF it's really as I stated Pepsi vs Coke argument there's not exactly a win/loss case here other than choose one because you see a specific gain vs "Microsoft told me to in a blog post" etc I recently had lunch with 2x autofac brains trusts .. The core topic of discussion was how it's appropriate that autofac be spelled with a lower case "f" .. So David you did us proud with your usage of the f :) *drops mic* On Thursday, 4 June 2015, David Kean <[email protected]> wrote: > (Disclosure: I used to be on team that wrote MEF, and my current team > (C#) use it extensively throughout Visual Studio and our components) > > > > As Scott mentioned, MEF is effectively an Dependency Injection/IoC > container. Do a quick read up on the benefits/downfalls of DI, and the same > things apply to MEF and whether it makes sense to use it in your situation. > MEF is typically used with attributes, whereas other containers are > typicall POCO, so if you are allergic to that – a different container > choice would be better for you. > > > > Other than diagnostics (diagnosing when something goes wrong – which isn’t > something limited to MEF), I happen to like using MEF – but Autofac > (disclosure: written by a friend of mine) seems to be container of choice > these days outside of MS > > > > (One more thing to be aware of is that MEF is not thread-safe *by > default,* so be sure to isolate containers between requests, or > alternately turn on thread-safety via the options passed to the container > and *measure* the performance impact). > > > > *From:* [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');> [mailto: > [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>] *On > Behalf Of *Corneliu I. Tusnea > *Sent:* Tuesday, June 2, 2015 11:56 PM > *To:* ozDotNet > *Subject:* Re: MEF - Microsoft Extension Framework. Opinions requested. > > > > Scott, > > > > I couldn't agree with you more. MEF feels one of those "Patterns & > Practices" thing that gets pushed onto us by MS at times but everyone hates > and it's f* impractical in any real life scenario. > > > > > > On Wed, Jun 3, 2015 at 4:09 PM, Scott Barnes <[email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > > MEF was built to put the PRISM genie back in its bottle. MEF is also the > in-house approach to the stuff Autofac and other IOC stuff do for you these > days as well. If you like to sprinkle [Import] [Export] throughout the code > base and are happy with its existence than it's really down to Pepsi vs > Coke argument. Keeping in mind MEF exists nowhere .NET exists so you don't > necessarily have to play the game of "Which Nuget packaged just updated > today, guess which one...*slap to the face*...wrong!" :) > > > > Jokes aside, did you just throw your co-worker under a bus in the .NET > forums thats....public :) you could also ask him "How does MEF differ from > other solutions out there?" see what comes back, he/she may have a valid > answer... or it could be "Because the Patterns & Practices team used it and > all hail our overlords in building 16... (or am i showing my age there)" > > > --- > Regards, > Scott Barnes > http://www.riagenic.com > > > > On Mon, Jun 1, 2015 at 9:23 AM, Greg Keogh <[email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > > I agree, using MEF for really granular quick-turnaround things like > pieces of web pages seems overkill and of little benefit unless you're > creating some sort of clever fancy general purpose extensible web framework. > > > > MEF works great for dynamically discovering plug-in "chunks" of > functionality in extensible ways, so long as that's what you want to do! A > few years ago I spent hours learning the MEF lingo to use it to pick a DLL > at runtime, but weeks later I decided it just cluttered up my quite simple > code and I replaced it all with about 15 lines of code that looped through > GetTypes() and Activated the one I wanted -- *Greg K* > > > > On 1 June 2015 at 06:48, Davy Jones <[email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > > Thanks > > Davy > > Sent from my iPhone > > > On 31 May 2015, at 16:36, Piers Williams <[email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > > On the face of it, I think I would gently dissuade your colleague. > > Having a level of modular isolation for areas of a webapp is not in of > itself a bad thing, but you'd be much better off using something like > Aufofac's modules *if the need presented* than MEF. > > MEF is a plugin framework, and even there it leaves a bit to be desired. I > struggle to think of a scenario in which I'd use it (again). > > On 27 May 2015 6:19 pm, "David Rhys Jones" <[email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > > Hi all, > > > > I recently joined a new team and one of the Developpers is one of those > guys that likes to complicate things for the hell of it. > > > > The current technology he is trying to push is MEF (Extension Framework) > with every web page / section in a new plugin. > > > > Can I have some opinions on what it's really like to use MEF. > > > > Thanks > > Davy > > > > *Si hoc legere scis nimium eruditionis habes*. > > > > > > > > > -- --- Regards, Scott Barnes http://www.riagenic.com
