views:

616

answers:

6

I recently used a Java Web Start application. I launched it from my web browser using an embedded jnlp link in the page I was viewing. 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? 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?

I know that in some corporate environments, e.g 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" (i.e. no security concerns), download speeds are fast (load time is quick) and developers know Java (in the numbers they know html/js/php)).

+5  A: 

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.

Also a lot of things can go wrong with 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. 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.

Jens Schauder
I see what you mean about "starting", but given that we assumed that download speeds were fast, how is this any different at all than "starting" a webpage by "clicking" on a link? It's the same thing, surely, i.e. a link on a page.
Joel
Unless there's been an upgrade, it starts fast the second time due to caching.
Brian Knoblauch
I tried to clarify in the answer: even on a local network webstart is considerably slower then a typical web app
Jens Schauder
What's a typical webapp? I'm not talking about replicating the funcitonality of a simple webpage but rather an entire application. Once your java app has loaded the cost of going from "feature" to "feature" is much less than the equivalent if it had been created using a series of webpages.
Joel
True, with equal amount of features Webstart is: much slower on first start,probably slower on following start ups, easier to develop and debug, faster at runtime. But the question wasn't about pro and cons of webstart but about the cons (real or conceived)
Jens Schauder
Web Start should be able to start the local copy "instantly" and then say "hey there is an update, want to download it?". If the user accepts then the user can keep working and when the whole set of new jars havebeen downloaded the next time the application starts the new jars are used.
Thorbjørn Ravn Andersen
@Brian Knoblauch, "fast" is relative. It is not fast enough that Sun doesn't need a splash screen...
Thorbjørn Ravn Andersen
+3  A: 

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!

Brian Knoblauch
+5  A: 

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. Everyone has a browser. Not everyone has a JVM.

Michael Borgwardt
but presumably the hurdle of installing a jre can be made as painless as that of installing flash or any other browser plugin?
Joel
The JRE is still a lot bigger than those (Java6u10 introduced measures to alleviate this), and it doesn't come preinstalled with Windows (which I believe Flash does).
Michael Borgwardt
Flash definitively got the "launch instantly" right.
Thorbjørn Ravn Andersen
+1. This is related to my question: http://stackoverflow.com/questions/3380184/combination-of-launch4j-and-java-web-start
finnw
+1  A: 

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 default browser's proxy settings or override settings. In other words, infrastructure teams are able to customize the Windows or OS installation images to have JVM pre-installed with enterprise proxy settings. So I believe this is not an issue at all.

Java Web Start actually caches all apps with customizable settings in Java Control Panel. 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. 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 portal itself does not anticipate what kinds of portlets are built and deployed on specific page. Therefore, downloading a single portal page could consume up to MBs and complete a page in more than 5 seconds; this is only one page and caching helps up to 30% but there are still lots of HTML/Javascript/CSS components are required to download every time. With this, I am sure Java Web Start is an advantage here.

Java Web Start does not download again if it is cached as long as the server copy is NOT upgraded. Therefore, if, e.g. 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. Even with the help of Ajax, it doesn't eliminate full page download entirely. Besides, a lot of companies consider Ajax to be immature and unsecured still. That is why Ajax is a hot topic in the circles of developers but not within enterprise software yet. With that in mind, JWS apps definitely have more advantages such as JWS apps are deployed and executed in sandboxes, signed, and much more interactive GUI.

Other advantages are 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).

After all these, I haven't touched the question yet, why JWS is not so famous?

My opinion is that it is the same as Brian Knoblauch's comment, it's without awareness.

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.

Take a look at Citrix. I think Citrix is actually a great idea. Citrix allows you to build your own app farms behind the scene. 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. Enterprises are still using it. However, I think JWS is even better than 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. This saves a company a lot of money!!! With JWS, development team can still build business logic and data on server side. 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.

Another example of why JWS is an amazing idea is Blackberry MDS. Blackberry apps are actually Java apps translated from Javascript. With BB's MDS studio, you use the GUI tool to build BB app GUI, coding GUI logic in Javascript. Then apps are then translated and deployed on BES server. Then BES server will distribute these apps to BB. On each BB, it runs a thin Java App with GUI rendering and networking capability only. Whenever the app requires data, it communicates with BES then through web services to consume services from other servers. Isn't this just JWS BB version? It's been extremely successful.

Finally I think JWS is not popular is also about how Sun advertise it. BB never advertises how good their BB Java apps are, they believe clients won't even care what is it. BB advertises the benefits of using MDS to develop apps: Fast, Cost Saving, Business Return.

Just my, a bit long, 2 cents... :)

A: 

"Webstart is a bad choice for a platform to build applications. If you want the ease of java and cool effects that you can generate in webstart, then use silverlight. A platform independent flex can also be used for this purpose."

Biased answer.

Webstart makes things so much better. Java on client and on the server.

Vin
Silverlight and flex does not work well on non-Windows platforms.
Thorbjørn Ravn Andersen
A: 

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.

Thorbjørn Ravn Andersen
That would be a good option to give to the person deploying it. I wouldn't make it totally an end-user decision though. The developer would have to turn the option on to allow the use that choice. In my particular environment, we need to force (no user choice) upgrades at start time.
Brian Knoblauch
Java Web Start does have this capability. Put `<update check="background" policy="prompt-update">` just before your `<resources>` section.
finnw
Sounds like some of the new functionality introduced with the Java 6 revision. Does this work for the main jar, too.
Thorbjørn Ravn Andersen