5

I have been migrating from Windows Forms to WPF and am trying to utilize Prism to meet the requirement that the application be plug-in oriented.

My problem is that there is seemingly no support for it. I have also heard that it is extremely leaky in some cases. Being I am developing an enterprise application, this is unacceptable.

If this is the case, and it is a bad idea to start using Prism, is there any alternatives to make a composite application? Solely using MEF is all I can think of.

TrialAndError
  • 1,784
  • 3
  • 20
  • 41
  • You might consider looking into [Caliburn.Micro](http://caliburnmicro.codeplex.com/). It's lighter than Prism, but covers the composition portion of plug-in functionality pretty well. – Dan Bryant Aug 27 '12 at 14:55

1 Answers1

6

With Prism you have the option to use Unity and/or MEF as the IoC/DI framework....it's also quite extensible...so you can plugin different IoC containers if you wish.

Some of the problems with leaks can usually come down to not using WPF in a certain way e.g. need to use Weak delegates / Weak event patterns, etc.

You could roll your own plug-in framework using MEF, but you'll probably need to re-invent some of the things Prism already does for you e.g. an EventAggregator, etc.

You could pick an alternative framework, they all have their strengths and weaknesses.

There's another Microsoft technology that is geared to supporting plug-ins namely, System.AddIn/Managed Add-in Framework (MAF)....but you have to put in a bit more scaffolding.

Someone has come up with a framework that uses MEF here:

If you want to look at an Enterprise size project with their own very plugable/modular architecture then look at SharpDevelop for inspiration.

....and it's not beyond the bounds of possibility, if you really want, to combine the best bits from several frameworks.

Colin Smith
  • 12,375
  • 4
  • 39
  • 47
  • Thank you for the information. I will probably end up just doing my own framework borrowing some of these ideas. – TrialAndError Aug 27 '12 at 20:43
  • "If you want to look at an Enterprise size project with their own very plugable/modular architecture then you couldn't do worse than look at SharpDevelop for inspiration." Did you mean to write "you could do worse"? As it is, it sounds like you're saying SharpDevelop is the worst... – Dean Kuga Sep 25 '18 at 20:14