 |
FXtive Programming
Posted by chet on July 26, 2007 at 08:12 AM | Comments (3)
Welcome to the first in hopefully a series of pieces on JavaFX Script. In future
posts, I hope to actually do some coding and investigations on my own, but for
now, I'm just going to link to the interesting work that others are doing.
In particular, the JavaFX folks now have a first-cut at a
compiler for JavaFX Script. One of the things holding back the
language from being ready for prime time is that it was initially interpreted
only, which was a bottleneck to good execution performance in general. With the
advent of the compiler, now open-sourced and being developed in the community,
the language should perform much better and be closer to an environment we
could all use for desktop application development. Of course, this will just
shift the performance bottleneck elsewhere, which is why a full-on
Direct3D-accelerated Java2D pipeline is in the plans for the
Consumer JRE release.
There is also a NetBeans plugin
that offers enhanced capabilities for editing JavaFX Script programs; a handy
thing for anyone doing serious hacking with the language.
Finally, there are always more cool Java
FX Script demos, like the Casual IM client. Playing around with
the demos is one of the best ways to see how everything works. I
would encourage you to check out the JavaFXPad demo in particular; it's an
interactive demo that shows the results of your changes as you type them into
the code window. The demo is also available in the NetBeans plugin for JavaFX,
as of the NetBeans 6 M9 build.
That's it for now. Hopefully I'll get some time soon to dive in and do some
hacking with the language and see how filthy I can get.
(For background on JavaFX Script, check out the
openjfx project site. There are lots of demos to play with that help
describe what the project, language, and concept are all about.)
Bookmark blog post: del.icio.us Digg DZone Furl Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
I am currently writing a JavaFX prototype that also involves some interaction with a Java/Swing side. So here's my take on it as things currently stand: JavaFX is a very promising technology, but in order to deliver on its potentials several issues need to be addressed properly, particularly on the JavaFX/Java front.
I believe the majority of JavaFX apps that will be developed in the near future will be of the hybrid kind, i.e. they will have in one fashion or another, a Java side to them. Pure JavaFX applications will IMO, be a rarity. So, the interaction/inter-operation between the JavaFX side, and the Java/Swing side needs to be smoothed out significantly in order to become extremely seamless, and effortless. Let's take for instance binding. Language support for binding is the claim of fame for JavaFX, but for all its strength you can't bind Java objects to fields in the JFX app. So you have to mirror all of your Java objects inside JFX and manually make sure that they stay in sync. I believe that adding boundable property support at the Java language level is crucial for making java objects directly boundable from JFX.
Another issue I am running into is the way Swing components are being wrapped and exposed as JFX controls. It seems that a lot of the functionality, and power of these Swing components is being lost as part of this wrapping process. For instance DnD is support is gone, and you can't customize the DataModel on Tree, and Table, etc. Now part of the problem might be that this is all new, but I wish that this wrapping technique would somehow be enhanced to allow for all Swing components to expose all their properties as JFX attributes with much effort, and with reasonable defaults. Maybe this ties back with the need to have Java language support for properties, and turning Swing ones into true properties. Having JavaFX classes extend Swing classes is out of the question it seems if you look at the JFX compiler mailing list as they seem to be leaning toward disallowing JFX classes extending Java ones. Which is fine with me. I am not a big fan of extending for the sake of extending.
Posted by: mikeazzi on July 26, 2007 at 11:51 AM
-
I totally agree with mikeazzi. The points he brings up (among others) is the only reason we have not yet looked at JavaFX.
Posted by: adepue on July 27, 2007 at 08:57 AM
-
makeazzi: Thanks for your comments. I agree that the hybrid approach is pretty important, especially for those folks that are traditionally Java developers, but would like to start using FX Script. I was actually hoping to start looking into some of these issues and seeing what life would be like for a Java+FX developer. Looks like you've previewed some of the issues for me...
Chet.
Posted by: chet on July 27, 2007 at 03:40 PM
|