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

查看:26
本文介绍了哪个选项适合替换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 创建完美的小程序.您可能需要的任何库都可以与您的小程序一起部署.痛苦是一个安全问题.除了最新版本的 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天全站免登陆