为什么java applet /javafx没有被广泛使用?(为什么我不应该把它们用在RIA上)

时间:2021-01-22 17:00:13

Java is one of the best managed runtime technologies we have. It has very high performance VM which allows to achieve performance close to C. The amount of high quality open source libraries is incomparable to any other platform. However, despite it was the first dynamic client side technology to appear in browsers (Applets), it isn't used widely now. What are disadvantages of Java which make people use JavaScript + HTML5 or Flash/Flex instead of Java for RIA? Why should I use them despite they are not as pleasant for a programmer as Java?

Java是我们拥有的最好的托管运行时技术之一。它具有非常高的性能VM,可以实现接近c的性能。高质量的开源库的数量无法与任何其他平台相比。然而,尽管它是第一个出现在浏览器(applet)中的动态客户端技术,但它现在并没有被广泛使用。让人们在RIA中使用JavaScript + HTML5或Flash/Flex而不是Java的缺点是什么?为什么我应该使用它们,尽管它们对程序员来说不如Java那么令人愉快?

3 个解决方案

#1


5  

It can take a lot of work to create a high quality applet compared to the amount of time it takes someone to create a high quality flash application. Building a presentation layer can be tedious without the right tools.

要创建一个高质量的应用程序,需要花费大量的时间来创建高质量的flash应用程序。如果没有合适的工具,构建表示层可能会很繁琐。

Furthermore, Oracle/Sun gave up on applets a while ago. They still support them but are not actively trying to improve them. Oracle is currently putting all of its weight behind JavaFX. JavaFX is a technically viable solution and has the advantage of allowing you to leverage your Java knowledge. The problem is most web designers don't have much Java knowledge and don't want to bother with it so JavaFX has never been very popular. If a web language isn't popular it can annoy your users when they have to download plugins to use it.

此外,Oracle/Sun在不久前放弃了applet。他们仍然支持他们,但并不积极地试图改善他们。Oracle目前正全力支持JavaFX。JavaFX是一种技术上可行的解决方案,它的优点是允许您利用Java知识。问题是,大多数web设计人员都没有多少Java知识,也不想为此费心,所以JavaFX从来都不是很流行。如果一种web语言不受欢迎,当用户不得不下载插件来使用它时,它可能会惹恼用户。

Another thing to keep in mind is that Flash itself is also on the way out. If you're going to be developing and maintaining this project yourself then feel free to pick up JavaFX.

另一件要记住的事情是Flash本身也在过时。如果您打算自己开发和维护这个项目,那么可以使用JavaFX。

If you plan on hiring a web designer or you want to learn web design skills allowing you to get hired somewhere then your best bet these days seems to be learning a good javascript framework (e.g. JQuery) and picking up some solid HTML5 and CSS3 skills.

如果你打算雇佣一个网页设计师,或者你想学习让你在某个地方被雇佣的网页设计技能,那么你现在最好的选择似乎是学习一个好的javascript框架(例如JQuery),学习一些可靠的HTML5和CSS3技能。

#2


8  

"it isn't used widely now"

"现在还没有被广泛使用"

I disagree with this perception... some examples:

我不同意这种看法……一些例子:

Mindterm is a Java based ssh freeware client supporting ssh2 can be run embedded as applet google for it

Mindterm是一个基于Java的ssh免费软件客户端,支持ssh2,它可以作为applet谷歌来运行

Mizu web phone is a Java and open standards based SIP VOIP client which can be embedded as an Applet -google for it-

Mizu web phone是一款基于Java和开放标准的SIP VOIP客户端,它可以作为一个Applet(谷歌就是一个例子)嵌入其中

OpenSignX is an opensource Java based document and form signing Java applet for PKI X.509 certificates. google for it

OpenSignX是一个基于opensource Java的文档,是PKI X.509证书的表单签名Java applet。谷歌为它

Coolsmile is a Java based IRC client that can be run as app or embedded Applet -google for it-

Coolsmile是一个基于Java的IRC客户端,它可以作为应用程序或嵌入式Applet运行——google就是一个例子

JFTerm is a Java telnet client. Can be run as desktop app or applet. Supports telnet (23), ssl and ssh -google for it-

JFTerm是一个Java telnet客户端。可以作为桌面应用程序或小应用程序运行。支持telnet(23)、ssl和ssh -google。

J3Dworkbench is a Java 3D game-design authoring tool. delivery via Webstart or as Applets -google for it-

J3Dworkbench是一个Java 3D游戏设计创作工具。通过Webstart或作为applet(谷歌为它)交付

There´s also thevirtualheart dot org a Java based heart simulator also an applet

还有thevirtualheart´s点org基于Java的心也模拟器applet

or Geocaching browser (JavaFX) at canoo dot com

或者在canoo。com上的地理定位浏览器(JavaFX)

You cannot do everything in HTML5... for instance take a look at complex apps like JITSI (videocomerencing, voip app) or MuCommander -google it- or Sweet Home 3D, or Art of Illusion... all java-based. Java serves a purpose... and Microsoft and its friends have been trying to discredit it, replace it with something else, and it continues being relevant. ask yourself why. it´s because it serves a purpose and its level playing field software ecosystem is HUGE.

你不能在HTML5中做任何事情……例如,看看像JITSI(视频通讯,voip应用)或者MuCommander -google这类复杂的应用程序,或者是甜蜜的家庭3D,或者是错觉的艺术……所有基于java的。Java服务于一个目的……微软和它的朋友们一直在试图抹黑它,用别的东西取代它,它仍然是相关的。问问自己为什么。它´s,因为它服务于一个目的,它的公平竞争的软件生态系统是巨大的。

Do a seach of code dot google.com for Java-related projects... and see.

为与java相关的项目做代码点google。com…看看。

Plus, to the commenter above who says JavaFX has limited appeal let me remind you that Java is NOT ONLY a programming language but actually 3 things: a programming language, a runtime environment, and a level playing field software ecosystem. You can use Java libs without writing a single code of Java language ... using Jython (Python for Java), JRuby (Ruby on Java), NetRexx (open source Rexx on Java, see www.netrexx.org), xRuby (ruby to Java bytecode compiler) or Jabaco (Basic to java bytecode compiler)... just to name a few of the many JVM languages... http://en.wikipedia.org/wiki/List_of_JVM_languages

另外,对于上面说JavaFX的吸引力有限的评论者,让我提醒您,Java不仅是一种编程语言,而且实际上是三样东西:一种编程语言、一个运行时环境和一个公平竞争的软件生态系统。您可以使用Java libs而无需编写Java语言的单一代码……使用Jython (Java的Python)、JRuby (Java的Ruby)、NetRexx (Java的开源Rexx,参见www.netrexx.org)、xRuby (Java的Ruby to Java字节码编译器)或Jabaco (Java字节码编译器的基础)……举几个JVM语言的例子……http://en.wikipedia.org/wiki/List_of_JVM_languages

#3


1  

Google maps for mobile is a java applet "http://en.wikipedia.org/wiki/Google_Maps#cite_note-20" I should think that says alot, the question is sort of a truism this prevents a constructive answer the question I'd try to answer is this "is java applets and javaFX widely used" as your question is based on a premise which we cant be sure of how you arrived at it. Java applets work on the web JavaFX on the other hand is more than just for building applets, a GUI isn't just an applet

谷歌地图的移动是一个java applet " http://en.wikipedia.org/wiki/Google_Maps # cite_note-20”我想说很多,问题是一种真理这样可以防止一个建设性的回答这个问题我回答是“java applet,javaFX广泛使用”你的问题是基于一个前提,我们不能确定你如何到达它。Java applet在web JavaFX上工作的不仅仅是构建applet,一个GUI不仅仅是一个applet。

I can just hope to add to your knowledge and help you re-assess your opinion the below is from:

我只希望增加你的知识,并帮助你重新评估你的意见如下:

http://www.ibm.com/developerworks/web/library/wa-appmozx/

http://www.ibm.com/developerworks/web/library/wa-appmozx/

HTML is great for displaying hypertext documents, but terrible for displaying GUIs. Traditional Web-based applications use endless amounts of effort trying to shoehorn HTML into the look-and-feel of a traditional forms-and-menus application. That was never a purpose for which it was intended. The addition of form elements to HTML (FORM) did little more than create a new way to implement thin-client block-mode applications in the style of the venerable 3270 terminal. Like the 3270, HTML provides batched-up form submission. Character-based applications ultimately gained efficient user-navigation systems, but that was all lost when GUI applications came along. Subsequently GUI applications added back their own navigation structures, using the mouse and widget feedback. When HTML forms came on the scene, they copied the design of block-mode terminals, but without the tight navigation and without replacing it with a proper GUI equivalent. Under HTML, the user is left to guess which visual elements on a given page might be user controls and which are just decorations. Therefore, for GUI-driven applications, HTML isn't that great a starting point. That's the reason why Java applets were met with such positive market hysteria when they first appeared -- they presented an opportunity to provide a real GUI.

HTML非常适合显示超文本文档,但对于显示gui却很糟糕。传统的基于web的应用程序需要花费大量的精力来将HTML硬塞到传统的表单和菜单应用程序的外观中。这从来都不是目的。在HTML(表单)中添加表单元素仅仅是创建了一种新的方法,以令人尊敬的3270终端的风格实现瘦客户机块模式应用程序。与3270一样,HTML提供批处理表单提交。基于字符的应用程序最终获得了高效的用户导航系统,但当GUI应用程序出现时,这一切都丢失了。随后,GUI应用程序使用鼠标和小部件反馈,重新添加了自己的导航结构。当HTML表单出现时,它们复制了块模式终端的设计,但没有严格的导航,也没有使用适当的GUI对等物替换它。在HTML下,用户可以猜测给定页面上的哪些视觉元素可能是用户控件,哪些只是修饰。因此,对于gui驱动的应用程序来说,HTML并不是一个很好的起点。这就是为什么Java applet第一次出现时,会遇到如此积极的市场*——它们提供了一个提供真正GUI的机会。

#1


5  

It can take a lot of work to create a high quality applet compared to the amount of time it takes someone to create a high quality flash application. Building a presentation layer can be tedious without the right tools.

要创建一个高质量的应用程序,需要花费大量的时间来创建高质量的flash应用程序。如果没有合适的工具,构建表示层可能会很繁琐。

Furthermore, Oracle/Sun gave up on applets a while ago. They still support them but are not actively trying to improve them. Oracle is currently putting all of its weight behind JavaFX. JavaFX is a technically viable solution and has the advantage of allowing you to leverage your Java knowledge. The problem is most web designers don't have much Java knowledge and don't want to bother with it so JavaFX has never been very popular. If a web language isn't popular it can annoy your users when they have to download plugins to use it.

此外,Oracle/Sun在不久前放弃了applet。他们仍然支持他们,但并不积极地试图改善他们。Oracle目前正全力支持JavaFX。JavaFX是一种技术上可行的解决方案,它的优点是允许您利用Java知识。问题是,大多数web设计人员都没有多少Java知识,也不想为此费心,所以JavaFX从来都不是很流行。如果一种web语言不受欢迎,当用户不得不下载插件来使用它时,它可能会惹恼用户。

Another thing to keep in mind is that Flash itself is also on the way out. If you're going to be developing and maintaining this project yourself then feel free to pick up JavaFX.

另一件要记住的事情是Flash本身也在过时。如果您打算自己开发和维护这个项目,那么可以使用JavaFX。

If you plan on hiring a web designer or you want to learn web design skills allowing you to get hired somewhere then your best bet these days seems to be learning a good javascript framework (e.g. JQuery) and picking up some solid HTML5 and CSS3 skills.

如果你打算雇佣一个网页设计师,或者你想学习让你在某个地方被雇佣的网页设计技能,那么你现在最好的选择似乎是学习一个好的javascript框架(例如JQuery),学习一些可靠的HTML5和CSS3技能。

#2


8  

"it isn't used widely now"

"现在还没有被广泛使用"

I disagree with this perception... some examples:

我不同意这种看法……一些例子:

Mindterm is a Java based ssh freeware client supporting ssh2 can be run embedded as applet google for it

Mindterm是一个基于Java的ssh免费软件客户端,支持ssh2,它可以作为applet谷歌来运行

Mizu web phone is a Java and open standards based SIP VOIP client which can be embedded as an Applet -google for it-

Mizu web phone是一款基于Java和开放标准的SIP VOIP客户端,它可以作为一个Applet(谷歌就是一个例子)嵌入其中

OpenSignX is an opensource Java based document and form signing Java applet for PKI X.509 certificates. google for it

OpenSignX是一个基于opensource Java的文档,是PKI X.509证书的表单签名Java applet。谷歌为它

Coolsmile is a Java based IRC client that can be run as app or embedded Applet -google for it-

Coolsmile是一个基于Java的IRC客户端,它可以作为应用程序或嵌入式Applet运行——google就是一个例子

JFTerm is a Java telnet client. Can be run as desktop app or applet. Supports telnet (23), ssl and ssh -google for it-

JFTerm是一个Java telnet客户端。可以作为桌面应用程序或小应用程序运行。支持telnet(23)、ssl和ssh -google。

J3Dworkbench is a Java 3D game-design authoring tool. delivery via Webstart or as Applets -google for it-

J3Dworkbench是一个Java 3D游戏设计创作工具。通过Webstart或作为applet(谷歌为它)交付

There´s also thevirtualheart dot org a Java based heart simulator also an applet

还有thevirtualheart´s点org基于Java的心也模拟器applet

or Geocaching browser (JavaFX) at canoo dot com

或者在canoo。com上的地理定位浏览器(JavaFX)

You cannot do everything in HTML5... for instance take a look at complex apps like JITSI (videocomerencing, voip app) or MuCommander -google it- or Sweet Home 3D, or Art of Illusion... all java-based. Java serves a purpose... and Microsoft and its friends have been trying to discredit it, replace it with something else, and it continues being relevant. ask yourself why. it´s because it serves a purpose and its level playing field software ecosystem is HUGE.

你不能在HTML5中做任何事情……例如,看看像JITSI(视频通讯,voip应用)或者MuCommander -google这类复杂的应用程序,或者是甜蜜的家庭3D,或者是错觉的艺术……所有基于java的。Java服务于一个目的……微软和它的朋友们一直在试图抹黑它,用别的东西取代它,它仍然是相关的。问问自己为什么。它´s,因为它服务于一个目的,它的公平竞争的软件生态系统是巨大的。

Do a seach of code dot google.com for Java-related projects... and see.

为与java相关的项目做代码点google。com…看看。

Plus, to the commenter above who says JavaFX has limited appeal let me remind you that Java is NOT ONLY a programming language but actually 3 things: a programming language, a runtime environment, and a level playing field software ecosystem. You can use Java libs without writing a single code of Java language ... using Jython (Python for Java), JRuby (Ruby on Java), NetRexx (open source Rexx on Java, see www.netrexx.org), xRuby (ruby to Java bytecode compiler) or Jabaco (Basic to java bytecode compiler)... just to name a few of the many JVM languages... http://en.wikipedia.org/wiki/List_of_JVM_languages

另外,对于上面说JavaFX的吸引力有限的评论者,让我提醒您,Java不仅是一种编程语言,而且实际上是三样东西:一种编程语言、一个运行时环境和一个公平竞争的软件生态系统。您可以使用Java libs而无需编写Java语言的单一代码……使用Jython (Java的Python)、JRuby (Java的Ruby)、NetRexx (Java的开源Rexx,参见www.netrexx.org)、xRuby (Java的Ruby to Java字节码编译器)或Jabaco (Java字节码编译器的基础)……举几个JVM语言的例子……http://en.wikipedia.org/wiki/List_of_JVM_languages

#3


1  

Google maps for mobile is a java applet "http://en.wikipedia.org/wiki/Google_Maps#cite_note-20" I should think that says alot, the question is sort of a truism this prevents a constructive answer the question I'd try to answer is this "is java applets and javaFX widely used" as your question is based on a premise which we cant be sure of how you arrived at it. Java applets work on the web JavaFX on the other hand is more than just for building applets, a GUI isn't just an applet

谷歌地图的移动是一个java applet " http://en.wikipedia.org/wiki/Google_Maps # cite_note-20”我想说很多,问题是一种真理这样可以防止一个建设性的回答这个问题我回答是“java applet,javaFX广泛使用”你的问题是基于一个前提,我们不能确定你如何到达它。Java applet在web JavaFX上工作的不仅仅是构建applet,一个GUI不仅仅是一个applet。

I can just hope to add to your knowledge and help you re-assess your opinion the below is from:

我只希望增加你的知识,并帮助你重新评估你的意见如下:

http://www.ibm.com/developerworks/web/library/wa-appmozx/

http://www.ibm.com/developerworks/web/library/wa-appmozx/

HTML is great for displaying hypertext documents, but terrible for displaying GUIs. Traditional Web-based applications use endless amounts of effort trying to shoehorn HTML into the look-and-feel of a traditional forms-and-menus application. That was never a purpose for which it was intended. The addition of form elements to HTML (FORM) did little more than create a new way to implement thin-client block-mode applications in the style of the venerable 3270 terminal. Like the 3270, HTML provides batched-up form submission. Character-based applications ultimately gained efficient user-navigation systems, but that was all lost when GUI applications came along. Subsequently GUI applications added back their own navigation structures, using the mouse and widget feedback. When HTML forms came on the scene, they copied the design of block-mode terminals, but without the tight navigation and without replacing it with a proper GUI equivalent. Under HTML, the user is left to guess which visual elements on a given page might be user controls and which are just decorations. Therefore, for GUI-driven applications, HTML isn't that great a starting point. That's the reason why Java applets were met with such positive market hysteria when they first appeared -- they presented an opportunity to provide a real GUI.

HTML非常适合显示超文本文档,但对于显示gui却很糟糕。传统的基于web的应用程序需要花费大量的精力来将HTML硬塞到传统的表单和菜单应用程序的外观中。这从来都不是目的。在HTML(表单)中添加表单元素仅仅是创建了一种新的方法,以令人尊敬的3270终端的风格实现瘦客户机块模式应用程序。与3270一样,HTML提供批处理表单提交。基于字符的应用程序最终获得了高效的用户导航系统,但当GUI应用程序出现时,这一切都丢失了。随后,GUI应用程序使用鼠标和小部件反馈,重新添加了自己的导航结构。当HTML表单出现时,它们复制了块模式终端的设计,但没有严格的导航,也没有使用适当的GUI对等物替换它。在HTML下,用户可以猜测给定页面上的哪些视觉元素可能是用户控件,哪些只是修饰。因此,对于gui驱动的应用程序来说,HTML并不是一个很好的起点。这就是为什么Java applet第一次出现时,会遇到如此积极的市场*——它们提供了一个提供真正GUI的机会。