为什么Qt Creator的核心是一个插件?

发布于 2024-12-20 21:02:19 字数 83 浏览 2 评论 0原文

您是否有一个明确的解释为什么他们选择应用程序的核心作为像其他组件一样的插件,而不仅仅是一个基本的共享库? 除了设计的“酷”之外,我看不出任何明显的优势。

Do you have a clear explanation why they have chosen the core of the application to be a plugin like the other components, and not just a basic shared library?
I cannot see any clear advantages, besides the 'coolness' of the design.

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

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

发布评论

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

评论(2

酒绊 2024-12-27 21:02:19

我从开发者那里得到了答案:

Qt Creator 的目标不是成为一个应用程序框架。 “核心”是一个
插件主要有学术原因,尽管例如一个实用的
优点是,这样 Qt Creator 的核心自动具有
“版本”,并检查插件是否与 Qt Creator 兼容
与任何其他插件依赖项的完成方式完全相同。还
整个启动初始化(包括初始化
其他插件)以相同的方式完成,这导致相同的概念和
需要学习的东西更少。

I got an answer from the developers themselves:

Qt Creator doesn't aim to be an application framework. "Core" being a
plugin has mostly academical reasons, though e.g. one practical
advantage is that in that way the core of Qt Creator automatically has
a "version", and the check if a plugin is compatible with Qt Creator
is done the exact same way as with any other plugin dependencies. Also
the whole startup initialization (including the initialization of the
other plugins) is done the same way which leads to same concept and
there is less to learn.

凉薄对峙 2024-12-27 21:02:19

至于“为什么”我们只能猜测。在他们自己的文档中,他们指出:

Qt Creator 可以通过多种方式进行扩展。例如,Qt 创建者
架构基于插件加载器,这意味着所有
插件加载之外的功能是在插件中实现的。
然而,您可以扩展和调整 Qt Creator 的许多部分,而无需
需要求助于 C++ 编码并实现这样的插件。

因此,从这一点可以看出,这一选择是考虑到可扩展性而做出的。我不确定“为什么核心是一个插件?”的答案是否正确。不仅仅是“为什么不?”。如果您正在将应用程序创建为,正如他们所说,插件加载器,那么为什么不使其功能尽可能“轻”,并使核心也成为插件。

As to "why" we can only guess. In their own documentation they state:

Qt Creator is extensible in various ways. For example, Qt Creator
architecture is based on a plugin loader, which means that all
functionality beyond plugin loading is implemented in plugins.
However, you can extend and tweak many parts of Qt Creator without the
need to resort to coding in C++ and implementing such a plugin.

So from this one could gather that this choice was made with extensibility in mind. I'm not sure if the answer to "why is the core a plugin?" is anything more than "why not?". If you are creating your application to be, as they say, a plugin loader, then why not keep it as "light" on functionality as possible and make the core a plugin as well.

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