您更喜欢哪一个:Java Web Start 还是 Java Applet?
作为程序员和最终用户,您认为哪一个更好,为什么?
Which do you think is better as a programmer, and as a end user, and why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
小程序通常很慢,很糟糕,在浏览器中不合适,无法打印,让其他一切都感觉很慢......我只是讨厌当我去某个地方而小程序开始加载时。 小程序是一个巨大的失败,幸运的是正在慢慢消亡。
Web Start 非常适合制作为桌面应用程序的应用程序,并解决了部署问题(集中部署)。 应用程序被下载并在浏览器外部的 JVM 中执行。 它们可以链接到桌面、离线启动...最后但并非最不重要的一点是,您选择是否使用 Web Start 应用程序。
小程序:0 - Web Start:1
编辑:我使第一句话不太通用。 小程序的实现已经成功,这是毫无疑问的。 我只是对全球有负面的看法,因为我看到的错误的小程序或用法比好的小程序或用法更多。
Applets are usually slow, horrible, inappropriate in a browser, can't be printed, make everything else feel slow... I just hate when I go somewhere and an applet starts loading. Applets are a big failure and are fortunately dying slowly.
Web Start is nice for applications that are made to be desktop applications and solves the deployment issue (centralized deployment). Applications are downloaded to be executed in a JVM outside the browser. They can be linked to the desktop, started offline... Last but not least, you choose to use a Web Start application or not.
Applets : 0 - Web Start : 1
EDIT: I made the first sentence a little bit less generic. There are successful implementation of applets, no doubts about it. I just have a negative global perception because I've seen more wrong applets or usages than good ones.
根据我的经验,客户不希望他们的程序在浏览器中运行。 但是,从 Java6 update 10 开始,小程序可以在浏览器外部的单独进程中运行。 这个吸引人的功能可能会填补小程序和 JWS 之间的空白。
From my experience, customers don't want their programs to be running inside a browser. But, from Java6 update 10, applets can be running outside of the browser in a separate process. This appealing feature might fill the gap between the applet and JWS.
Applet 遇到的问题是 JVM 版本。 虽然理论上 JVM 是向后兼容的,但实际上并非如此,我记得当时我不得不不断地调整系统 JVM 来运行两个不同的小程序(两者都是由同一供应商生产的 - 如果不是同一程序员的话)。
理论上,Java Web Start 解决了这个问题,因为它允许用户指定要使用的 JVM,但我仍然遇到问题。 如果您有代理服务器 - 虽然大多数企业环境都有 - 我也遇到过各种各样的问题。
作为程序员和用户,我个人选择的是可下载的 SETUP.EXE,其中包含 JAR 和用于应用程序的 JVM 版本。 我们发现,当您以这种方式控制整个环境时,应用程序会更加可靠。 您失去了通过 Web Start 获得的轻松升级,但我认为这是值得付出的代价。
The problem you have with Applets was JVM versions. Whilst in theory the JVM is backwards compatible in practice it isn't and I remember being a position where I continually had to juggle the system JVM to run two different applets (both produced by the same vendor - if not the same programmers).
In theory Java Web Start solves this as it allows the user to specify which JVM to use but I've still have problems with this. And if you have a Proxy Server - whilst most corporate environments do - I've had all sorts of problems there too.
My personally choice as a programmer and a user is a downloadable
SETUP.EXE
which contains JARs and a version of the JVM to be used for the application. We found when you control the whole environment in this way the application is more reliable. You lose the easy upgrades you get with Web Start but I think this is a price worth paying.我认为两者都有自己的位置。 多年来,我们部署了多个重要的小程序,取得了巨大成功,唯一的兼容性问题是由于事件模型在 Java 1 到 Java 2 之间的转换而产生的。它们一直是向客户提供服务的高效方式,并且部署起来比 WebStart 简单得多。
另一方面,WebStart 在部署/更新注意事项和应用程序功能之间提供了很好的折衷。
我还编写了一个动态下载启动器类,它可以在启动应用程序之前从 HTTP 地址更新自身和应用程序 - 这对于将应用程序交付到桌面并保持更新非常有效。
我个人更喜欢 JVM 作为先决条件,而不是与应用程序一起安装 - 我发现我的应用程序在各种平台(Windows、OSX、Linux 和 OS/400)上从 Java 2 到 Java 6 都没有兼容性问题。
I think both have their place. We have had multiple non-trivial applets deployed with great success for years, with the only compatibility problems arising from the transition of the event model between Java 1 to Java 2. They have been a highly effective means of delivering to our customers, and are much simpler to deploy than WebStart.
On the other hand, WebStart provides a nice compromise between deployment/update considerations and application capabilities.
I have also written a dynamic-download launcher class which can update itself and the application from an HTTP address before launching the application - that has worked extremely well to deliver an application to the desktop and keep it updated.
I personally prefer the JVM be a prerequisite and not installed with the application - I have found no compatibility issues with my applications from Java 2 through Java 6, on a variety of platforms (Windows, OSX, Linux and OS/400).
作为用户,我更喜欢小程序。 普通用户使用的是Windows XP。 显然他们并不关心速度,尽管加载时间超过 30 秒可能会很烦人。
作为一名程序员,我更喜欢 Java Web Start。 它更快,在我看来更好。 我认为如果您决定使用哪个,这主要是个人选择的问题。
As a user, I prefer applets. The average user has Windows XP. Obviously they are not concerned about speed, though load times over 30 seconds may be annoying.
As a programmer, I prefer Java Web Start. It is faster and in my opinion better. I think if you are deciding which to use, it is mostly a matter of personal choice.