MVVM, Unity, Prism, MEF, Caliburn – What should I use?

If you want to build an MVVM application (which you probably do for various advantages), then you want an MVVM framework. I would recommend Caliburn.Micro, as it is straightforward to implement following the examples on the Caliburn.Micro documentation page. It also has a very compelling convention over configuration mechanism, and uses an Actions system to … Read more

Difference between MEF and IoC containers (like Unity, Autofac, SMap, Ninject, Windsor.Spring.net, etc.)

Eventually what I have concluded about the MEF vs IoC container is as follows: MEF is preferred to be used when one has to deal with unknown types or a plugin based architecture. IoC containers are preferred to be used with known types. Moreover, MEF is an architectural solution for dependency injection Whereas, IoC containers … Read more

Disadvantages of Lazy?

I’ll expand a bit on my comment, which reads: I’ve just started using Lazy, and find that it’s often indicative of bad design; or laziness on the part of the programmer. Also, one disadvantage is that you have to be more vigilant with scoped up variables, and create proper closures. For example, I’ve used Lazy<T> … Read more

What is different between and purpose of MEF and Unity?

The main difference is that with unity you will explicitly register each class you want to use in the composition: var container = new UnityContainer(); container.RegisterType<IFoo,Foo>(); container.RegisterType<IBar,Bar>(); … var program = container.Resolve<Program>(); program.Run(); In MEF on the other hand, you mark classes with attributes instead of registering them somewhere else: [Export(typeof(IFoo))] public Foo { … … Read more

tech