JavaFX: I'm Starting To Believe
It always takes some time for new technologies to prove themselves, and JavaFX is no different. It still gets more than it's fair share of bad press, but as more examples using JavaFX appear, I'm starting to believe that it has it's place for Java developers. I'm sure we'll see a lot more examples of what JavaFX can do at JavaONE this year. Here are some examples that caught my attention.
One of the main strengths of JavaFX is the type of user interfaces that are possible - and one of the most popular interface types of the moment is the image flow type, that Apple look. This image viewer looks great, and gets it's images from Flickr through web services.

Of all the different mashups that you can create, location based ones along with Google Maps are the most popular. This example shows how this can work (I would really like to see the source code for this!).
Mashups become even more useful with JavaFX mobile. I really liked this application built on top of the Yahoo Shopping API.

Moving away from mashup side of things, Rhythm Box is a fun drum simulator written in JavaFX. Maybe we'll see a version of something like Guitar Hero written in JavaFX soon?

It's not the mose diverse or complete list of examples, but it's a start. Are there any examples of JavaFX applications that you would like to share?
Don't forget that the JavaFX Coding Challenge is still open for entries, until May 29.
James is a DZone Zone Leader and has posted 231 posts at DZone. You can read more from them at their website.
- Login or register to post comments
- 17588 reads
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)










Comments
Sergey Surikov replied on Mon, 2009/04/27 - 2:55am
James Sugrue replied on Mon, 2009/04/27 - 3:48am
in response to: surikov
Thanks for the link Sergey - I remember trying that out a few weeks back - very impressive.
Is the source for these demo's openly available?
James
Sergey Surikov replied on Mon, 2009/04/27 - 4:58am
Piotr Kochanski replied on Mon, 2009/04/27 - 6:50am
People who are behind JavaFX seem not to get what is going on. Java is strong on the server side, right? In fact on the high-end server side - middle to huge applications, financial sector, insurance sector, data mining. No one is using Java to write blog application or simple CMS.
So, do these huge applications really need flying, colorful circles and squares or a movie about squirells? No, they don't. That what they need is an evective way to build user interface, mostly forms and easy to navigate content elements. Look how Flex is used in practice.
I haven't seen a single demo showing how to build with JavaFX a form with nicely done validation, that would be much more interesting, more appealing to current users of Java and useful then all these funny looking demos.
I hope that JavaFX makers are not creazy enough to think that suddenly all those graphics designers who are building flash animations with the help of Photoshop/Illustrator/Flash would suddenly become JavaFX coders using rather basic support from NetBeans IDE.
This is, btw, the other thing JavaFX makers missed, today your are not publishing a new technology without proper tools. Look at Android or new Google Apps for Java - the tools (Eclipse plugins) are even comming before the technology is available.
I don't see bright future for JavaFX despite of the clever desing from the puerly technical point of view - no XML + programming language, but programming language designed to create GUI.
Maybe, if that technology wouldn't be killed by Oracle, after a few years this technology will get right support from the community - this happened with JFS. There is a joice of well designed components, so the technology is finally usable.
Piotr
xoft.pl
Jacek replied on Mon, 2009/04/27 - 6:57am
I will start to believe when the main JavaFX plugin is made for Eclipse. Hopefully Oracle will be more realistic about what vast majority of Java developers are using, instead of pushing NetBeans at every turn.
This is by no means to say there is anything wrong with NB, it just has minimal penetration. I don't know of a single Java shop using it as their main IDE in production. Hence tying JavaFX to NB was not a very wise decision.
Also, the Inkscape plugin:
http://silveiraneto.net/2008/11/21/inkscape-and-javafx-working-together/
should be part of the default JavaFX library and integrated seamlessly with Eclipse to allow easy editing of content back and forth.This would give a 100% free toolchain from design to coding.
And yes, fix the damn applets already. They still suck, compared to Flash. Still too slow, too long to start up and too many weird issues.
Jacek replied on Mon, 2009/04/27 - 7:01am
in response to: piokoch
David Freels replied on Mon, 2009/04/27 - 7:06am
in response to: piokoch
Graphics Designers would use the production suite which provides plugins for Photoshop and Illustrator:
http://java.sun.com/javafx/1/reference/releasenotes/production-suite-release-notes-1-1.html
Jess Holle replied on Mon, 2009/04/27 - 7:19am
I want to see JavaFX succeed, but I'd have to echo the comments about business forms.
In many business cases sexiness of the application is much lower on the list. Being able to create complex forms with proper validation, feedback, and binding with less time and effort (or at worst no more time and effort) than alternatives is job #1 for many jobs. Adding sex appeal is nice -- but only if you demonstrate that you at least tie on job #1.
Piotr Kochanski replied on Mon, 2009/04/27 - 7:47am
in response to: dafreels
My point is that JavaFX should not compete with Flash - there is no point, Flash is so popular and standard tool among graphics designers that it is unlikely that they ever look at JavaFX. Even though you can export static graphics to JavaFX it is still necessary to add events to that, no ide exists that help to do it as easyly as in Flash Studio. It is simply to late. Flash is a de facto standard. Java FX for some didn't go through JCP so the industry couldn't say what they need and I am afraid they get something that is not solving any true problem.
JavaFX tries to target wrong audience. The real audience for JavaFX are people designing backends to big enterprise applications, they are coders, they don't care about 3D, embedded movies, they do forms, tabbed UI, etc. JavaFX demos should show how an applet coder can do such things much easier with JavaFX.
Piotr
xoft.pl
zorglub76 replied on Mon, 2009/04/27 - 7:49am
Amen on that, Piotr..
And I'm so into this JFX stuff.. It would be such a shame if it would sink
Roy Bailey replied on Mon, 2009/04/27 - 7:51am
I would far rather have seen time and money spent on Swing than JavaFX - or a Java based Swing2 with JavaFX capabilities. Swing is great as a swiss army knife of plain vanilla components, but it leaves too much plumbing and few modern features you need off-the-shelf.
Hope Oracle refocus here. Give me JavaSwingBuilder/MigLayout, SwingX, and seamless deployment (WebStart/Applets). Microsoft and Apple add easy GUI widget behaviour to their SDKs all the time. SUN never really got this.
Yes, you can pay for some great GUI widgets built on Swing, but I shouldn't have to pay for features with Java that come free from our competitors. Instead, SUN built JavaFX, a nice concept, but outside Java's core strength and in an area SUN has proved incapable of doing well.
Sadly, I see the Enterprise replacing Swing with.NET, and I don’t think JavaFX will change that.
Geertjan Wielenga replied on Mon, 2009/04/27 - 8:14am
in response to: Jacek
When you look (and actually read) through the NetBeans Community Partners page: http://www.netbeans.org/community/partners/list-community.html
...and many other sites, such as the NetBeans Platform Showcase: http://platform.netbeans.org/screenshots.html
...one can only conclude that your statement above says more about you than it does about NetBeans. :-)
Jess Holle replied on Mon, 2009/04/27 - 9:05am
in response to: rb4619
I think Sun got distracted by hobbiest and eye-candy folk chasing other languages.
In part, this makes sense -- if you're not going to be substantively richer than common DHTML, then one might argue "why bother?"
On the other hand, business enterprise and intra-net applications value efficiency of production and business capability over most everything else -- and *then* consider low-cost sex appeal. Where these adopt Flash or .Net, it erodes Java mindshare. Where these adopt .Net it erodes the argument for Java on the server.
Greg Brown replied on Mon, 2009/04/27 - 11:06am
I encourage you to check out Pivot. It's a Java-based RIA platform that is geared primarily towards building applications, not interactive animations:
http://incubator.apache.org/pivot
Like JavaFX apps, Pivot applications also run as applets (or via Web Start), but are built using Java and XML using a syntax similar to Flex and Silverlight rather than JavaFX Script.
Greg
Mike P(Okidoky) replied on Mon, 2009/04/27 - 11:35am
Believe in what? Free open video for Linux is a taboo that Sun couldn't break, and I *knew* that the moment JavaFX on Linux wasn't there.
I'm now seeing a JDK/JavaFX bundle, again, not for Linux. I'm *highly* disappointed, again. I never bought their JavaFX/Linux stories from day one.
I'm not impressed by shiny screenshots of yet again another zoom image Mac immitation.
Ivan replied on Mon, 2009/04/27 - 1:09pm
in response to: Jacek
Ivan replied on Mon, 2009/04/27 - 1:11pm
in response to: piokoch
JeffS replied on Mon, 2009/04/27 - 1:36pm
I think JavaFX is between a rock and hard place.
On the one end, it's doing media and animation and graphics quite nicely. But in that functionality, it is quite frankly, solidly behind Flash/Flex, in terms of performance, ubiquity of distribution, tooling, mindshare, etc, and offers very little compelling reason for designers to migrate.
On the other end are existing Java enterprise developers, who couldn't care less about animation and media and advanced graphics design - as has already been pointed out, these developers want forms and components and validators and tabs and such, all of which JavaFX lacks (at least at this point).
So JavaFX is far from fully serving either niche.
JavaFX can succeed if:
a) On the animation, media, advance graphics end, it does those things at least as well as, if not better than, Flash, and does that very, very soon.
b) Provides a rich set of forms and components and validators, etc, and does those much easier than standard Swing, and provides this very soon.
Even if the JavaFX engineers can't do those things before the Oracle acquistion of Sun completes, Oracle might not be interested, because Oracle is a very ROI, business focused company (Sun is more engineering focused), and JavaFX's ROI is very questionable at best. Even if JavaFX does the above mentioned things quickly, it's still just another "me too" for Flex and Silverlight.
Personally, I would rather have seen Sun concertrate on maximizing Swing - adding higher level API's, a la Groovy's SwingBuilder, and a standard application framework (to take care of common lower level plumbing), maximized look and feel as well as performance, add the Java kernel (minimal download), and maximize Java Web Start.
And I see Oracle doing those things, as opposed to continuing development of JavaFX.
Jay Huang replied on Mon, 2009/04/27 - 2:31pm
in response to: jas_ejb
Sergey Surikov replied on Mon, 2009/04/27 - 2:48pm
kind of toy which doesn't provide any business value.you are wrong. Look to this examples:
http://jfxstudio.wordpress.com/2009/03/25/orange-currency-converter/
http://jfxstudio.wordpress.com/2009/02/22/javafx-sql-server/
http://jfxstudio.wordpress.com/2009/02/18/something-usefull/
JavaFX has all what you need for business applications. Sadly, JavaFX team don't understand what developers need from JavaFX. Most of developers need new abilities and compatibility with Swing:
http://java.dzone.com/articles/what-javafx-examples
Jilles van Gurp replied on Mon, 2009/04/27 - 3:39pm
A lousy squirrel with a grey border on a black background. Aside from the fact that the squirrel is not that impressive (especially since not generated by JavaFX), the rest of screenshot is sort of lame. You could probably emulate all of this with javascript and a decent web browser.
There's nothing in the screenshots you present that could not be done with flash 10 years ago. Applets should have done all of this 10 years ago to be competitive. Now you need to look 10 years ahead instead of back to make a difference. So to little, too late, and what were they thinking.
OtengiM replied on Mon, 2009/04/27 - 3:46pm
Im starting to belive JavaFX is dead and it was just wasting time and money for Sun for 2 years and the damn thing still in beta status. Oracle will want it?, Nope, Oracle is a server side business. If they want to enter to the GUI business they will do it as the GWT that can compile to Flex/Flash and be done with the RIA problem.
Lets be real people, JavaFX is nice hippie idea but it is dead. Even JavaFX does not have a niche.
Sergey Surikov replied on Mon, 2009/04/27 - 4:08pm
There's nothing in the screenshots you present that could not be done with flash 10 years ago.Flash can't access SQL-server directly
Flash can't access filesystem
maxkatz replied on Mon, 2009/04/27 - 5:34pm
in response to: Jacek
We (Exadel) are working on JavaFX plug-in for Eclipse, see here and here. We are planning version 1.0 for JavaOne. As for validation and connecting to popular back ends such as JBoss Seam and Spring we have Flamingo. It uses Hessian protocol.
Max
http://mkblog.exadel.com
tmilard replied on Mon, 2009/04/27 - 7:02pm
I do also Swing Stuff. even now some Applet (still a bit slow at startup but ... improving).
And to those who say Swing - and serious people (!!) - people do not need javaFx are really wrong.
Fact 1 : The world of "application" even enterprise is going Web like. Flash, html, Ajax. Moist of the time you just can't say to your boss: I will do an application in Swing like the old days. those days are over.
Fact 2 : Most of people want good looking applications. And you can not put in the Club of good looking API swing. It is so 90's look. I remember someone said in a blog a few month back 'swing API' is made by engeneers who are handicaped from the eyes. Honeslly it is not so far from the truth....the visual of swing has almost not changed in 8 yars.JavaFx has a cool todays's visual.
Fact 3 : We love to see animation... and Swing is not made to make animation. I tried it in the past. I had to code everything. I spent weeks and month. And it is not maintenable. So just forget doing visual animation in Swing. JavaFx is just made to program cool animation.
I do admit it would be cool to have in JPanel swing a function like JPanel>>putJavaFxFunction(url or class). To add some javaFx animation in existing Swign application.
And I also agree that I think for the first time I see sucess in JavaFx in the next month.
OtengiM replied on Mon, 2009/04/27 - 9:14pm
Casper Bang replied on Tue, 2009/04/28 - 3:05am
Yahooo, now for the 3'rd year in a row we're going to witness shiny but pointless demo's of JavaFX at JavaOne. I don't mind JavaFX by itself, but it does hurt to see it steal resources from other projects I have a vested interst in (Pulling out of SwingLabs, canceling various JSR's 295, 296 and even Java itself going stale).
Apart from encapsulating really dynamic content like video (which Flash does really well), I'm just not sure I see a use case. Modern browsers are about to get a massive gain in JavaScript performance, and Google as well as various JavaScript libraries keeps pushing the boundaries. For instance, compare install and load times of the above applet to this JavaScript coverflow implementation.
Sorry Sun, perhaps if you had not neglected the original applet concept, but this is just too little and too late. Hell, I still can not download the parts needed for developing JavaFX for my OS. And due to these shortcomings, many RIA articles do not even mention JavaFX at all.
Fabrizio Giudici replied on Tue, 2009/04/28 - 7:32am
Re NetBeans vs Eclipse, the NetBeans penetration is not "minimal", and I'd like to see a disaggregate statistic about people developing for the front end. In any case, I believe the Eclipse community is so vibrant that they will be able to provide a JavaFX plugin for Eclipse without asking for it to Sun ;-) In fact, see the Exadel link above.
For what concerns the future of JavaFX, I think at this time it's white or black. Either Oracle drops it, because it isn't interested in that segment, or it will soon fix the basic limitations because of fresh money and resources. In the second case, I bet it will soon fix the lack of a complete and official port for Linux.
Hayden replied on Tue, 2009/04/28 - 8:17am
OtengiM replied on Wed, 2009/04/29 - 3:25am
If JavaFX stack have a good license as the GPL or BSD and it runs in Linux, I will adopt it for sure, It is a welcome for Swing/RIA/Graphics development and I see it got an Eclipse plugin ver 1.0.1 looks good.
But why still JavaFX not sure about licensing and it does not run yet on Linux officially?, Qt framework phonom it use the platform multimnedia api, why JavaFX cant do that and release it for Linux.