用于实现插件/插件/插件策略的最佳实践 [英] Best practices for implementing an addin/addon/plugin strategy

查看:198
本文介绍了用于实现插件/插件/插件策略的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序应该是可扩展的。对于我自己的要求,我已实施一些服务。这些服务基于的IoC / DI princple。所以服务封装应用程序的概念

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 the application.

有关exsample,有一个IApplicationService。该ApplicationService暴露了当前exceuting应用程序的信息。有指定的程序集信息等等。一个其他exsample是INavigationService(见mef.codeplexcom样本中)。该服务提供了一些特性,其中约有指定的当前选择的项目,还有一些事件的信息。

For exsample, there are an IApplicationService. The ApplicationService exposes information about the current exceuting application. There are specified the AssemblyInfo and so forth. An other exsample is the INavigationService(see mef.codeplexcom in the samples). This services provides some properties where are information about the current selected item specified and also some events.

我认为,服务办法是最简单和简化的扩展分的应用程序。所以,我不知道,这真的是最好的办法。你有什么感想?你怎么会在这样的加载项/插件/插件应用程序实行扩展点...?

I think, that the "service approach" is the easiest and simplifies the extension points for the application. So, I am not sure that this is really the best approach. What do you think? How do you would implement "extensions points" in an application like addins/addons/plugins ... ?

在此先感谢您的答复!很遗憾,我的英语很差。 ;)

Thanks in advance for your replies! And sorry, my english is poor. ;)

推荐答案

您熟悉的 MEF (托管扩展框架)?

Are you familiar with MEF (Managed Extensibility Framework)?

托管扩展框架(MEF或简称)简化可扩展的应用程序的创建。 MEF提供了可以利用加载应用程序的扩展发现和组合能力。

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.

这篇关于用于实现插件/插件/插件策略的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆