什么插件/工作台框架是 Eclipse RCP 的最佳 .NET 替代品?

发布于 2024-07-08 00:35:55 字数 2406 浏览 9 评论 0 原文

我正在寻找一个与 Eclipse 插件框架相当的基于插件的应用程序框架,在我看来,它包括:

  1. 一个核心插件管理框架(Eq​​uinox / OSGI),它提供了以下功能:声明扩展端点,然后发现并加载为这些端点提供服务的插件。 (这与依赖注入不同,但不可否认,区别是微妙的 - 配置高度分散,存在版本控制问题,它可能涉及在线插件存储库,最重要的是对我来说,它应该很容易 用户添加插件,而无需了解任何有关底层架构/配置文件的信息)
  2. 多层插件,提供带有并发支持、命令、首选项表、菜单、工具栏的基本工作台外壳

这只是 RCP 的皮毛,它本身就是作为应用程序的基础,您可以通过编写/组装甚至更多插件来构建应用程序


以下是我过去几天从互联网上收集到的信息...

据我所知,.NET 世界中没有任何东西可以远程接近 Eclipse RCP for Java 的稳健性和成熟度,但有几个排名第一或排名第二的竞争者都表现得很好。

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

我必须说开源的东西通常文档较少但更容易理解,而 MS 的东西通常有更多的文档但不太容易访问,因此对于许多 MS 技术,我想知道它们实际上是做什么的,从实际意义上来说。

这些是我找到的库:

SharpDevelop

我首先看到的是 SharpDevelop,它以基本方式同时实现#1 和 #2(没有侮辱 SharpDevelop,这是令人钦佩的 - 我只是说更基本< /em> 比 Eclipse RCP)。 然而,SharpDevelop 与其说是一个框架,不如说是一个应用程序,并且存在一些基本的假设和限制(即与 WinForms 有一定的耦合)。 尽管如此,CodeProject 上还是有一些文章解释了如何使用它作为应用程序的基础。

System.Addins

看来 System.Addins 旨在提供一个强大的加载项加载框架,并提供一些复杂的选项来加载具有不同信任级别的程序集,甚至运行进程外。 它似乎主要是基于代码的,并且代码量很大,有很多程序集可以防止版本控制问题。使用指导自动化生成大量代码。

到目前为止,我还没有找到很多 System.AddIns 文章来说明如何使用它来构建 Eclipse RCP 之类的东西,而且许多人似乎对其复杂性感到绞尽脑汁。

Mono.Addins

Mono.Addins 似乎受到 System.Addins、SharpDevelop 和 MonoDevelop 的影响。 它似乎提供了 System.Addins 的基础知识,具有不太复杂的插件加载选项,但更加简单,具有基于属性的注册、XML 清单和在线插件存储库的基础设施。

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

托管可扩展性框架

这是目前每个人都在谈论的内容,并且它的作用正在慢慢变得清晰,但即使在阅读了几篇关于 SO 的文章之后,我仍然很模糊。 官方说法是它“可以与 System.Addins 并存”。 但是,它没有引用它,并且似乎重现了它的一些功能。 那么,在我看来,它是 System.Addins 的一个更简单、更易于访问的替代方案。

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

它的许可证刚刚开放,但它确实引用了 WindowsBase——不确定这是否意味着它与 Windows 耦合。

雅典卫城

我不知道这是什么。 是MEF,还是即将推出的东西?

复合应用程序块

WPF 和 Winforms 复合应用程序块似乎提供了更多的工作台框架。 我对这些方面的经验很少,但它们似乎在很大程度上依赖于指导自动化,并且显然与 UI 层相结合。 有一些将 MEF 与这些应用程序块相结合的示例。


我已经尽我所能来回答我自己的问题,但我实际上只是触及了表面,而且我对这些框架都没有经验。 希望你们中的一些人能够添加有关您使用过的框架的更多详细信息。 如果我们最终能得到某种比较矩阵,那就太好了。

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

  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. many layers of plugins that provide a basic workbench shell with concurrency support, commands, preference sheets, menus, toolbars, key bindings, etc.

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.


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.

(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)

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.

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.

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.

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.

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.

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.

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.

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.

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

Acropolis

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

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.


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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

花开柳相依 2024-07-15 00:35:55

您确实应该看一下 Visual Studio Shell。 它可以在集成模式下使用,在这种模式下,您的应用程序作为插件驻留在 Visual Studio 旁边,或者您可以在隔离模式下使用 shell,在这种模式下,shell 仅充当您的应用程序的基本框架,类似于 Eclipse shell。 请查看此网页

Visual Studio shell 功能强大、功能丰富且免费。 我还没有对它进行任何开发,但我一直在为即将到来的项目寻找它。 它看起来就像 Eclipse 一样强大的插件框架。

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.

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.

£烟消云散 2024-07-15 00:35:55

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

很不错。

-道格

+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.

Very nice.

-Doug

故事灯 2024-07-15 00:35:55

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

虽然它是免费的,但它不是开源的,而且遗憾的是,文档很少。 您已经提供了示例,这是一个好的开始,但这里还有一些其他可能有用的资源:

  • Mark Miller 是 DxCore/CodeRush/Refactor Pro! 的架构师,并在他的博客上发布了一些帖子(以及 DNR TV 剧集)。
  • 有一个社区论坛,您可以在其中发布问题。 接下来是 Mark 和其他一些 DxCore 开发人员,以及社区中的一些人员
  • DxCore 插件 在 Google 代码上。 尝试将社区创建的插件收集到一个地方。 这是工具和重构的完美结合,尽管有些已经过时了。

希望这对您有用。 我不得不说的唯一一件非常糟糕的事情是,它可能没有被更广泛地使用的原因是它是一个如此庞大的库,几乎没有文档,你必须愿意挖掘以找出如何利用一些冷却器的功能。

祝你好运!

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.

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.
  • 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
  • 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.

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!

请你别敷衍 2024-07-15 00:35:55

我刚刚将 SoapBox Core 作为开源版本发布,并编写了一篇介绍性的 关于 CodeProject 的文章。 这基本上就是您要寻找的。 它使用 MEF 来实现可扩展性,我从 SharpDevelop 那里得到了很多想法。 请注意,它是全新的并且仍在快速发展。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文