tags:

views:

446

answers:

3

When I tried Javafx, the resulting application was extremely slow.

My conclusion is that Javafx has no future and that sun of oracle should dump it. I am thinking this way because I have used openlaszlo frequently and performance of javafx vs openlaszlo swf on the same machine is poor and beaten flat by openlaszlo swf.

I also observe that javafx performance is unable to match silverlight. For a complete Javafx application to run smoothly, I would need a 4GB quadcore game machine. There's no way to run a non-trivial javafx app on a $300 10inch notebook or a palmtop.

The reason for the poor performance, I feel, is its dependence on the jvm. I am thinking that sun of oracle should liberate jvm to allow swing/graphics components to optimise per hardware platform. I am wishing that oracle would force its hand to make the jvm have hardware specific modules for run-time to choose, while maintaining hardware neutrality on javafx (as well as the java language).

What is your take on javafx. Especially with the advent of uibinder and html5, is its future doomed? Who is using it, anyway, compared to other display technologies? Should I bother to invest time to master it? Is there any good reason to consider using it?

+1  A: 

JavaFX is definetely suffering, especially because of the cutting edge competition given by Silverlight and Flex.

JavaFX people made some mistakes. When they released thier API initially, lot of people got enthuthiastic and indulged, and later they changed the API considerably to the extent that old examples dont even compile.

As for performance, Javafx is known to be slow, but since Javafx1.2 they have made speed up the performance upto 3X. But again 1.2 is no more compatible with 1.1

Sun put a lot of stake on jfx, they even minimized work on Swing to zero. But somewhere in the line, they simply couldnt make it up to Silverlight and Flex.

Now acceptance of JavaFx will be even rarer, as more and more people embrace Flex/Silverlight for RIA.

Suraj Chandran
+5  A: 

JavaFX is a new technology with lots of optimizations to surely follow.

I disagree about your thinking the JVM is at fault. Modern JVMs are quite fast and Java code can execute at near native speeds in many cases these days. Java is well accepted as a first-class language and platform. It'll be around for a very long time. Lots of other languages target the JVM. Most new, popular scripting languages have JVM implementation. Some even target only the JVM. Perl6 targets a VM too. I believe VMs are the way to go.

I've played around quite a lot with JavaFX and while i agree the UI seems sluggish at times, it's JavaFX, not the JVM, because the same UI in Swing doesn't misbehave similarly. I believe the next major release of JavaFX is targeting improved performance (as all new releases often do).

I find the language itself quite nice, thorough and well thought-out with only a few rough edges remaining. I'd like to see it become the language for declarative UIs for Java-centric applications. I just am not confident that's the direction the developers are taking it.

Overall, i like the choice. I think they should keep it moving forward. It brings some nice features and i believe its tight integration with Java is a plus for the Java community.

As with every language/platform development choice, choose the right one for the task at hand. In other words, you don't write an application based on the platform you want to write it in. If you want native UIs, maybe Java isn't the platform to use for the project. Would i consider using JavaFX for a broad, rich browser experience. No! Flash still rules until HTML5 is more widely deployed. Would i consider using JavaFX in a Microsoft shop? Seems silly. If i'm heavily invested in Java and want a rich UI, quickly, i think JavaFX might be the way to go. It might not yet be the right choice for a robust Java UI but i'm hopeful it will in the future.

nicerobot
"Profiling JavaFX Applications in NetBeans IDE" http://javafx.com/docs/articles/performance/profiling.jsp
nicerobot
A: 

I think JavaFX's major weakness is it's lack of good development tools, sample apps, tutorials and good out-of-the-box tools.

Truth is, early adopters of any technologies are usually one-man teams, usually hobbyists. This means most early adopters do not get paid for developing with a technology. This means, motivation is low and is mainly driven by results. If you have a technology like JavaFX which is difficult and time-consuming from thought to finished product, it makes it very difficult to invest more time and energy into continuing with along the same old pattern.

Motivation for me. 1. Must be easy and quick to go from idea to finished product. Highly-productive. 2. Technology must be something that will enhance my employability in the future. JavaFX just doesn't perform good in that regard. How many JavaFX jobs do you find compared to Silverlight jobs? 3. JavaFX lacks a lot of important out-of-the-box controls and that makes life even harder.

Upon careful thought, I have abandoned my JavaFX project (http://www.javafxintro.com) and begun work on a Silverlight version (http://blog.geoghana.com) and with Silverlight, things look very promising.

Nii Osei-Adjeman II