简体   繁体   English

Java Web Start - 流行度

[英]Java Web Start - Popularity

I recently used a Java Web Start application. 我最近使用了Java Web Start应用程序。 I launched it from my web browser using an embedded jnlp link in the page I was viewing. 我使用我正在查看的页面中的嵌入式jnlp链接从我的Web浏览器启动它。 The application was downloaded, launched and worked just fine. 该应用程序已下载,启动并正常工作。 It had access to my local file-system and remembered my preferences between restarting it. 它可以访问我的本地文件系统,并在重新启动它之间记住我的偏好。

What I want to know is why are Java Web Start applications not a more popular delivery format for complex applications on the web? 我想知道的是,为什么Java Web Start应用程序不是Web上复杂应用程序的更流行的交付格式? Why do developers often spend considerable time & energy replicating desktop functionality in html/javascript when the power of a desktop application could be delivered more easily using Java & Java Web Start? 为什么开发人员经常花费大量时间和精力在html / javascript中复制桌面功能,而使用Java和Java Web Start可以更轻松地提供桌面应用程序的强大功能?

I know that in some corporate environments, eg banking, they are relatively popular ways of delivering complex trading applications to clients, but why are they not pervasive across the web as a whole? 我知道在某些企业环境中,例如银行业,它们是向客户提供复杂交易应用程序的相对流行的方式,但为什么它们不能在整个网络上普及?

(For the sake of discussion let's assume a world where: download sources are "trusted" & applications are "signed" (ie no security concerns), download speeds are fast (load time is quick) and developers know Java (in the numbers they know html/js/php)). (为了便于讨论,让我们假设一个世界:下载源是“可信的”和应用程序是“签名”(即没有安全问题),下载速度快(加载时间很快),开发人员知道Java(数量上他们知道html / js / php))。

I think the reason is not security nor startup time of the app. 我认为原因不是应用程序的安全性或启动时间。 Let's understand what's behind the scene before we find out the root cause. 在找出根本原因之前,让我们了解幕后的情况。

Java Control Panel has settings that allow users to use the default browser's proxy settings or to override them. Java控制面板具有允许用户使用默认浏览器的代理设置或覆盖它们的设置。 In other words, infrastructure teams are able to customize the Windows or OS installation images to have JVM pre-installed with enterprise proxy settings. 换句话说,基础架构团队能够自定义Windows或OS安装映像,以便使用企业代理设置预安装JVM。 So I believe this is not an issue at all. 所以我认为这根本不是问题。

Java Web Start actually caches all apps with customizable settings in Java Control Panel. Java Web Start实际上使用Java控制面板中的可自定义设置缓存所有应用程序。 Once the app is cached, the app is "installed" just like other apps. 应用程序缓存后,应用程序就像其他应用程序一样“安装”。 Although first time execution may be slow, the second time will be fast due to JVM's smart memory allocation technique. 虽然第一次执行可能很慢,但由于JVM的智能内存分配技术,第二次执行速度很快。 So start up time could be an issue but a lot of web sites (even enterprise internal) are now migrated to portal. 因此,启动时间可能是一个问题,但很多网站(甚至企业内部)现在都已迁移到门户网站。 A web portal normally contains lots of unused libraries for development purposes due to the fact that the portal itself does not anticipate what kinds of portlets are built and deployed on a specific page. Web门户通常包含许多未使用的库以用于开发目的,因为门户本身并不预期在特定页面上构建和部署哪种类型的portlet。 Therefore, downloading a single portal page could consume up to MBs and complete a page in more than 5 seconds; 因此,下载单个门户页面最多可能消耗MB并在5秒内完成一个页面; this is only one page and caching helps up to 30% but there are still lots of HTML/Javascript/CSS components required to download every time. 这只是一个页面,缓存有助于高达30%,但每次下载仍然需要大量的HTML / Javascript / CSS组件。 With this, I am sure Java Web Start is an advantage here. 有了这个,我相信Java Web Start在这里是一个优势。

Java Web Start does not download again if it is cached as long as the server copy is NOT upgraded. 只要未升级服务器副本,Java Web Start在缓存时不会再次下载。 Therefore, if, eg a project management software like MS Project, is completed using SmartClient (similar to JWS), the information exchange between the client and server would be purely data without presentation like browser's full page refresh. 因此,如果使用SmartClient(类似于JWS)完成了像MS Project这样的项目管理软件,则客户端和服务器之间的信息交换将纯粹是数据,而不会像浏览器的整页刷新那样呈现。 Even with the help of Ajax, it doesn't eliminate full page download entirely. 即使在Ajax的帮助下,它也不能完全消除整页下载。 Besides, a lot of companies consider Ajax to be immature and unsecured still. 此外,很多公司认为Ajax还不成熟且不安全。 That is why Ajax is a hot topic in the circles of developers but not within enterprise software yet. 这就是为什么Ajax是开发人员圈子中的热门话题,而不是企业软件中的热门话题。 With that in mind, JWS apps definitely have more advantages such as how JWS apps are deployed and executed in sandboxes, signed, and have much more interactive GUI. 考虑到这一点,JWS应用程序肯定具有更多优势,例如如何在沙箱中部署和执行JWS应用程序,签名以及具有更多交互式GUI。

Other advantages include faster development (easier to debug in code and performance), responsive user interface (does not require Comet Servers to provide PUSH functionality), and executing faster (for sure because client computers renders GUI without translation like HTML/Javascript/CSS, and less data processing). 其他优点包括更快的开发(更容易在代码和性能中调试),响应式用户界面(不需要Comet服务器提供PUSH功能),以及执行速度更快(当然,因为客户端计算机渲染GUI而无需像HTML / Javascript / CSS那样进行转换,并减少数据处理)。

After all these, I haven't touched the question yet, why JWS is not so famous? 在所有这些之后,我还没有触及这个问题,为什么JWS不那么出名?

My opinion is that it is the same as Brian Knoblauch's comment, it's without awareness. 我的观点是,它与Brian Knoblauch的评论相同,没有意识。

IT folks are too attracted by the hype of Web Technologies, Ajax PUSH, GWT, and all those buzz words make them bias towards the fun of using different technologies or to resolve technical challenges instead of what's really working for the clients. IT人员被Web技术,Ajax PUSH,GWT的炒作所吸引,所有这些流行语使他们偏向于使用不同技术或解决技术挑战而不是真正为客户工作的乐趣。

Take a look at Citrix. 看看Citrix。 I think Citrix is actually a great idea. 我认为思杰实际上是个好主意。 Citrix allows you to build your own app farms behind the scene. Citrix允许您在场景后构建自己的应用程序场。 There are tons of upgrade and implementation strategies you can go for without impact to client experience. 您可以使用大量的升级和实施策略,而不会影响客户体验。 Citrix deployment is extremely easy, stable and secure. Citrix部署非常简单,稳定且安全。 Enterprises are still using it. 企业仍在使用它。 However, I think JWS is even better than Citrix. 但是,我认为JWS甚至比Citrix更好。 The idea of JWS is to run apps on client machines instead of hosting tons of server farms where client machines are capable of running these apps themselves. JWS的想法是在客户端计算机上运行应用程序,而不是托管大量服务器场,其中客户端计算机能够自己运行这些应用程序。 This saves a company a lot of money!!! 这为公司节省了很多钱! With JWS, development team can still build business logic and data on server side. 使用JWS,开发团队仍然可以在服务器端构建业务逻辑和数据。 However, without the web processing unit and let the client computers do the rendering process, it greatly reduces the amount of network consumption and server processing power. 但是,如果没有Web处理单元并让客户端计算机执行渲染过程,则会大大减少网络消耗量和服务器处理能力。

Another example of why JWS is an amazing idea is Blackberry MDS. 另一个为什么JWS是一个惊人想法的例子是Blackberry MDS。 Blackberry apps are actually Java apps translated from Javascript. Blackberry应用程序实际上是从Javascript翻译的Java应用程序。 With BB's MDS studio, you use the GUI tool to build BB app GUI, coding GUI logic in Javascript. 使用BB的MDS工作室,您可以使用GUI工具构建BB应用程序GUI,在Javascript中编写GUI逻辑。 Then apps are then translated and deployed on a BES server. 然后,应用程序将在BES服务器上进行翻译和部署。 Then the BES server will distribute these apps to BB. 然后BES服务器将这些应用程序分发到BB。 On each BB, it runs a thin Java App with GUI rendering and networking capability only. 在每个BB上,它运行仅具有GUI呈现和网络功能的瘦Java应用程序。 Whenever the app requires data, it communicates with the BES through web services to consume services from other servers. 每当应用程序需要数据时,它通过Web服务与BES通信以使用来自其他服务器的服务。 Isn't this just JWS BB version? 这不仅仅是JWS BB版吗? It's been extremely successful. 它非常成功。

Finally I think JWS is not popular because of how Sun advertises it. 最后,我认为JWS并不受欢迎,因为Sun如何做广告。 BB never advertises how good their BB Java apps are, they believe clients won't even care what is it. BB从不宣传他们的BB Java应用程序有多好,他们认为客户甚至不关心它是什么。 BB advertises the benefits of using MDS to develop apps: Fast, Cost Saving, Business Return. BB宣传使用MDS开发应用程序的好处:快速,节省成本,业务回报。

Just my, a bit long, 2 cents... :) 只是我的,有点长,2美分...... :)

A major roadblock for Java Webstart is probably that you still need to have a JVM installed before it can even attempt to download and start your application. Java Webstart的一个主要障碍可能是您仍然需要安装JVM才能尝试下载和启动应用程序。 Everyone has a browser. 每个人都有一个浏览器。 Not everyone has a JVM. 不是每个人都有JVM。

Edit: I've since acquired some hands-on webstart experience and can now add these two points: 编辑:我已经获得了一些动手的webstart经验,现在可以添加以下两点:

  • The Deployment Toolkit script and the modularized JVM released somewhere around Java 1.6u10 make the JVM requirement less problematic since it can automatically download a JVM and the API core and start the program wile downloading the rest. Deployment Toolkit脚本和在Java 1.6u10附近发布的模块化JVM使得JVM要求不那么成问题,因为它可以自动下载JVM和API核心并启动程序,下载其余部分。
  • Web Start is seriously buggy. Web Start严重错误。 Even among the Java 1.6 releases there was one which downloaded the entire app every time, and another which downloaded it and then failed with an obscure error message. 即使在Java 1.6版本中,也有一个每次下载整个应用程序,另一个下载它然后失败并出现一个模糊的错误消息。 All in all, I cannot really recommend relying on such a fragile system. 总而言之,我真的不建议依赖这样一个脆弱的系统。

I think it's mostly due to a lack of awareness. 我认为这主要是由于缺乏意识。 It works very well. 它工作得很好。 Quite seamless. 相当无缝。 App only downloads if it's the first time, there's been an upgrade, or if the end-user has cleared the cache. 应用程序仅在第一次下载,升级或最终用户已清除缓存时才下载。 Great way to deploy full-blown desktop apps that user won't have to worry about manually upgrading! 部署完整桌面应用程序的绝佳方式,用户无需担心手动升级!

The problem with Webstart is, that you actually have to 'start' something which isn't at all that fast even with a fast connection, while with a webapp you enter the URL and the app is there. Webstart的问题在于,即使使用快速连接,您实际上也必须“启动”一些不快的东西,而使用Web应用程序,您输入URL并且应用程序就在那里。

Also a lot of things can go wrong with webstart. webstart也会出现很多问题。 Maybe the intended user doesn't have the privileges needed, or the proxy of webstart is configured wrong, or something went wrong with jre dependencies or there is simply no java installed in the first place. 也许目标用户没有所需的权限,或者webstart的代理配置错误,或者jre依赖项出现问题,或者首先没有安装java。 So for the average john doe in the internet it is not at all pleasent. 所以对于互联网上的普通约翰·多伊来说,它根本不是那么令人愉快。

In controlled environments like a company it is a good and easy solution in many cases. 在像公司这样的受控环境中,在许多情况下,它是一种简单易用的解决方案。

I've worked on a JWS-deployed application for a few years over a user base of a few thousands and its automatic upgrades are actually a huge pain. 我已经在几千年的用户群上使用JWS部署的应用程序几年,它的自动升级实际上是一个巨大的痛苦。

On every update for some reason dozens of users get "stuck in the middle". 由于某种原因每次更新都会有数十名用户“陷入困境”。 All you get is the "class not found" exception (if you're lucky), or uninformative "unable to launch" from JWS before it even gets to your code. 你得到的只是“找不到类”的例外(如果你很幸运的话),或者在它到达你的代码之前从JWS无法提供信息“无法启动”。 Looks like the update is half-downloaded. 看起来更新是半下载的。 Or, in other words, it does not download and apply the update atomically AND has poor caching so that relaunching the app from the same URL does not fix anything. 或者,换句话说,它不会以原子方式下载和应用更新并且缓存较差,因此从同一URL重新启动应用程序不能解决任何问题。

There's no way to resolve it other than clearing JWS cache or providing a different URL (eg append ?dummyparam=jwssucks at the end). 除了清除JWS缓存或提供不同的URL(例如,在末尾附加?dummyparam=jwssucks?dummyparam=jwssucks ,没有办法解决它。 Even I as a developer hit it sometimes and don't see a way around. 即使我作为一名开发人员有时也会遇到它并且看不到任何方法。

When it works, it works. 当它工作时,它的工作原理。 But too often it doesn't, and then it's a huge pain for you and your helpdesk. 但它经常没有,然后对你和你的服务台来说是一个巨大的痛苦。 I would not recommend it for enterprise or mission-critical use. 我不建议将它用于企业或任务关键型使用。

There is a very big issue namely that it doesn't allow for "start the program instantly and THEN check for and download any updates in the background" deployments, which is what the defacto behaviour of applications are converging to. 有一个非常大的问题,即它不允许“立即启动程序,然后检查并下载后台的任何更新”部署,这就是应用程序的事实行为正在融合的内容。

I consider this personally so big an annoyance that we are actively looking for another technology which provides that. 我个人认为这非常令人烦恼,我们正在积极寻找能够提供这种技术的另一项技术。

Java Web Start is kind a successor of Java Applets, and applets got burned around the new millenium. Java Web Start是Java Applets的继承者,applet在新的千禧年被烧毁。 But, I still think Java Applets are way better than GWT or Javascript hell. 但是,我仍然认为Java Applets比GWT或Javascript地狱更好。

Java Web Start vs Embedded Java Applet Java Web Start与嵌入式Java Applet

From these posts it looks like when using Web start, it is important to make a good care about the server. 从这些帖子看起来,当使用Web start时,重要的是要好好关心服务器。 The "huge pain" of downloading application on every startup may be caused by incorrect time stamp delivered from the server. 在每次启动时下载应用程序的“巨大痛苦”可能是由服务器提供的错误时间戳引起的。 Here not the application but the server must be configured to use caching properly and not just to disable it. 这里不是应用程序,而是服务器必须配置为正确使用缓存而不仅仅是禁用它。 About buggy start, I am not that much sure, but it seems to me that this also may be caused by unreliable connection. 关于越野车开始,我不是很确定,但在我看来,这也可能是由不可靠的连接引起的。

Important advantage of Web start is that it works nicely with OpenJDK under Linux. Web start的重要优势在于它可以很好地与Linux下的OpenJDK配合使用。 Clients of some happy developers use Windows only but my clients do not. 一些开心的开发人员的客户只使用Windows,但我的客户不使用。

HTML and JavaScript, mentioned in the initial question, are lighter approaches that work fine with smaller tasks like animated buttons or even interactive tables. 初始问题中提到的HTML和JavaScript是较轻的方法,可以在较小的任务(如动画按钮甚至交互式表)中正常工作。 Java niche seems around much more complex tasks. Java利基似乎围绕着更为复杂的任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM