What cross-browser technology do you use in your web applications to manipulate on client machines?

元气小坏坏 提交于 2020-01-15 06:10:08

问题


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

回答1:


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:

    • alternative technologies to replace applets
    • applet alternative launch from browser
    • alternatives to java applet to launch microsoft office applications
    • alternative-java-applet-network-drive-access
    • what are the alternatives for java applet to launch client programs using chrome
    • alternative of npapi plugins for flash java applet
    • python alternative to java applet
    • npapi alternative for live file editing
    • ... and many, many more!


来源:https://stackoverflow.com/questions/31315991/what-cross-browser-technology-do-you-use-in-your-web-applications-to-manipulate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!