Thursday 29 January 2009

Focus People, Focus !

There's a post on Jonath Giles blog proposing a new version of Java Swing, which he refers to as Swing 2.0 . In a nutshell he believes that there exists a need for a proper swing upgrade/replacement which is not JavaFX based. An upgrade containing:


  • Generics Based models
  • Support for Enumerations
  • Support for varargs
  • Stricter enforcement of event dispatch thread rules
  • Improved support for bean binding and validation.

Now these are all good ideas and wholeheartedly supported these ideas three days ago when I posted my reply. I was even willing to help with the project and had ideas about where we could start. But now I'm not too sure about the whole idea.

If I could wave a magic and wand and conjure a Swing 2.0 with all of these features would I ? Swing is complex, little tricky to learn, and even trickier to get right. JavaFX is much easier to learn and getting enough exposure in the java world that it might just succeed and take hold. If JavaFX is a real contender to that RIA crown do we really want Swing2.0 diverting precious attention and developer mindshare away from it ?

Given an choice of successfull JavaFX and a new better Swing I think I'd plump for the former. If we don't support JavaFX what are we left with?

That horrid html/css/javascript stack that poses for a GUI, what we'll be left with. *Shudder*

Wednesday 21 January 2009

New Hopes - Obama & JavaFX

SPOILER ALERT
If you don't want to know how the inauguration of President Elect Barrack Obama went (presumably you've taped it) then skip the next paragraph.

I watched the news yesterday and saw the inauguration of President Obama and one message/thought/feeling seemed to be flowing out of America - hope for the future. The oath was fumbled a bit but that made it seem all the more human. In many ways it kind of reminded of the Labour election victory in 1997 over here [the UK]. Of course, that was by comparison much a lower key event but the message of hope was there as well. People well and truly though the country had turned a corner.

And the other thing this reminded me of was the JavaFX platform. For years now the java developers have been stuck on the server side. Applets went nowhere, flash became popular and the only appreciable way to earn a living doing UI's was the HTML/CSS/Javascript jumbo. It's really hard to make any mark with a swing application these days. Java UIs, well, weren't going anywhere and sometimes even going backwards.

But, despite a year and a half long beta and a slight stuttered launch (I've heard a rumour that they accidently left hardware accelleration switched off by default in the 1.0 install) it appears to be gaining ground. You can even begin to hope again.

Obama & JavaFX ? I hope both of them succeed.

Tuesday 6 January 2009

Tinkering with JavaFX

One of my hobby goals for the holiday season just gone was to look at JavaFX and see if it was worth using for a project. I even had a project in mind : The character generator for the Battlestar Galactica RPG. I've written one for the Serenity RPG called Composure and the two systems are close to identical. I could re-use all the model code for the BSG version and try a fancy new JavaFX GUI .

Here's what happened.
  1. A Google for "eclipse javafx plugin" produced openjfx which hadn't had a release since June, nearly six months before JavaFX was released.
  2. I found another plugin at Project Kenai which requires a full J2EE version of Eclipse ( a big download in itself), doesn't have an update URL and is a really early release.
  3. I installed NetBeans and did the JavaFX tutorial.
Now NetBeans seemed as foreign to me as I expected it would, but I perservered. I got a lot of the tutorial done, and liked what I saw. I then hit a point where the JavaFX would not run . I got an unhelpful NullPointerException in the stack trace that told me nothing and strange spanner icon in the file window. No red errors and no tooltip over the spanner icon. Am I using NetBeans wrong or am I using JavaFX wrong ? How could I tell?

To be fair I hit the same problems when I switched from TextPad to Eclipse back in 2005 but then I had an office full of fellow developers I could ask. Today I don't know anybody who uses NetBeans and experience told me what a forum post would probably get me (Nothing, "RTFM noob!" or some derivative). Besides it was that strange lull time between Christmas and New Years - who would be on the forums that could help ?

I could handle learning NetBeans, I really could. I could handle learning JavaFX and indeed it does look both promising and usefull. But it's both at the same time thats the problem. What did I do ?

I gave up. Frak it, it was just a little holiday tinker project. I'll keep using swing for now. If and when a decent plugin emerges for Eclipse I'll try JavaFX again. I wonder how many other Eclipse devs will feel the same?

Talk about cutting off the air supply ......