Also, imagine if JavaFX would have just used JavaScript instead of a new language (or jruby or groovy or ...)
- Dion Almaer
WebKit would need rendering capability on par with Java2D first though, the Canvas is good, but not good enough yet.
- Ray Cromwell
BTW, Sun should first fix the Common DOM API and make it work. JavaFX still has cool DSL features for animation lacking elsewhere
- Ray Cromwell
+1 @Ray. I think this would make sense once the DOM & CSS get to the point that they can efficiently render anything you'd be able to do in Swing/AWT/Java2D. It's still got a long way to go before that's feasible -- right now, for example, would argue that it's utterly impossible to implement a "real" word processor (designMode doesn't count). There are a million little reasons for this, and they all have to be fixed (you can't even get basic font metrics, a lot of layouts are still impossible in CSS, etc).
- Joel Webber
That said, HTML/CSS absolutely wins on ubiquity and deployment ease, two problems which I don't see any evidence of getting fixed in Java (or any similar environment). So if we *can* deal with all these issues, the browser will continue to dominate.
- Joel Webber
Joel, I agree. Even though FF3's Canvas has some needed improvements (text rendering), it still largely falls short of Java2D/Quartz/GDI+/Cairo, which are needed for many high quality desktop apps. In theory, one could implement custom text components using Canvas to get around designMode limitations, but we all know it would be very very slow and hard to make I18N. Speed up JS by another 2-3x over Chrome, expose OpenGL, and a better event pump system, and we're there!
- Ray Cromwell
Oh, and expose more of the underlying TrueType/OpenType/etc renderer to JS so that one can get baseline/ascent/descent/advance/leading/gutter/kerning hints, etc
- Ray Cromwell