Garbage Burrito

Why I Gave Up on JavaFX

Why I Gave Up on JavaFX
Ben - 01/26/2009 22:00:00
Comments: 2
Last Comment: 05/15/2009 12:57:09

JavaFXLet me preface this by saying that even though this blog has been primarily about Rails, I am still an active Java developer. After my honeymoon with Rails I came to appreciate Java again and enjoy a healthy relationship with both. In other words, I'm not just a Rubyist dogging on Java.

I've never been a big plugin based RIA proponent, I still think HTML can get you a long way. In the late 90's my friend said to me "There's this new technology that's going to make HTML obsolete in a year, it's called Flash!". Flash certainly has a place, but people tend to overreact about stuff like this. Simplicity always reigns, cause we're simple people.

However, I'm always curious about new things. When my friend wanted a Dice Roller for his DnD site, I thought it was a good excuse to dabble. JavaFX had just hit 1.0 and since I had Java exp I figured I'd give it a try. My hope was that I would end up with an architecture to support uploadable plugins for Doodlekit. I've wanted to do this for awhile, but I'm sure as heck not going to let anybody upload Ruby code. I figured an applet would be secure and atomic.

The app is pretty simple, here's the Rails version I ended up with. The JavaFX version was almost the same. My intention was to start simple and then add some more dynamic components like 3d dice.

What I liked about JavaFX

The declarative syntax was pretty cool and I liked that it was similar to JavaScript. There's no reason to invent a completely new syntax. Syntax-wize, the level of entry was pretty low (relative to other Java technologies), however I could tell it would extend gracefully. I was also pretty happy with the NetBeans support. That's about it.

What I didn't like

The first thing I noticed was how incredibly slow it was. This was about as simple as it could be. The data was stored in Doodlekit's form builder database, and the app connected through a RESTful Web Service. It took way too long to load and way too long to run. I didn't spend any time trying optimize it. I don't think I should have to with an app this simple. I guess there's the argument that weight of my app didn't warrant the use of something this heavy. I just can't figure out how Sun hasn't been able to make small simple applets really fast yet. I guess I'll wait another decade.

Being new to JavaFX, I had to look up a lot of stuff. Unfortunately there wasn't a lot of stuff to be found. There's a not so useful JavaDoc kind of thingy and a handful of blog posts. The problem is that half the snippets I found in blog posts were no longer valid, I'm assuming because they'd been removed during the Beta. I believe there's one published book and a few in the pipeline. I realize it just hit 1.0 but come on, how's it going to get any traction if you can't figure out how it works?

Finally, the lack of cool components was pretty frustrating. You had the standard Swing stuff like textboxes and such, but with a hot new technology like JavaFX, I guess I expected more. Instead of just a JList, how about sortable grid components? What's the point of a slider without a label? And no I shouldn't have to make my own.

I'm sure if I looked a little harder I could find answers to a lot of these issues, but I guess that's my point. If you want a technology to catch on you have to be ready for this. Good documentation is an absolute minimum, followed by lucrative features, and maybe good performance if you are so inclined.

 

Comments: 2
Last Comment: 05/15/2009 12:57:09

Comments

1. Aaron  |  my website   |   02/07/2009 21:43:57

Thanks for the critique of JavaFX!

I haven't had a chance to play with it but it's on my list of things to play with. I think the majority of your critiques are kind of Sun specific. Don't get me wrong I agree good documentation is critical to a new technology's success - Sun just doesn't do documentation very well (aside from API Java Docs). You should try to figuure out how to work with JSF - now that is horrible.

Hope things are going well for you - still not doing Ruby though...

2. Scott Hommel   |   05/15/2009 12:57:09

Hi Ben,

This is Scott Hommel, from Sun. I just came across this post and would like to clarify some things about or documentation. We actually have tons of information for new users, all of which is linked to from web link.

New users can come up to speed on the language with our tutorial trail. This consists of the following four documents:

Getting Started With JavaFX Technology
Learning the JavaFX Script Programming Language
Building a GUI Application with JavaFX
Media Browser Tutorial

From there, we have many other articles and technical tips. Here are just a few (all of which are linked to from the learn page)

Animation Basics for JavaFX Beginners
Create a Quick-and-Dirty Reload Button
Pack Information Into a Bullet Chart
Interactive Dice: Calling JavaFX Script from JavaScript
Creating a Media Player
Enhance Your MIDlet With JavaFX Technology
Create Jazzy and Jazzier Bar Charts
Incorporating Media Assets
Create an Easy Line Graph
JavaFX Script—JavaScript Bridge
Create Visual Appeal in Your UI
Reverse Animation Easily Using the Rate Trick
How to Develop and Run JavaFX Applications Offline
Using Advanced Deployment Features
From MIDP to RIA: Enhancing Radio Buttons
Creating a Drawing Application in 5 Minutes
How to Improve JavaFX Application Startup Time
Preparing a Sample for JavaFX Mobile Technology
Animation Along an Arbitrary Path
Creating Buttons With a Rollover Effect
Running Time-Consuming Operations in the Background Mode
Using Resources From the External JAR File
Repainting Objects at Runtime
Using Custom Swing Components

... and this list grows every week. Making this language easy to learn is one of our top priorities. So to anyone reading this (who is considering trying JavaFX), just know that our coverage extends far beyond API documentation and blog posts.

Post a Comment


Are you human? Please enter the word below.
M2dvbgquanbnmti2ntyxntyxmw==


powered by Doodlekit™ Free Website Builder by Doodlebit™ Website Company