Java小程序 - 它是一个错误的选择,今天? [英] Java Applets - is it a wrong choice today?

查看:114
本文介绍了Java小程序 - 它是一个错误的选择,今天?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些不平凡的计算code需要对已经下载到浏览器的DOM和用户交互捕获的数据加以应用。我不希望公开此code。我想知道如果:

I have some non-trivial computational code that need to be applied on data already downloaded into the browser DOM and captured from user interactions. I do not wish to expose this code. I am wondering if:


  1. 编写一个Web服务,并与浏览器通过WebSocket的或HTTP进行通信。代价是交互(从光滑到差)的速度和更高的流量费用。

  2. 编写Java小程序(签署隐藏code)该页面内封装逻辑,而让JavaScript和Java API的互动。我读其他地方的Java和JS引擎可以在某些scenarions死锁。但是,由于我只是计算,这是不是问题的问题。也许,在多核心的机器,我可以使用一些更多的线程瓜分我的工作。

  3. 在JavaScript来编写。但是,JavaScript是很难测试,这一切都在公众的视线。

Q&功放;在web 可用性>和其他几个人也被劝退。

Q&A such as usability of Java applets in the web and several others are also discouraging.

我的问题是:是Java小程序死技术。有没有连Q&安培; A对这个话题这些天!此外,Java的可能并不总是与所有浏览器(台式机,平板电脑或移动电话)捆绑?

My question is: are Java applets a dead technology. There aren't even Q&A on this topic these days! Additionally, Java may not always be bundled with all browsers (desktop, tablet or mobile)?

是否有其他更好的方法来完成相同的 - 隐藏code,利用客户端CPU / RAM,最大限度地减少数据流量

Are there other, better ways to accomplish the same - hide code, utilize client cpu/ram, minimize data traffic.

本网页上的JavaScript / HTML5 / CSS。服务器只出来的菜JSON / XML。该数据包是10-20KB,并经常更新。该计算是昂贵和特殊的客户,所以我真的想使用客户端做了这一切。

The web pages are on Javascript/html5/css. Server only dishes out JSON/XML. The data packets are 10-20KB and updated frequently. The computations are expensive and client-specific so I would really like to use the client to do all that.

非常感谢。

推荐答案

我认为小程序的最大缺点是它假定您已经安装了客户机上的JRE。它是一个真正可行的假设呢?
当然,你可以提供下载和安装JRE为好,但为什么只有费心做的这一切作出一些计算?
还有一个问题我会问自己,可你的客户是手机,平板电脑等?如果是这样,也许Java脚本是一个更好的选择去了。

I thinks the biggest disadvantage of applet is that it assumes you have a JRE installed on a client machine. Is it really a viable assumption? Of course you can offer to download and install JRE as well, but why bother doing all this only for making some computation? Another question I would ask myself, can your clients be mobile phones, tablets and so on? If so, maybe the Java Script is a better option to go.

然而:)你提到打开眼睛Java脚本再过5美分
你应该明白,保护您的计算code的唯一途径是把计算服务器。我的意思是,即使你有一个编译的二进制code,Java的组件易于理解熟练的攻击者。而你提到的模糊处理(其混淆,不签JAR)使得稍硬,但仍然不是不可能的。

And yet another 5 cents :) You mentioned 'opened to eye java script' You should understand that the only real way of protecting your computation code is putting the computation on server. I mean, that even if you have a compiled binary code, java's assembly is easy-to-understand for skilled attacker. And obfuscation that you mentioned (its obfuscation, not signing jar) makes it slightly harder but still not impossible.

我在这里看到的唯一担心的是,如果你有很多同时运行的计算的客户,你把计算的负担,您的服务器上就可以最终崩溃。

The only concern I see here is that if you have a lot of clients that are running the computation simultaneously and you put the burden of computation on your server it can collapse eventually.

只是我的想法,希望这将帮助你在这里选择了最好的方向...

Just my thoughts, hopefully this will help you to chose the best direction here...

这篇关于Java小程序 - 它是一个错误的选择,今天?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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