Best practices for implementing an addin/addon/plugin strategy

前端 未结 3 1003
感情败类
感情败类 2021-02-10 02:53

My application should be extensible. For my own needs I have implement some services. These services are based on the IoC/DI princple. So the services encapsulate the concept of

相关标签:
3条回答
  • 2021-02-10 03:25

    Are you familiar with MEF (Managed Extensibility Framework)?

    The Managed Extensibility Framework (or MEF for short) simplifies the creation of extensible applications. MEF offers discovery and composition capabilities that you can leverage to load application extensions.

    0 讨论(0)
  • 2021-02-10 03:28

    Yes, I am familiar with MEF. I also use the concept of MEF, but there some disadvantages. My application is IoC/DI like and together with MEF is a bit complicated. MEF is not really a DI container so to use MEF with an other DI container(e.g. ninject, unity, ...) is difficult to implment this. I won't to use MEF with other DI containers. So to mix MEF with other DI containers is not really good.

    I hope you can understand my concern.

    Addition: It is not possible to load extensions in to an AppDomain in MEF. So this is for my needs not good. System.AddIn or MAF supports this, but I won't use System.AddIn, because this is very heavy ... .

    0 讨论(0)
  • 2021-02-10 03:39

    You seriously need to look at MEF - the Managed Extensibility Framework.

    • Managed Extensibility Framework Overview
    • Building Composable Apps in .NET 4 with the Managed Extensibility Framework
    • MEF on Codeplex

    It's a great new framework that Microsoft itself is using in e.g. Visual Studio 2010 for its extensibility story. Great and easy to use - why reinvent the wheel when you can use something that thousands of dev will use shortly??

    0 讨论(0)
提交回复
热议问题