您在 Web 应用程序中使用了哪些跨浏览器技术来在客户端计算机上进行操作? [英] What cross-browser technology do you use in your web applications to manipulate on client machines?

查看:30
本文介绍了您在 Web 应用程序中使用了哪些跨浏览器技术来在客户端计算机上进行操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(我对 Google Chrome 的改进有一个问题,这将放弃对我当前解决方案的支持.)

我从事将桌面系统移动到 Intranet Web 应用程序的项目.

关键要求是:

  • 将桌面系统移动到网络应用程序
  • 从 Web 应用程序中的桌面系统重现每一个功能

虽然 95% 的工作需要创建临时 Web 应用程序,但有一件事情是非标准处理的:我的应用程序必须在客户端计算机上执行一些操作.这些包括:

  • 与图书馆联系
  • 启动桌面应用
  • 后台文件操作

示例场景是将我的系统与实验室中的某台机器集成.我必须通过 DLL 将我的 Web 应用程序与客户端计算机上的驱动程序集成(桌面应用程序这样做,所以我的应用程序也必须这样做).

理论上桌面操作的场景可能会有所不同,我只想实现一些界面来处理桌面应用程序已经完成的所有客户端-机器"工作,所以没有必要处理每个场景(但是当然每个场景都应该被测试).

我的解决方案是 Java Applet.有效.但随后 Google Chrome 决定放弃对 NPAPI 插件的支持,因此在 15 年 9 月将不再支持 Java 插件(和我的小程序)(http://blog.chromium.org/2014/11/the-final-countdown-for-npapi.html).

所以我的另一个解决方案是 Java Web Start.有用.但现在谷歌浏览器决定放弃对外部协议后台操作的支持(https://code.google.com/p/chromium/issues/detail?id=348640),因此从 Google Chrome 45 开始,我的 Java Web Start 解决方案将不受支持.

(以上两种解决方案都适用于 Firefox 和 IE.)

问题:我可以使用哪些其他技术从我的网络应用程序与客户端机器进行交互?

其他备注:

  • 我不愿意编写自己的 PPAPI 插件或 Chrome 扩展程序 - 我更喜欢一种适用于所有主要浏览器的解决方案.
  • 我知道 StackOverflow 社区不喜欢讨论技术,所以请专注于描述我的问题的可能解决方案.

解决方案

我们遇到了类似的问题,因为我们需要通过 JNI->DLL 连接/访问电子设备.目前唯一可行的技术是小程序.时期.(即使这也很棘手,因为浏览器/java 版本/操作系统的某些组合不起作用或有问题,但这是另一回事......)

有一些像 HTLM5、JScript 这样的网络技术可以替代小程序的一些功能,但是在某些情况下(比如你的),目前没有可用的替代方案 - 你指定了其中的一些:

  • 与 *.dll、*.so 等库连接
  • 文件操作
  • 启动应用程序

并且跨浏览器和操作系统执行此操作!

解决方案?

  1. 告诉您的用户某些浏览器无法使用(例如 Chrome 和歌剧下一个)
  2. 为每个浏览器编写单独的插件(这可能超出您的预算;-)
  3. 您是否考虑过以可执行文件的形式编写独立应用程序?但是,用户必须下载并运行它,例如还需要安装java或插件.但是还有安全方面的问题(下载并执行可执行文件)——当然不是一个容易的决定
  4. 看看 FireBreath 2 -(只是在一些帖子中阅读了它,但没有尝试过)
  5. 关于此主题的 SO 有很多讨论,请阅读:

(I have a problem with Google Chrome improvements that will drop support for my current solutions.)

I work on project where I move desktop system to an Intranet web application.

The crucial requirements are:

  • to move desktop system to a web application
  • to reproduce every single functionality from the desktop system in the webapp

While 95% of work requires creating casual web application, there is one thing which is non-standard to handle: my application must perform some actions on the client computer. These includes:

  • connecting with libraries
  • launching desktop apps
  • file manipulation in background

The example scenario is to integrate my system with some machine in the lab. I have to integrate my web application with drivers on client computer via DLL (desktop app did this, so my app have to do this as well).

Theoretically scenarios of the desktop actions may vary and I just want to implement some interface that will handle all the "client-machine" job the desktop app has done, so there is no need to work on every single scenario (but of course every scenario should be tested).

My solution was Java Applet. It worked. But then Google Chrome decided to drop support for NPAPI plugins, so in September'15 Java plugin (and my applet) won't be supported (http://blog.chromium.org/2014/11/the-final-countdown-for-npapi.html).

So my another solution is Java Web Start. It works. But now Google Chrome decided to drop support for background operations of external protocols (https://code.google.com/p/chromium/issues/detail?id=348640), so from Google Chrome 45 my Java Web Start solution won't be supported.

(Both above solutions work on Firefox and IE.)

The question: What other technology can I use to interact with a client machine from my web app?

Other remarks:

  • I am reluctunt to write my own PPAPI plugin or Chrome Extension - I prefer one solution working on all major browsers.
  • I know that StackOverflow community does not like discussions about technologies, so please focus on describing possible solution to my problem.

解决方案

We struggled with a similar problem as we need to connect/access electronic devices over JNI->DLL. The only technology where this is currently possible are applets. Period. (And even that is tricky since certain combinations of browsers/java versions/operating systems do not work or have problems, but this is another story...)

There are web technologies like HTLM5, JScript which can replace some functionalities of applets however in certain scenarios (like yours) there is no current alternative available - and you named some of those:

  • connecting with libraries like *.dll, *.so etc.
  • file manipulations
  • launching applications

And doing that across browsers and operating systems!

Solutions?

  1. Tell your users that certain browsers can't be used (like Chrome and Opera Next)
  2. Write individual plugins for each browser (which probably is beyond your budget ;-)
  3. Did you consider writing standalone application(s) in form of an executable file? The user must download and run it however e.g. java or plugins also need to be installed. But then there is the security aspect of that (downloading an and executing an executable file) - certainly not an easy decision
  4. Have a look at FireBreath 2 - (just read about it in some posts, however didn't try it)
  5. There are lots of discussions on SO to this topic so take a read:

这篇关于您在 Web 应用程序中使用了哪些跨浏览器技术来在客户端计算机上进行操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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