JavaFX, startup time, and security dialogs
Sun released JavaFX yesterday, which has a lot of great technology in it, but unfortunately the user experience is tragically poor. From my own experience, the first time I loaded a JavaFX applet I was presented with four dialogs: one security dialog for the JavaFX runtime, another security dialog for the JavaFX samples, a JavaScript warning dialog, and a JavaFX license agreement acceptance dialog. The applet took over two minutes to load.
A security dialog appears every time the SimpleVideoPlayer example is shown (if it manages to start at all). Imagine if YouTube required the user to navigate a security dialog every time a video was played.
It’s a shame, and it represents a lack of vision in the direction of JavaFX.
The overall vision of JavaFX should have included three items: A great animation framework, fast startup time, and frictionless loading – AKA no security dialogs.
Sun created a pretty good animation framework, with a new scene graph and the declarative JavaFX Script. Unfortunately not all effects are truly animatable. The effects example crawls on my machine. Part of the problem is the algorithm choice: the blur example uses a nice-looking, but CPU intensive Guassian blur instead of a fast, but lower quality, box blur. Plus, their effects framework requires native code – one of the reasons for the security dialogs. There is no good reason why a software-based effects cannot be developed optimized for HotSpot.
Startup time is improved with the new, Java 6u10 quick starter feature. However, the quick starter is moot because the JavaFX runtime libraries are so large. People are reporting – including myself – that many of the applets take several minutes to load – even the second time you load them. Based on posts from a Sun employee at the javagaming.org message board, this is a mistake that will be fixed in the next version. However, the problem should have never existed in the first place. Fast startup time should have been priority number one, and no code modifications should have been allowed that broke this feature.
Finally, it appears that most, or all, of the JavaFX applet examples require the user to naviagate a security dialog. On my Mac, I had to accept a security dialog just for JavaFX to compute prime numbers. (The demo was supposed to show how much faster JavaFX is compared to JavaScript, but ironically, if you count the loading time, the JavaScript version computes faster.) There is probably a very good technical reason for showing the security dialogs, but to a non-technical general audience, this doesn’t make any sense. Why should I have to navigate a dialog to see a blur effect or watch a video? Plus, because some applets perform additional loading after the dialog is accepted, the dialog appears in the middle of the entire loading sequence. For large web apps, I typically start loading the app in one browser tab while reading in another tab. If a dialog appears in the middle of the loading sequence, that means when I return to the app’s browser tab, I have to accept the dialog and wait again. Finally, security dialogs are an instant turnoff to many users: I don’t have hard statistics, but anecdotal evidence suggests some users never accept the scary, confusing dialogs.
There is a lot of good technology in JavaFX, and it’s a shame that the user experience is what it is. However, I don’t think all is lost. I believe the underlying technology truly doesn’t matter as long as there is a positive user experience. Idealistically, developers should be able to use the tools they want, not the tools they are forced to use. And I believe a positive user experience can be created in Java – that’s why I developed PulpCore. Sun has incredibly smart engineers, and they can fix the problem if they are intrinsically motivated to do so. Here what they should so:
- Make sure everything can run without security dialogs. Both the video decoding and the effects framework should work entirely in software. HotSpot is entirely capable as is, plus GPU rendering won’t work on all machines anyway.
- Dramatically decrease the startup time. As mentioned before, it appears the Sun engineers are already working to fix this.
- Every effect should be animatable at 30 frames per second. Downgrade some of the effects if you have to (i.e. use box blur instead of Gaussian blur)
There’s a few other minor complaints I have of JavaFX (it appears Nodes can’t have their own BlendMode, dirty rectangle calculation is slow, and if I’m not mistaken it appears Nodes can’t display at fractional locations.) But these are small issues. The big picture is having a positive user experience, and although JavaFX doesn’t deliver that today, if it is moved in the right direction, it can.
P.S. This blog was hacked several months ago, and I didn’t even notice. The content of one post completely disappeared. Yes, I should update more often.

December 7th, 2008 at 11:57 pm
Ya, me too don’t like the Java fx startup … its too boring. I use Opera my favourite. I opened a javafx example waited for fewer moments. Nothing came. Then I closed my browser and started to work in Adobe Flex – my favourite RIA technology. suddenly, I got a security warning from Java start to open the example. I click OK ..But it didn’t open. I dono why it doesnt open even it run too late. If youtube started using Javafx – within 1 year the youtube become history. ha ha ha .. Every technology has some drawback. but these startup in RIA technology is the point to be considered first as a user point of view . may be it fullfil the developers thurst, but not the users needs . Let us wait for javafx age 2 . if it wins RIA battle , its happy news for everyone.
From my point of view -
RIA = user experience >>> Developers view
December 8th, 2008 at 3:05 am
#1 The security dialogs are useless if the underlying sandbox doesn’t do enough to protect users. Just because the user clicked OK doesn’t mean they consent to getting their equipment hacked. Much has been written about the insecurities of Flex’s cookies, but in the end, they have a better sandbox profile than java.
#2 has been much better since update 10. They need to do something about the preloader image.
Agreed about #3, I found drop shadow effect for larger sizes (400×300px) simply very poor despite turning effect caching on.
January 6th, 2009 at 3:41 am
I agree totally with your post.
javaFx is a cool language. Productive, ect…
But it is beyond my understanding why Sun team did not just fix the “long start up” issue and the bloody idiotic “security warning”.
I just hope they just fix those the fastest as they can because today javaFx user experience can just not compare to Flash user experience. Hence I can not convince my development team.
Hope Sun is working overnight to fix #1 and #2 …. but I am not even sure of it…..(took them five years to fix applets issues ).
Thierry
April 30th, 2009 at 2:45 am
Found this post looking for info on JavaFX – does anybody know if these issues are fixed with the 1.1 release? I’m considering looking at this in my department in work, but not if it’s still problem ridden!
February 14th, 2010 at 9:34 pm
[...] due to all the AJAX and Adobe Flash craze. One of the main complaints about Java Applets was its start-up time. In my opinion ‘Perception‘ is key, when it comes to user experience. It is often said [...]