J1 Session-Blog: Ajax vs. JavaFX Technology
![]() |
First note that the speakers Ben Galbraith and Don Almaer are co-founders of ajaxian.com, which is clearly an AJAX-shop. They claim that Web technologies and Java went stagnent in the UI space. Ajax and JavaFX have the characteristics of a renaissance. They structure the talk in the form of a “discussion” or a series of arguments, where one supposedly pits the advantages of said technology against the other.
- Argument #1: Java performs way faster than JavaScript; on the other hand JavaScript is getting faster all the time (V8 team at Google); plus apps like Google wave demonstrate that performance is good enough.
- Argument #2: Responsiveness improved by worker-threads in a Java GUI. Yet using “web workers” we can overcome the limitation of JavaScript to a single thread. Demo of Pictastic proves the point. Having said that, web workers are still 10 times slower than Java; plus the API is extremely limited. In “web worker”, worker threads don’t share state, which is way safer than the totally flexible Java approach.
- Argument #3: GC way more advanced in Java. On the other hand, incremental GC in Mozilla is improving all the time. A lousy fact of the JVN is having to determine how much memory the app requires (or how much is available) wherever the app is deployed.
- Argument #4: Graphical capabilities of Java surpass what web apps can do. But performance of Bubblemark benchmark app shows that Google chrome achieves 100 frames per second. By comparison JavaFX achieves 24 FPS. With vector graphics Chrome is back down to 30 FPS. What the speakers don’t consider is that JavaFX is a very new and to-date under-optimised technology.
- Argument #5: An Ajax 3D demo “metatunnel” is pretty impressive. Most browsers, apparently, are offering 3D extensions. It’s still at the experimental stage, however. JavaFX, on the other hand, has nothing to show in 3D.
- Argument #6: Java is weak on fonts. The speakers claim that can’t use native fonts in Java (is this true? I seem to remember supplying Java with some additional fonts some years back.) Control over fonts in the Ajax world is even more limited, however.
- Argument #7: JavaFX provides “amazing” video support. Counter argument: Flash plugin us ubiquitous and surpasses JavaFX in terms of maturity. Open Web Video offers sophisticated video functions.
- Argument #8: Binding in JavaFX is compact and elegant. Web toolkits are very clumsy by comparison. The speakers quickly mention Mixins, Animation and Effects. All of this is way easier in JavaFX…
- Argument #9: Legitimate critisisms are raised about JavaFX syntax. Speakers suggest that JavaScript is actually easier and closer to Java than JavaFX Script. And, of course, JavaFX totally lacks widgets like table/tree. Web toolkits even provide some very cool layout management and tools for constructing GUIs.
- Argument #10: Tooling superior in the Java world.
- Argument #11: Deployment. Web wins here, obviously, except for significant browser incompatibilities. Applets, Mac etc. are lousy too, however.
Conclusion: A pretty damning result for JavaFX, which is for the most part justified (at least today.) What the speakers fail to do, however, is talk more fairly about the significant problems faced by AJAX developers on a daily basis.












Bruno said,
June 4, 2009 @ 2:32 am
I also attended this talk and I think the comparison was pretty lame. How can you pick two dyed-in-the-wool AJAX-guys pick for this talk. As an example, they never mentioned the programming model and how heterogeneous AJAX is compared to Java and JavaFX. Furthermore, Ben Galbraith who stood up for AJAX was way more eloquent than Don Almaer.
Apart from that, I learned that Lars Bak is now at Google working on the JavaScript engine for Chrome. Lars started improving the Smalltalk VM but switched to Java as it became popular and his company (Anamorphic I believe) was later taken over by Sun. The outcome was the Hotspot VM and maybe we will experience similar improvements for JavaScript.
August Lammersdorf said,
June 4, 2009 @ 9:24 am
@Argument #5 –> JavaFX provides comprehensive 3D graphics capabilities powered by Java 3D. See sample programs at http://www.interactivemesh.org/testspace/j3dmeetsjfx.html
Mike said,
June 4, 2009 @ 3:33 pm
To clarify: JavaFX provides no direct API support for 3D. It is nevertheless possible to invoke Java3D API from JavaFX, which is what the samples do (although unfortunately I haven\\\’t seen them running because they all bomb on my Mac.) However, I\\\’ve been reliably informed that 3D API is planned for FX… just don\\\’t know when.
TWAIN lover said,
September 25, 2009 @ 6:32 am
Thanks for sharing.