哪个选项适合替换Java Applet? [英] Which option is suitable to replace Java Applet?

查看:142
本文介绍了哪个选项适合替换Java Applet?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想替换当前需要使用客户端资源(即外部读取器)并通过套接字与服务器通信的Java Applet.

I would like to replace Java Applet which currently needs to use client's resources, i.e. external readers, and to communicate with a server via socket.

原因: 1.我有成千上万个使用此Java Applet程序的客户端计算机,其中大多数正在运行过时的JRE.当Java Applet程序被更新/添加了新功能时,所有客户端计算机都将需要更新最新的JRE.

Reason: 1. I have thousands of client machines using this Java Applet program, and most of them are running out-dated JRE. When the Java Applet program is updated / added new features, all client machines will need updating the latest JRE.

期望的解决方案:

Java Applet程序有望被基于Web的应用程序所取代,该应用程序允许在客户端编译和运行源代码,以便新的基于Web的应用程序仍可以使用客户端的资源并通过套接字与服务器通信

The Java Applet program would be expected to be replaced by a web-based application, which allows to compile and run source code at client's side such that the new web-based application could still use client's resources and communicate with server via socket.

我可以使用 JavaScript 来实现它吗?

Can I use JavaScript to achieve it?

非常感谢您对这个问题的帮助/建议.谢谢!

I would very appreciate your help/suggestion for this problem. Thank you!

推荐答案

JavaScript是一种脚本语言,可在浏览器中进行评估. 我不会将其描述为编译和运行,但是是的,它的确意味着您可以在客户端中运行代码,并且通常用于创建在浏览器中运行的应用程序.

JavaScript is a scripting language that gets evaluated in the browser. I would not describe it as compiling and running but yes, it does mean you can run code in the client and is commonly used to create applications that run in the browser.

您可以使用大量的框架来编写应用程序.查看 TodoMVC 网站,以查看使用多个不同框架创建的同一TODO应用.

There's a staggering amount of frameworks that you can use to write your application. Take a look at the TodoMVC site to see the same TODO app created using several different frameworks.

如果您来自Java小程序,那么GWT可能很有趣.

If you come from Java applets, GWT may be interesting to look at.

如果希望让JavaScript客户端侦听来自服务器的消息,请查看 websockets .

If you wish to let the JavaScript client listen for messages from the server, take a look at websockets.

但是,智能卡读卡器将成为一个问题! 请参阅要访问的体系结构来自通用浏览器的智能卡?或者:如何弥合浏览器与PC/SC堆栈之间的鸿沟?

The smart card reader is going to be a problem, though! See Architectures to access Smart Card from a generic browser? Or: How to bridge the gap from browser to PC/SC stack?

顺便说一句:

过时的JRE的真正问题不是您的代码不能在旧的JRE上运行,您可以使用Java 1.4或Java 5创建完美的applet.您可能需要的任何库都可以与applet一起部署.痛苦是一个安全问题.除了最新版本的Java插件,其他任何东西都被积极利用,并给用户带来风险.有时,即使是最新版本也不安全.

The real issue with outdated JREs is not that your code will not run on old JREs, you can create perfectly fine applets using java 1.4 or java 5. Any libraries you may need you can deploy alongside your applet. The pain is a security problem. Anything but the latest version Java plugin is getting actively exploited and puts the user at risk. Occasionally, even the latest version is not safe.

这篇关于哪个选项适合替换Java Applet?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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