编写一个插件来让您的 C++ 有何优点和缺点?应用程序通过网络浏览器运行?

发布于 2024-10-01 11:19:15 字数 274 浏览 5 评论 0原文

这不是一个关于编写网络应用程序与桌面应用程序的问题。这是一个关于允许定制应用程序通过使用自定义插件在浏览器中运行的问题,有效地将浏览器用作渲染窗口。

QuakeLive 做到了这一点——它是一个 C++ 应用程序,带有一些额外的代码可以通过浏览器运行。 Unity3D 和 Torque 游戏引擎还提供部署选项来执行相同的操作。

就我个人而言,我对这样一个系统的实用性有点怀疑。但我欢迎其他人就这可能是或不是一个好主意的原因发表意见。

不确定是否有合适的术语,如果有,请编辑我的标签!

This is not a question about writing a web-app Vs a desktop app. It's a question about allowing a bespoke application to run in a browser though use of a custom plugin, effectively using the browser just as your render-window.

QuakeLive does this - it's a C++ application with some extra code to run through a browser. Unity3D and Torque game engines also provide deployment options to do the same thing.

Personally, I'm a bit dubious about the usefulness of such a system. But I'd welcome other opinions on the reasons why this might or might not be a good idea.

Not sure if there's a proper term for this, please edit my tags if there is!

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

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

发布评论

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

评论(1

以可爱出名 2024-10-08 11:19:15

这取决于应用程序。我的背景是医学成像,但我要说的内容适用于许多信息系统客户:

优点:

  • 在应用程序之间构建基于 REST 的集成变得更加容易。管理员可以使用这种类型的集成来构建集成门户。 (因此,一个应用程序中的案例 ID 可用于启动另一个具有正确上下文的应用程序等)。
  • 理想情况下,用户可以按需自行安装您的应用程序(如果确实可能,则取决于上下文)
  • 新版本的部署变得更加容易。通常托管技术具有内置部署。在客户端服务器环境中,这可以为 IT 部门节省大量工作。
  • 您可以为 PC 和瘦 Web 客户端(如手机)设置一个起始 URL。这使用户可以轻松找到您的应用程序。
  • 您可以集中客户端的配置。对于独立客户端,您当然可以以某种方式集中配置,但如果您的应用程序是基于 Web 的,您始终确定有一个服务器,因此您始终可以使用它。
  • 您可以将本地效率低下的工作转移到服务器上。 (减少客户端/服务器之间的往返次数)。

缺点:

  • 每个浏览器供应商都有自己的包装本机代码的模型。虽然数量不多,但这绝对是额外的工作。
  • 您的应用程序必须与托管应用程序“很好地配合”。就像当用户关闭浏览器窗口时一样,浏览器可能已经规定了何时以及如何要求用户保存。
  • 浏览器更新可能会破坏您的插件。
  • 系统管理员可能会限制插件的安装,不允许用户按需安装您的应用程序(对于 activex,这种情况经常发生)。
  • 您的用户可能不喜欢将额外的代码注入到浏览器中(周围有很多恶意软件会这样做)
  • 您没有机会在安装之前更新先决条件
  • 我真的不相信它只是将现有代码包装在一个插件框架。
  • 当服务器关闭时,您的应用程序将不再工作......

It depends on the application. My background is in medical imaging, but what I have to say would apply to many information system clients:

Pros:

  • it gets easier to build REST-based integrations between applications. This type of integrations can be used by admins to build integrated portals. (So case ID's from one application can be used to launch another with the right context etc).
  • ideally, users can install your application themselves, on-demand (depends on context if this is really possible)
  • Deployment of new versions gets easier. Usually the hosting technology has deployment built-in. In client server environments, this can save a lot of work for the IT department.
  • You can have a single start URL for PC's and thin web clients (like phones). This makes it easy for users to find your application.
  • You can centralize configuration for clients. For standalone clients, you could of course centralize configuration somehow, but if you app is web based, you always know for sure there is a server, so you can always use it.
  • you can offload work that's ineficcient to do locally to the server. (reduce # of roundtrips between client/server).

Cons:

  • Each browser vendor has its own model of wrapping the native code. There are not too many, but it's definetly extra work.
  • Your app has to "play nice" with the hosting application. Like when the user closes the browser window, the browser may have prescribed when and how you can ask the user to save.
  • updates to browsers can break your plugin.
  • system admins may have restricted installation of plugins, disallowing users to install your application on demand (this happens a lot for activex).
  • your users may not like that extra code is injected into the browser (there is a lot of malware around that does this)
  • you don't have the opportunity to update prerequisites before installation
  • I don't believe really that it's just wrapping existing code in a plugin framework.
  • Your application won't work anymore when the server is down...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文