什么加载项/工作台框架是Eclipse RCP的最佳.NET替代方案?

时间:2023-01-19 23:53:26

I'm looking for a plugin-based application framework that is comparable to the Eclipse Plugin Framework, which to my simple mind consists of:

我正在寻找一个基于插件的应用程序框架,可以与Eclipse插件框架相媲美,我的简单思想包括:

  1. a core plugin management framework (Equinox / OSGI), which provides the ability to declare extension endpoints and then discover and load plugins that service those endpoints. (this is different than Dependency Injection, but admittedly the difference is subtle - configuration is highly de-centralized, there are versioning concerns, it might involve an online plugin repository, and most importantly to me, it should be easy for the user to add plugins without needing to know anything about the underlying architecture / config files)
  2. 核心插件管理框架(Equinox / OSGI),它提供声明扩展端点,然后发现和加载为这些端点提供服务的插件的能力。 (这与依赖注入不同,但不可否认,差异很微妙 - 配置高度分散,存在版本问题,可能涉及在线插件存储库,对我来说最重要的是,用户应该很容易添加插件,无需了解底层架构/配置文件)

  3. many layers of plugins that provide a basic workbench shell with concurrency support, commands, preference sheets, menus, toolbars, key bindings, etc.
  4. 多层插件,提供基本工作台shell,包括并发支持,命令,首选项表,菜单,工具栏,键绑定等。

That is just scratching the surface of the RCP, which itself is meant to serve as the foundation of your application, which you build by writing / assembling even more plugins.

这只是RCP的表面,它本身就是你的应用程序的基础,你可以通过编写/组装更多的插件来构建它。


Here's what I've gleaned from the internet in the past couple of days...

以下是我在过去几天从互联网上收集到的内容......

As far as I can tell, there is nothing in the .NET world that remotely approaches the robustness and maturity of the Eclipse RCP for Java but there are several contenders that do either #1 or #2 pretty well.

据我所知,.NET世界中没有任何东西可以远程接近Eclipse RCP for Java的健壮性和成熟度,但有几个竞争者可以很好地完成#1或#2。

(I should also mention that I have not made a final decision on WinForms vs WPF, so I'm also trying to understand the level of UI coupling in any candidate framework. I'm also wondering about platform coupling and source code licensing)

(我还要提一下,我还没有对WinForms和WPF做出最终决定,所以我也试图了解任何候选框架中的UI耦合程度。我也想知道平台耦合和源代码许可)

I must say that the open-source stuff is generally less-documented but easier to understand, while the MS stuff typically has more documentation but is less accessible, so that with many of the MS technologies, I'm left wondering what they actually do, in a practical sense.

我必须说开源的东西通常记录较少但更容易理解,而MS的东西通常有更多的文档,但不太容易访问,所以对于许多MS技术,我不知道他们实际上做了什么,在实际意义上。

These are the libraries I have found:

这些是我找到的库:

SharpDevelop

The first thing I looked at was SharpDevelop, which does both #1 and also #2 in a basic way (no insult to SharpDevelop, which is admirable - I just mean more basic than Eclipse RCP). However, SharpDevelop is an application more than a framework, and there are basic assumptions and limitations there (i.e. being somewhat coupled to WinForms). Still, there are some articles on CodeProject explaining how to use it as the foundation for an application.

我看到的第一件事是SharpDevelop,它以基本方式同时执行#1和#2(对SharpDevelop没有任何侮辱,这是令人钦佩的 - 我只是说比Eclipse RCP更基本)。但是,SharpDevelop不仅仅是一个框架,它还有一些基本的假设和局限(即与WinForms有些结合)。仍有一些关于CodeProject的文章解释了如何将它作为应用程序的基础。

System.Addins

It appears that System.Addins is meant to provide a robust add-in loading framework, with some sophisticated options for loading assemblies with varying levels of trusts and even running the out of process. It appears to be primarily code-based, and pretty code-heavy, with lots of assemblies that serve to insulate against versioning issues., using Guidance Automation to generate a good deal of code.

似乎System.Addins旨在提供一个强大的加载项加载框架,其中包含一些复杂的选项,用于加载具有不同信任级别的程序集,甚至可以运行进程外的程序集。它看起来主要是基于代码的,而且代码很重,有许多程序集用于隔离版本问题。使用Guidance Automation生成大量代码。

So far I haven't found many System.AddIns articles that illustrate how it could be used to build something like an Eclipse RCP, and many people seem to be wringing their hands about its complexity.

到目前为止,我还没有找到很多System.AddIns文章来说明如何使用它来构建像Eclipse RCP这样的东西,很多人似乎都在为它的复杂性绞尽脑汁。

Mono.Addins

It appears that Mono.Addins was influenced by System.Addins, SharpDevelop, and MonoDevelop. It seems to provide the basics from System.Addins, with less sophisticated options for plugin loading, but more simplicity, with attribute-based registration, XML manifests, and the infrastructure for online plugin repositories.

似乎Mono.Addins受System.Addins,SharpDevelop和MonoDevelop的影响。它似乎提供了System.Addins的基础知识,插件加载的选项较少,但更简单,基于属性的注册,XML清单和在线插件存储库的基础结构。

It has a pretty good FAQ and documentation, as well as a fairly robust set of examples that really help paint a picture of how to develop an architecture like that of SharpDevelop or Eclipse. The examples use GTK for UI, but the framework itself is not coupled to GTK. So it appears to do #1 (add-in loading) pretty well and points the way to #2 (workbench framework). It appears that Mono.Addins was derived from MonoDevelop, but I haven't actually looked at whether MonoDevelop provides a good core workbench framework.

它有一个非常好的常见问题解答和文档,以及一组相当强大的例子,真正有助于描绘如何开发类似SharpDevelop或Eclipse的架构。这些示例使用GTK作为UI,但框架本身并未与GTK耦合。因此它看起来很好地做#1(加载项加载)并指向#2(工作台框架)。 Mono.Addins似乎是从MonoDevelop派生出来的,但我实际上并没有看过MonoDevelop是否提供了一个很好的核心工作台框架。

Managed Extensibility Framework

This is what everyone's talking about at the moment, and it's slowly getting clearer what it does, but I'm still pretty fuzzy, even after reading several posts on SO. The official word is that it "can live side-by-side" with System.Addins. However, it doesn't reference it and it appears to reproduce some of its functionality. It seems to me, then, that it is a simpler, more accessible alternative to System.Addins.

这是大家此刻正在谈论的内容,而且它正在慢慢变得清晰起来,但即使在阅读SO上的几个帖子之后,我仍然非常模糊。官方的说法是它可以与System.Addins“并存”。但是,它没有引用它,它似乎重现了它的一些功能。在我看来,它是System.Addins的一个更简单,更易于访问的替代方案。

It appears to be more like Mono.Addins in that it provides attribute-based wiring. It provides "catalogs" that can be attribute-based or directory-based. It does not seem to provide any XML or manifest-based wiring. So far I haven't found much documentation and the examples seem to be kind of "magical" and more reminiscent of attribute-based DI, despite the clarifications that MEF is not a DI container.

它看起来更像是Mono.Addins,因为它提供了基于属性的连线。它提供了可以基于属性或基于目录的“目录”。它似乎没有提供任何XML或基于清单的连线。到目前为止,我还没有找到很多文档,并且这些示例似乎有点“神奇”,更像是基于属性的DI,尽管MEF不是DI容器的说明。

Its license just got opened up, but it does reference WindowsBase -- not sure if that means it's coupled to Windows.

它的许可证刚刚打开,但确实引用了WindowsBase - 不确定这是否意味着它与Windows相连。

Acropolis

I'm not sure what this is. Is it MEF, or something that is still coming?

我不确定这是什么。它是MEF,还是还在发生什么?

Composite Application Blocks

There are WPF and Winforms Composite Application blocks that seem to provide much more of a workbench framework. I have very little experience with these but they appear to rely on Guidance Automation quite a bit are obviously coupled with the UI layers. There are a few examples of combining MEF with these application blocks.

WPF和Winforms Composite Application块似乎提供了更多的工作台框架。我对这些经验很少,但他们似乎依赖于指导自动化显然与UI层相结合。有一些将MEF与这些应用程序块组合在一起的例子。


I've done the best I could to answer my own question here, but I'm really only scratching the surface, and I don't have experience with any of these frameworks. Hopefully some of you can add more detail about the frameworks you have experience with. It would be great if we could end up with some sort of comparison matrix.

我已经尽力回答了我自己的问题,但我真的只是表面上看,而且我没有任何这些框架的经验。希望你们中的一些人可以添加更多关于你们所遇到的框架的细节。如果我们最终得到某种比较矩阵会很棒。

5 个解决方案

#1


1  

Can be considered...

可以考虑...

Composite Application Guidance for WPF and Silverlight

WPF和Silverlight的复合应用指南

Visual Studio 2008 Shell

Visual Studio 2008 Shell

#2


1  

You should really take a look at the Visual Studio Shell. It is available in both an integrated mode, where you application resides along side visual studio as an addin or you can use the shell in isolated mode where the shell just serves as a basic framework for your application alone similar to the Eclipse shell. Check out this webpage.

您应该看一下Visual Studio Shell。它既可以在集成模式下使用,也可以将应用程序作为插件驻留在Visual Studio中,也可以在隔离模式下使用shell,其中shell仅作为应用程序的基本框架,类似于Eclipse shell。看看这个网页。

The Visual Studio shell is robust, feature rich and free. I have not done any development in it yet, but I have been looking at it for an upcoming project. It looks to be every bit as powerful of a plugin framework as Eclipse.

Visual Studio外壳功能强大,功能丰富且免费。我还没有做过任何开发,但我一直在为即将到来的项目看一下。它看起来像Eclipse一样强大的插件框架。

#3


1  

+1 for SharpDevelop. The libraries are well-written and simple to extend. I'm actually writing my own code refactoring application using the SharpDevelop Core and their Addin infrastructure.

为SharpDevelop +1。这些库编写良好且易于扩展。我实际上正在使用SharpDevelop Core及其Addin基础架构编写自己的代码重构应用程序。

Very nice.

-Doug

#4


0  

While I'm not familiar with the specifics of RCP, I think DxCore is probably going to be the most complete framework for extending Visual Studio with managed code. It uses a plug-in based architecture and gives you the ability to create anything from tool windows (hosting whatever code you want) to "Actions" (items which can be tied to keyboard shortcuts and context menus) and refactorings, with an extremely rich context system, and a language agnostic code generation engine. It provides a very nice abstraction layer on top of the rather scary underbelly of Visual Studio. It is also written to be version agnostic, so plugins written against DxCore will work for VS 2005 and VS 2008.

虽然我不熟悉RCP的细节,但我认为DxCore可能会成为使用托管代码扩展Visual Studio的最完整框架。它使用基于插件的架构,使您能够从工具窗口(托管任何您想要的代码)到“动作”(可以与键盘快捷键和上下文菜单相关联的项目)和重构创建任何内容,并且极其丰富上下文系统,以及与语言无关的代码生成引擎。它在Visual Studio的相当可怕的底层之上提供了一个非常好的抽象层。它也被编写为与版本无关,因此针对DxCore编写的插件将适用于VS 2005和VS 2008。

While it is free it is not open source, and there is, sadly, very little documentation. You have the samples provided, which are a good start, but here are some other resources that could be useful:

虽然它是免费的,但它不是开源的,遗憾的是,文档很少。您提供了样本,这是一个良好的开端,但这里有一些其他可能有用的资源:

  • Mark Miller is the Architect for DxCore/CodeRush/Refactor Pro!, and has some postings on his blog (and DNR TV episodes) about writing DxCore plugins.
  • Mark Miller是DxCore / CodeRush / Refactor Pro!的架构师,并在他的博客(以及DNR电视剧集)中发布了一些关于编写DxCore插件的帖子。

  • There is a community forum where you can post questions. This is followed by Mark and some of the other DxCore developers, as well as some folks from the community
  • 有一个社区论坛,您可以在其中发布问题。其次是Mark和其他一些DxCore开发人员,以及来自社区的一些人

  • DxCore Plugins on Google Code. An attempt to collect the plugins that have been created by the community into one place. This is a nice mixture of tools and refactorings, though some are out of date.
  • DxCore插件谷歌代码。尝试将社区创建的插件收集到一个位置。这是一个很好的混合工具和重构,虽然有些已经过时了。

Hopefully this will be useful to you. The only thing really bad I have to say about it, and the reason it is probably not more widely utilized is that it is such a large library, with almost no documentation, you have to be willing to dig to find out how to utilize some of the cooler features.

希望这对你有用。唯一真正糟糕的我不得不说,它可能没有被广泛使用的原因是它是一个如此庞大的图书馆,几乎没有文档,你必须愿意挖掘,找出如何利用一些更酷的功能。

Good Luck!

#5


0  

I just released SoapBox Core as open source and wrote an introductory article on CodeProject. It's basically what you're looking for. It uses MEF for extensibility, and I got a lot of the ideas from SharpDevelop. Note that it's brand new and still evolving rapidly.

我刚刚发布了SoapBox Core作为开源,并撰写了一篇关于CodeProject的介绍性文章。这基本上就是你要找的东西。它使用MEF进行扩展,我从SharpDevelop获得了很多想法。请注意,它是全新的,并且仍在快速发展。

#1


1  

Can be considered...

可以考虑...

Composite Application Guidance for WPF and Silverlight

WPF和Silverlight的复合应用指南

Visual Studio 2008 Shell

Visual Studio 2008 Shell

#2


1  

You should really take a look at the Visual Studio Shell. It is available in both an integrated mode, where you application resides along side visual studio as an addin or you can use the shell in isolated mode where the shell just serves as a basic framework for your application alone similar to the Eclipse shell. Check out this webpage.

您应该看一下Visual Studio Shell。它既可以在集成模式下使用,也可以将应用程序作为插件驻留在Visual Studio中,也可以在隔离模式下使用shell,其中shell仅作为应用程序的基本框架,类似于Eclipse shell。看看这个网页。

The Visual Studio shell is robust, feature rich and free. I have not done any development in it yet, but I have been looking at it for an upcoming project. It looks to be every bit as powerful of a plugin framework as Eclipse.

Visual Studio外壳功能强大,功能丰富且免费。我还没有做过任何开发,但我一直在为即将到来的项目看一下。它看起来像Eclipse一样强大的插件框架。

#3


1  

+1 for SharpDevelop. The libraries are well-written and simple to extend. I'm actually writing my own code refactoring application using the SharpDevelop Core and their Addin infrastructure.

为SharpDevelop +1。这些库编写良好且易于扩展。我实际上正在使用SharpDevelop Core及其Addin基础架构编写自己的代码重构应用程序。

Very nice.

-Doug

#4


0  

While I'm not familiar with the specifics of RCP, I think DxCore is probably going to be the most complete framework for extending Visual Studio with managed code. It uses a plug-in based architecture and gives you the ability to create anything from tool windows (hosting whatever code you want) to "Actions" (items which can be tied to keyboard shortcuts and context menus) and refactorings, with an extremely rich context system, and a language agnostic code generation engine. It provides a very nice abstraction layer on top of the rather scary underbelly of Visual Studio. It is also written to be version agnostic, so plugins written against DxCore will work for VS 2005 and VS 2008.

虽然我不熟悉RCP的细节,但我认为DxCore可能会成为使用托管代码扩展Visual Studio的最完整框架。它使用基于插件的架构,使您能够从工具窗口(托管任何您想要的代码)到“动作”(可以与键盘快捷键和上下文菜单相关联的项目)和重构创建任何内容,并且极其丰富上下文系统,以及与语言无关的代码生成引擎。它在Visual Studio的相当可怕的底层之上提供了一个非常好的抽象层。它也被编写为与版本无关,因此针对DxCore编写的插件将适用于VS 2005和VS 2008。

While it is free it is not open source, and there is, sadly, very little documentation. You have the samples provided, which are a good start, but here are some other resources that could be useful:

虽然它是免费的,但它不是开源的,遗憾的是,文档很少。您提供了样本,这是一个良好的开端,但这里有一些其他可能有用的资源:

  • Mark Miller is the Architect for DxCore/CodeRush/Refactor Pro!, and has some postings on his blog (and DNR TV episodes) about writing DxCore plugins.
  • Mark Miller是DxCore / CodeRush / Refactor Pro!的架构师,并在他的博客(以及DNR电视剧集)中发布了一些关于编写DxCore插件的帖子。

  • There is a community forum where you can post questions. This is followed by Mark and some of the other DxCore developers, as well as some folks from the community
  • 有一个社区论坛,您可以在其中发布问题。其次是Mark和其他一些DxCore开发人员,以及来自社区的一些人

  • DxCore Plugins on Google Code. An attempt to collect the plugins that have been created by the community into one place. This is a nice mixture of tools and refactorings, though some are out of date.
  • DxCore插件谷歌代码。尝试将社区创建的插件收集到一个位置。这是一个很好的混合工具和重构,虽然有些已经过时了。

Hopefully this will be useful to you. The only thing really bad I have to say about it, and the reason it is probably not more widely utilized is that it is such a large library, with almost no documentation, you have to be willing to dig to find out how to utilize some of the cooler features.

希望这对你有用。唯一真正糟糕的我不得不说,它可能没有被广泛使用的原因是它是一个如此庞大的图书馆,几乎没有文档,你必须愿意挖掘,找出如何利用一些更酷的功能。

Good Luck!

#5


0  

I just released SoapBox Core as open source and wrote an introductory article on CodeProject. It's basically what you're looking for. It uses MEF for extensibility, and I got a lot of the ideas from SharpDevelop. Note that it's brand new and still evolving rapidly.

我刚刚发布了SoapBox Core作为开源,并撰写了一篇关于CodeProject的介绍性文章。这基本上就是你要找的东西。它使用MEF进行扩展,我从SharpDevelop获得了很多想法。请注意,它是全新的,并且仍在快速发展。