爪哇小应用程序的可用性在网络 [英] usability of Java applets in the web

查看:112
本文介绍了爪哇小应用程序的可用性在网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关我们在我们大学的电子学习项目中,我们使用Java小程序来显示一些互动的东西(比如一些互动功能,绘图或者一些简单的问题/应答系统或其他互动元素以及这些的任意组合)伊利亚斯学习单元的内部。

For our eLearning project in our university, we are using Java applets to show some interactive stuff (like some interactive function plotting or some simple question/answer system or other interactive elements and any combination on those) inside of Ilias learning units.

我们决定对Java,因为我们需要一个开放的解决方案(和HTML5是不是真的可以在那个时候和Flash是和是不是一个真正的选择)。

We decided for Java because we wanted an open solution (and HTML5 was not really available at that time and Flash was and is not really an option).

现在,几年后,我真的得到的感觉是,Java是不是网络真正可用。主要是因为很多问题我还没有真正能解决所有情况。

Now, a few years later, I really got the feeling that Java is not really useable for the web. Mostly because of a lot of problems I haven't really been able to fix for all cases.

所以,我的问题:是的Java不只是用于Web正确的事还是我做某事。错误?你能指出我如何解决这些问题?

So, my question: Is Java just not the right thing for the web or am I doing sth. wrong? Can you point out how I could solve these problems?

我在的时候遇到的问题:

Problems I have encountered in the time:


  • 一个Java小程序采取年龄的负荷。即使是一个非常简单的applet小,有时需要大约一分钟加载。这是为什么?难道真的是,Java框架是如此远大于Qt或是其他框架?或者是VM这么大?或者是VM这么慢?

  • A Java applet take ages to load. Even if it is a very simple small applet, it sometimes takes about a minute to load. Why is that? Is it really that the Java framework is so much bigger than Qt or other frameworks? Or is the VM so big? Or is the VM so slow?

浏览器(或至少在Chrome的标签)变得非常慢尤其在加载小程序也算账。

The browser (or at least the tab in Chrome) gets very slow esp while loading the applet but also afterwards.

Java程序看起来每个系统上不同。 UI控件是完全不同的,表现也略有不同。有时,它是本机外观(或样了),有时它是完全自己的东西。另外,字体主要是不同的,往往支持单向code字不同的子集。这是一个真正的问题,对我们来说,因为我们采用UNI code很多关于数学符号,我们得到了很多的报道,有些符号不为一些人工作。另外,作为字体有每个系统上不同的大小,我得到的报告文本中(在JLabel或缩短...)削减了几个人。我已经解决这个问题,现在通过在JAR一个TTF得到。这作品大多。有时仍然我得到这些...即使有独特的字体报告。

The Java applet looks different on every system. The UI controls are totally different and also behave slightly different. Sometimes it's the native look (or kind of it), sometimes it's completely something own. Also the font is mostly different and often supports a different subset of Unicode characters. This is a real problem for us because we use Unicode a lot for math symbols and we got a lot of reports that some symbols don't work for some people. Also as the font has different size on each system, I got reports that the text is cut out for a few people (or shortened by "..." in a JLabel). I have gotten around this problem now by including a TTF in the JAR. That works mostly. Still sometimes I get these "..." reports even with the unique font.

有时候内存使用率令人难以置信的高(但不总是)。

Sometimes the memory usage is incredibly high (but not always).

当加载多个小程序的网页,很有可能变得非常高,使得浏览器craches和或多个applet不正确加载。另外,整个操作系统变得非常缓慢。

When loading a page with multiple applets, the chances become very high that the browser craches and or multiple applets don't load correctly. Also the whole operating system gets very slow.

有时,Java小程序不会在浏览器X,但在浏览器中加载Y.点击重装了几次或重新启动浏览器/系统后,这种行为可以切换。例如,它似乎可能性更高,在Firefox中的小应用程序负载(也并非总是如此,但大多是,至少点击重载一至两次后)在Chrome并不太可能(但如果我很幸运,它也可以有时) 。根据不同的系统上,它可以是工作最好不同的浏览器。虽然从未有它可以完美的浏览器。这种行为是对所有我们已经测试过的系统(不同的Linux发行版,32位和64位的Windows XP / Vista / 7的,MacOSX的)。

Sometimes, the Java applet doesn't load in browser X but in browser Y. After clicking a few times on reload or restarting the browser/system, that behavior may switch. For example, it seems that chances are higher that the applet load in Firefox (also not always, but mostly, at least after clicking one or two times on reload) and less likely on Chrome (but if I am lucky it also works sometimes). Depending on the system, it may be different browsers which work best. Though there is never a browser which works perfect. This behavior is on all the systems we have tested (different Linux distributions, both 32bit and 64bit, Windows XP/Vista/7, MacOSX).

有时,小程序保持空白,当我切换到另一个选项卡,并返回。有时它至少需要花费很长的时间,直到它再次示出了

Sometimes, the applet stays blank when I switched to another tab and return back. Sometimes it at least takes a very long time until it shows up again.

它吃掉了所有的CPU。即使我已经关闭的小应用程序的所有标签。我必须退出来解决这个浏览器。

It eats up all the CPU. Even after I have closed all tabs with the applets. I have to quit the browser to resolve this.

一些例子,我们有这些问题:

Some examples where we have these problems:

  • http://www.matha.rwth-aachen.de/~ilias/jars/Integration/Integration_Geogebra.html
  • http://www.matha.rwth-aachen.de/~ilias/jars/Abbildungen/Abbildungen.html
  • http://www.matha.rwth-aachen.de/~ilias/jars/Trigonometrie/Trigonometrie_Geonext.html
  • http://www.matha.rwth-aachen.de/~ilias/jars/AnalytischeGeometrieundLA/AnalytischeGeometrieundLA.html
  • http://www.matha.rwth-aachen.de/~ilias/jars/ganze%20und%20natuerliche%20Zahlen/ganze%20und%20natuerliche%20Zahlen.html

如果你看看这些例子,这将是一个很好的替代解决方案的Java?我想到了HTML + JS用最新的浏览器(这是不是一个真正的问题,如果我们告诉我们的用户,他们应该使用基于WebKit的浏览器或左右),但我认为,其中的一些例子可能非常难以实现(或至少比在Java中)更难了。

If you look at these examples, what would be a good alternative solution to Java? I thought about HTML+JS with recent browsers (it is not really a problem if we tell our users that they should use WebKit based browsers or so), although I think that some of these examples might be very hard to implement (or at least harder than in Java).

推荐答案

Java小程序是在本世纪初现代。有使用Java小程序今天,这可能是为什么浏览器的支持是不是最佳的原因之一只有极少数的网站。

Java Applets were modern at the beginning of this century. There are only few sites using Java applets today and this may be one of the reasons why the browser support is not optimal.

从我的浏览器卡住了之前我所看到,你的小程序似乎只是绘制各种图表。

From what I've seen before my browser got stuck, your applets seem to be just drawing various charts.

我会建议尝试其中重点绘制图表现代JavaScript库中的一项:
<一href=\"http://javascript.open-libraries.com/utilities/chart/20-best-javascript-charting-and-plotting-libraries/\" rel=\"nofollow\">http://javascript.open-libraries.com/utilities/chart/20-best-javascript-charting-and-plotting-libraries/

I would suggest trying one of the modern Javascript libraries which focus on drawing charts: http://javascript.open-libraries.com/utilities/chart/20-best-javascript-charting-and-plotting-libraries/

另外,如果你需要更多的选择比图书馆提供,你不那么在意跨浏览器兼容,你可以使用HTML5元素和SVG - 除了IE的所有浏览器都有不俗支持这些

Alternatively, if you need more options than the libraries offer and you do not care much about cross-browser compatibility, you may use the HTML5 element and SVG - all browsers except for IE have decent support of these.

如果您不需要图表是交互式的,则可以使它们使用PHP /拼音/ Python / Java的/不管,并送他们作为普通的图像浏览器在服务器上。

If you do not require the charts being interactive, you can render them on the server using PHP/Ruby/Python/Java/whatever and send them as plain images to the browser.

如果你需要前preSS数学EX pressions,考虑MATHML(http://en.wikipedia.org/wiki/MathML)或纯图像可能被服务器脚本呈现的飞行。

If you need to express mathematical expressions, consider MathML (http://en.wikipedia.org/wiki/MathML) or plain images possibly rendered on the fly by a server script.

这篇关于爪哇小应用程序的可用性在网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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