Posts Tagged ‘javafx’
Glaring JavaFx Problem
The concept that JavaFx cannot be embedded into an existing Swing application baffles the mind. There were hacks to do this in 1.1, and I have it working in 1.2 (minus mouse events), but to not support this in the official API is one of the strangest things I’ve seen. This would be the #1 way to drive adoption of JavaFx, yet Sun seems to be blind to this fact. There are plenty of Swing apps that could be enhanced to have some nice eye-candy charts, etc.
JavaOne 2009 Recap
JavaOne 2009 is over, and it was my second year in a row to attend. Looking back, I would have chosen WWDC over JavaOne this year, as I feel I did not get as much out of the conference as I did last year. That is not to say there weren’t some very good sessions…
Highlights from my perspective:
- Project Jigsaw (Java 7 modules) – the modularization of the JVM and application libraries has a lot of promise, and can help cut down on bloat. The keynote demo of this went well. The question of how this lives alongside OSGi is still open for me (although I have not researched this).
- JavaFx 1.2 – the new platform seems to be maturing; the demo apps are getting better.
- JavaFx Designer App – very nice to see Sun realizes this is an important aspect of JavaFx development. Without it, JavaFx will not have a chance long-term. It looked to me like they “borrowed” a lot from Apple’s Interface Builder, which is probably a good thing.
- Java App Store – also nice to see Sun going a step further than Web Start and trying to improve the consumer deployment experience. In the end though, I think the App Store doesn’t have much of a chance. It will depend on the apps, but Sun will have to figure out a way to get people to install the App Store to begin with (JRE bundled?).
- Ben Galbraith – his talks are always a highlight as he is probably the best speaker at JavaOne. His talk about software craftsmanship hit home, because I really want to work on projects where that is viewed as a priority. Making this happen in an enterprise environment is a tough order though.
- Google – between the talk on Google App Engine, Guice, GWT, and the upcoming SiteBricks, it’s clear that Google is making a big investment in Java. I would have really liked to have seen Google acquire Sun, and maybe that would have made sense if Sun didn’t do hardware.
Lowlights
- JavaFx 1.2 – it really broke with backwards compatibility. This is perhaps a good thing if it improves the platform, but it seemed to generate a lot of complaints. You really don’t want to upset developers of a new platform so much. Maybe this happened because JavaFx was released as 1.0 way too early, or maybe this year’s release should have been called 2.0.
- General sessions – they seemed far more filled with what I would call advertising. I understand Intel was the main sponsor, but spending 20 minutes telling us how their new Xeons help improve performance is something that should be pretty obvious to most people. Are they going to come back every year and tell us that Moore’s Law still applies?
- Larry Ellison – his proclamation that Ajax is no longer needed – hah! O RLY?
- The food/beverage service – $3.50 for a 16oz soda? Really? And one beverage cart that I know of serving throughout the day? I think I dehydrated myself. Next time I’m going to be armed with several bottles of water of my own.
- Course descriptions – the content catalog should ideally give a better idea of the target knowledge level that attendees should have. It sucks to go to a session where you learn nothing new because it is just an introductory level talk.
JavaFX Review
My evaluation of JavaFX is fairly positive, I think it is a step in the right direction. I do however have questions about Sun’s commitment in this area. I get the feeling their developers are understaffed and overworked. I am currently setting JavaFX aside and will take another look at it closer to its actual release, either beta or release candidate status. I could definitely see using it in a small, self-contained project. However right now I can’t recommend that it be used in an enterprise/commercial app in the foreseeable future. It comes down to tooling — the visual tools need to produce a much better looking result out of the box.
The entire developer/designer workflow thing is something of a question mark. My belief is that most organizations are currently not really employing designers to begin with, so getting into this mode of development is going to be difficult. This is why making it easier for engineers to produce something that looks nice should be the 1st priority IMO.
JavaFX Preview release out
They said July, and here it is on the last day of July. My feeling is that this is probably rushed! The feature matrix with Networking & XML/JSON handling as not 1.0 features is a bit troubling. Not sure what that really means though. Most interesting will be the project Nile plugin for CS3. I’ll have to play with it and see how well it works.
JavaFX: RemoteTextDocument
JavaFX is still undergoing changes. Hopefully the SDK & API will become solidified soon. Right now it is pretty bleeding edge, with incomplete Javadoc. Not a criticism, just the facts.
I wanted to see how hard it was to use the RemoteTextDocument API to pull in some sort of webservice feed. Turns out it is not so hard once you know how to do it. Since there appears to be no existing examples of this out there, here’s a snippet of code that could be useful.
import javafx.async.*;
var remoteTextDocument:RemoteTextDocument = RemoteTextDocument {
url: "http://api.flickr.com/services/feeds/photos_public.gne";
}
var doc:String = bind remoteTextDocument.document on replace {
if (remoteTextDocument.done)
java.lang.System.out.println("doc = {doc}");
}
All this does is immediately fetch the contents of the Flickr URL, and print it to the console. I would say this is pretty nice. I was able to incorporate the concept shown above into a small application that shows a thumbnail photo feed without a lot of code.
As of this post, this is only working with the nightly trunk build of the compiler. You’ll get a NegativeArraySizeException running it in Netbeans since their plugin is not being built off the trunk.
I have a corresponding post on the OpenJFX forums about this issue.

