JavaFX vs. Ajax (and vs. Flex) Ben Galbraith (Mozilla) and Don Almaer (Ajaxian, Inc.) TS-5587 JavaOne 2009 Debriefing Session Sean Chung
JavaFX Scripting Language A scripting language for interactive graphics, media, and animation. Slide 1 1
Slide 2 JavaFX Scripting Language Object-oriented (of course) Expression language Declarative and Procedural Integrates with Java (can import Java classes) Compiles to byte code; runs on JVM Incorporates the concept of time Data binding Mixin classes like Java interfaces 2
Slide 3 Ajax vs. JavaFX - on Performance Java is way faster than JavaScript But JavaScript is getting faster (V8 – Google Chrome JavaScript Virtual Machine) Good enough. 3
Slide 4 Ajax vs. JavaFX - on Performance cont’d vs. Flex (ActionScript) Comparison done with Takeuchi Benchmark ( JavaWorld article http://www.javaworld.com/community/node/1268 ) “ In summary, for this benchmark, with the hotspot server vm, JavaFX script outperforms statically typed ActionScript by a factor of 12 …” 4
Slide 5 Ajax vs. JavaFX - on Responsiveness of UI JavaFX better with worker-threads Using “web workers”, single thread-ness of JavaScript can be overcome but SLOW. 5
Slide 6 Ajax vs. JavaFX - on Responsiveness of UI cont’d vs Flex Execution model of ActionScript is single-threaded BUT, underlying Flash Player uses threads, providing UI responsiveness 6
Slide 7 Ajax vs. JavaFX – Graphical capability Bubblemark animation test http://bubblemark.com 7
Slide 8 Ajax vs. JavaFX – Graphical capability cont’d SURPRISE!!! Static graphics: Chrome 100 fps vs. JavaFX 24 fps. Vector graphics: Chrome 30 fps What the speakers don’t consider is that JavaFX is a very new and to-date under-optimised technology. 8
Slide 9 Ajax vs. JavaFX – Graphical capability cont’d vs. Flex JavaScript on Firefox: 75 fps. Flex 2 on Flash Player 10: 190 fps. JavaFX 1.0: 260 fps. 9
Slide 10 Ajax vs. JavaFX – 3D graphics Ajaxian 3D Metatunnel http://ajaxian.com/archives/metatunnel-the-future-web-strikes-back Most browsers are offering 3D extensions. NO 3D support for JavaFX 10
Slide 11 Ajax vs. JavaFX – 3D graphics cont’d vs. Flex Flex 4 (Gumbo) mx.effects.FxRotate3d Lots of 3D engines / libraries out there Roxik Sharikura http://temp.roxik.com/ Jiglibflash 3D physics engine http://code.google.com/p/jiglibflash/ Etc. etc. 11
Slide 12 Ajax vs. JavaFX – Fonts Java is weak on fonts. The speakers claim that we can’t use native fonts in Java. Control over fonts in the Ajax world is even more limited, however. 12
Slide 13 Ajax vs. JavaFX – Fonts cont’d vs. Flex l@@k at www.behr.com VERY GOOD font support / control with Flex 13
Slide 14 Ajax vs. JavaFX – Video JavaFX provides “amazing” video support. Open Web Video offers sophisticated video functions – browser dependant; trouble with IE 14
Slide 15 Ajax vs. JavaFX – Video cont’d vs. Flex Flash plugin surpasses JavaFX in terms of maturity. De facto standard of the video on the web 15
Slide 16 Ajax vs. JavaFX – Language Features 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 16
Slide 17 Ajax vs. JavaFX – Language Features cont’d vs. Flex (ActionScript 3) Binding Animations, Sequences, Triggers More mature than JavaFX 17
Slide 18 Ajax vs. JavaFX – Deployment Web wins. Except for the significant browser incompatibilities Java Setup still takes too long. 18
Slide 19 Ajax vs. JavaFX – Deployment cont’d vs. Flex No browser compatibility issue, no hassle installation Adobe Flash Player Penetration – March 2009 http://www.adobe.com/products/player_census/flashplayer/version_penetration.html 19 72.0% 99.3% 98.8% Japan 75.3% 98.6% 98.9% Europe 74.5% 98.8% 99.1% US/ Canada Flash 10 Flash 9 Flash 8
Slide 20 Comparison done legitimately? How big is the intersection? Ajax – social networking, mashups, portals Flex – multimedia rich apps JavaFX – mobile? Set-top box? 20
The End 5 minutes of question time starts now!
Questions 4 minutes left!
Questions 3 minutes left!
Questions 2 minutes left!
Questions 1 minute left!
Questions 30 seconds left!
Questions TIME IS UP!

JavaFX vs AJAX vs Flex

  • 1.
    JavaFX vs. Ajax (and vs. Flex) Ben Galbraith (Mozilla) and Don Almaer (Ajaxian, Inc.) TS-5587 JavaOne 2009 Debriefing Session Sean Chung
  • 2.
    JavaFX Scripting LanguageA scripting language for interactive graphics, media, and animation. Slide 1 1
  • 3.
    Slide 2 JavaFXScripting Language Object-oriented (of course) Expression language Declarative and Procedural Integrates with Java (can import Java classes) Compiles to byte code; runs on JVM Incorporates the concept of time Data binding Mixin classes like Java interfaces 2
  • 4.
    Slide 3 Ajaxvs. JavaFX - on Performance Java is way faster than JavaScript But JavaScript is getting faster (V8 – Google Chrome JavaScript Virtual Machine) Good enough. 3
  • 5.
    Slide 4 Ajaxvs. JavaFX - on Performance cont’d vs. Flex (ActionScript) Comparison done with Takeuchi Benchmark ( JavaWorld article http://www.javaworld.com/community/node/1268 ) “ In summary, for this benchmark, with the hotspot server vm, JavaFX script outperforms statically typed ActionScript by a factor of 12 …” 4
  • 6.
    Slide 5 Ajaxvs. JavaFX - on Responsiveness of UI JavaFX better with worker-threads Using “web workers”, single thread-ness of JavaScript can be overcome but SLOW. 5
  • 7.
    Slide 6 Ajaxvs. JavaFX - on Responsiveness of UI cont’d vs Flex Execution model of ActionScript is single-threaded BUT, underlying Flash Player uses threads, providing UI responsiveness 6
  • 8.
    Slide 7 Ajaxvs. JavaFX – Graphical capability Bubblemark animation test http://bubblemark.com 7
  • 9.
    Slide 8 Ajaxvs. JavaFX – Graphical capability cont’d SURPRISE!!! Static graphics: Chrome 100 fps vs. JavaFX 24 fps. Vector graphics: Chrome 30 fps What the speakers don’t consider is that JavaFX is a very new and to-date under-optimised technology. 8
  • 10.
    Slide 9 Ajaxvs. JavaFX – Graphical capability cont’d vs. Flex JavaScript on Firefox: 75 fps. Flex 2 on Flash Player 10: 190 fps. JavaFX 1.0: 260 fps. 9
  • 11.
    Slide 10 Ajaxvs. JavaFX – 3D graphics Ajaxian 3D Metatunnel http://ajaxian.com/archives/metatunnel-the-future-web-strikes-back Most browsers are offering 3D extensions. NO 3D support for JavaFX 10
  • 12.
    Slide 11 Ajaxvs. JavaFX – 3D graphics cont’d vs. Flex Flex 4 (Gumbo) mx.effects.FxRotate3d Lots of 3D engines / libraries out there Roxik Sharikura http://temp.roxik.com/ Jiglibflash 3D physics engine http://code.google.com/p/jiglibflash/ Etc. etc. 11
  • 13.
    Slide 12 Ajaxvs. JavaFX – Fonts Java is weak on fonts. The speakers claim that we can’t use native fonts in Java. Control over fonts in the Ajax world is even more limited, however. 12
  • 14.
    Slide 13 Ajaxvs. JavaFX – Fonts cont’d vs. Flex l@@k at www.behr.com VERY GOOD font support / control with Flex 13
  • 15.
    Slide 14 Ajaxvs. JavaFX – Video JavaFX provides “amazing” video support. Open Web Video offers sophisticated video functions – browser dependant; trouble with IE 14
  • 16.
    Slide 15 Ajaxvs. JavaFX – Video cont’d vs. Flex Flash plugin surpasses JavaFX in terms of maturity. De facto standard of the video on the web 15
  • 17.
    Slide 16 Ajaxvs. JavaFX – Language Features 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 16
  • 18.
    Slide 17 Ajaxvs. JavaFX – Language Features cont’d vs. Flex (ActionScript 3) Binding Animations, Sequences, Triggers More mature than JavaFX 17
  • 19.
    Slide 18 Ajaxvs. JavaFX – Deployment Web wins. Except for the significant browser incompatibilities Java Setup still takes too long. 18
  • 20.
    Slide 19 Ajaxvs. JavaFX – Deployment cont’d vs. Flex No browser compatibility issue, no hassle installation Adobe Flash Player Penetration – March 2009 http://www.adobe.com/products/player_census/flashplayer/version_penetration.html 19 72.0% 99.3% 98.8% Japan 75.3% 98.6% 98.9% Europe 74.5% 98.8% 99.1% US/ Canada Flash 10 Flash 9 Flash 8
  • 21.
    Slide 20 Comparisondone legitimately? How big is the intersection? Ajax – social networking, mashups, portals Flex – multimedia rich apps JavaFX – mobile? Set-top box? 20
  • 22.
    The End 5minutes of question time starts now!
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.