The Register® — Biting the hand that feeds IT

Feeds

Oracle should cannibalize JavaFX Frankenstein

Time to get Swinging

Agentless Backup is Not a Myth

Comment One of the survivors of Oracle's mammoth takeover of Sun Microsystems is JavaFX, the Flex wannabe and illegitimate son of Swing.

The biggest coup for JavaFX three years after its unveiling at JavaOne is its integration into Vancouver2010.com, in a spinning-wheel app that shows countries' medal counts dating back to 1924. It's a nice use of data visualisation, a cross between tag clouds and a time-traveling version of Risk. But oh my word, the jaggedness of the text. Don't these people know that Java can do antialiasing very nicely? Even the "Powered by JavaFX" logo has embarrassing color bleed.

The Winter Olympics app is a rare moment of fame for JavaFX, in an otherwise bleak and underperforming history. The brazenness of JavaFX.com suggests otherwise. It's all flashing lights and bold headlines, as if the marketing team are standing around Frankenstein's corpse sending shockwaves of electricity into it and insisting: "Look! Look! It lives! No, really, it does!"

JavaFX unfortunately failed because it was too little, too late. And yet Oracle has chosen to keep JavaFX going, in an attempt to invigorate its stillborn corpse. One wonders why.

Granted, there are things to like about JavaFX. The MediaBox component lets you very easily set up a streaming video in your web page. Just the following bit of code will do it:

var media = "http://sun.edgeboss.net/download/sun/media/1460825906/1460825906_11810873001_09c01923-00.flv";
var mediaBox = MediaBox {
    mediaSource: media
}

And then put it on your stage:

Stage {
    title: "MediaBox Player"
    scene: Scene {
        content: mediaBox
    }
}

This example, a live sample from their website, will play an excerpt from Big Buck Bunny - or any .flv file you happen to point it to, of course. The team has evidently taken on board the need for JavaFX to "just work", with a minimum of Daffy Duck-ing about. However, "just work" is exactly what this example didn't do in practice. With very little coaxing, the MediaPlayer locked-up with this impressive Windows Solitaire impression you see below.

My net connection was fine, but as soon as I scrolled the page a little bit, the picture went from Big Buck Bunny bouncing in the warm sunshine to an epic freeze, from which it never recovered. I'm not sure how exactly this will convince web designers to switch from the cosy safety-in-numbers (and stability) of their Flash players.

Regcast training : Hyper-V 3.0, VM high availability and disaster recovery

Next page: Missing mojo

Works for me...

(Disclaimer: JavaFX enthusiast writing here.) The GeoView works pretty well here. I don't notice scrolling or any other issues with this or other Java/JavaFX applets. Notice that you really need JRE 6u18, and also JavaFX 1.2.3 - this point-release was readied especially to fix a few bugs for the GeoView app, days before the games started. (Unfortunately the JNLP doesn't enforce these runtime versions, it just requires JRE 5+ and JavaFX 1.2+, so the GeoView may run on older crap if you've already got it installed.) And you really need Windows - the JavaFX ports for Mac and Linux are still lagging a bit. On the Mac, the problem is Apple's JDK lag behind Sun's; on Linux the problem is much more severe as Linux's core media stack is a pile of monkey dung, from graphics drivers to the multiple crappy/nonintegrated sound subsystems etc.

The very first time you load the GeoView (or any FX app that's your first FX apps), there is a bigger download time because the JavaFX runtime weighs in ~10Mb, and that's assuming you've already got the latest JRE. But the warm-start is pretty good in my tests (JRE 6u18 is important for that, contains some significant improvs in the Java PlugIn cache where applets are stored).

Notice that GeoView will query its server for specific info, like each country's flag and medals, on demand as you navigate stuff. This data is stored in the Java PlugIn cache (check the JPG and JSON resources) so the next uses will be fast. Perhaps they could pre-load things in the background when the applet is idle, e.g. prefetching data from nodes that are "neighbor" to the node in focus, that would provide an even better perf. Don't blame the platform for everything; app design plays a big role in PERCEIVED performance.

Now, Flash is certainly ahead in deployment, but... I've just seen the Tour De Flex demo... pretty UN-impressive. The deployment is still good, but not brilliant: I already have the latest Flash so the initial UI loads reasonably quick (>5s) and without fuss. But it's certainly not in the "instantaneous" standard of most Flash applets; and I'm just talking the initial screen! Every single menu item I open for specific demos has a VERY noticeable, extra loading time - always several seconds, like the COLD-start of an entire small Java applet. The performance sucks horribly - drawing of the chrome, simple effects like fade when a modal dialog is shown, etc. Try dragging a window with transparency, e.g. in the TileWindow demo, the shitty performance JUMPS in your face. And don't tell me that Flash 10.1 will fix this with GPU acceleration and other enhancements - I AM already using 10.1beta2. (Doing this test on a Q6600 + NVidia Quadro FX1700, it's not a bleeding-edge gamer system but it's pretty decent. God helps Flex on a laptop with some Intel IGP.) The look&feel is nothing to be proud of, nor is the memory usage (a bit HIGHER than JavaFX's GeoView, in my tests).

All in all, for tiny applets there's still no competition to Flash which can cold-start a small SWF in a couple hundreds of milliseconds. But it's a different ball game for Flex/AIR, that demand very large frameworks that are downloaded on demand (and apparently without any decent caching). Flex/AIR is just as much slow-booting and RAM-eating as Java/JavaFX, so the playing field is much more level here (of course Adobe is still ahead in items like tooling, developer midshare, and runtime distribution - but then, they've been 10+ years in this game, so there's still a lot of ground for JavaFX and also Silverlight to catch up).

3
0

BioTech Developer

Hi all,

I'm getting a LOT of work done in JavaFX. Much more quickly than in SWING.

Its like the press thinks the only thing I need JavaFX for is to add bling

to webpages.

As if.

I need a lot more than that.

The constant comparison of JavaFX to FLASH is all obsession

and little substance. It seems to be a rut that tech reporters

just fall into when talking about JavaFX. Flash does a very good

job at adding bling to webpages. It is quick and easy. But the

depth isn't there. Nor is it cheap.

I added up all the costs that Adobe charges if

you want to be a full fledged Flash developer. I was up

to $THOUSANDs OF US$ when I added up all the charges

for Adobe stuff.

Adobe Acrobat 9 PRO $ 699.00

Adobe Flex Builder $ 699.00

Adobe Flash Pro $ 699.00

Adobe Illustrator $ 599.00

Adobe AfterEffects $ 999.00

Adobe DreamWeaver $ 399.00

Adobe Audition $ 399.00

Adobe Cold Fusion $1,299.00 or $7,424.00 for the Enterprise

Adobe Captivate4 $ 799.00

Adobe Authorware 7 $2,969.00

...

and there is more $$$ for all sorts of extra specialized tools...

AIR and FLEX are new technologies trying to be a JVM. Adobe is adding

capabilities, then rethinking and starting over with new versions

I understand. They've got a ways to go with those.

If you look at the FLASH posts in that community you'll see that they

have a LOT of technical problems to overcome. Just as there are

with JavaFX. For example Flash 'tricks' need to be employed to do simple

things like play mp3 loops without gaps in the sound.

I really do think that you CANNOT develop an app that will run well on

a phone and on a device with a bigger screen. It just isn't possible

without completely rethinking the app. There is just too much of a

difference between a 3" screen and a 10+" screen. The best that can be

done is that you use the same language and tools to develop two differnet

programs.

The programs that I want to write cannot be done with Flash. I least I don't

know how to do them. And they are difficult to do with Swing. But are easy

and fun to do with JavaFX.

I do have high hopes that soon JavaFX will have a quick start up time from

browsers time and a solid and reliable web deployment using any browser.

I'm expecting this will be possible by the end of the year.

Kicking JavaFX is like kicking a really promising puppy.

2
0

Wake Up and Smell The Coffee

Please understand what a scene graph is first? A scene graph is a data structure of descriptive object nodes that in themselves represent abstract graphics declaratively that are rendered through runtime (software and/or hardware pipeline) to produce graphic primitives on the target display device.

JavaFX is designed to support a scene graph

JavaFX is a Domain Specific Language

Swing was not designed to support a scenegraph runtime. It uses ``immediate mode graphics'' with GraphicsContext (AWT and Java 2D) as it underlying technology. Immediate mode graphics programming has been around since the 1980's with Windows Handles, X Windows Contexts, Borland Graphic Unit Contexts and of course Java AWT Graphics2D context.

Swing was designed to be an emulation of windows user interface technology of the period, the classic WIMP model (Windows Input Mouse and Pointer).

Smell the real coffee with the new kinds of UI/UX that you already know about to hit the streets. The Apple iPad is foregoing the traditional UI/UX of WIMP. It is a new style of consumer device with a touchscreen. Surely you do not think that Swing 2.0 will be able to execute on these devices or other slates (that you might be using in the five years). If you do then you are a dumb .....

With devices like Apple iPhone / Google Nexus you all know about the graphics objects that seemlessly rotate, scale, translate and shear; and can perspectively rotate. How on earth do they do that? You might have wondered in your mind. I hope you probably know that there is a programming model and graphics pipeline that makes what you see on iPhoneOS a doddle to program. It would be very hard and difficult to take a Swing UI 2.0 and develop it now to the iPad (or another other forthcoming competiting i-slate). This is why JavaFX was invented, or rather Christopher Oliver of See Beyond, created an experiment called Form-Follows-Function (F3) that in prototypical terms set the stall out for JavaFX. His research endeavours to build a language to manipulate a scene graph , see his blog on the older blog.sun.com, pre-date the announcement of the first generation Apple iPhone in January 2007 WWDC. Plus we all know that Chris Oliver and Apple were separated by concerns and could not be influenced by each other, in anyway.

Simply put, the new UI/UX mode is to have a runtime that supports a combined 2D/3D scenegraph runtime, which is performant and takes advantage of 3D graphics GPUs. If Tony Blair mentioned once: education, education, education and Bill Clinton mentioned once, the economy, economy, economy then please believe me, with JavaFX, and this including another graphics RIA solution, it is all about now the performance, performance, performance. Why? Because Apple are setting the agenda in this game. They just did in 2010 with the new Fangled Apple iPad. The demos were stunning when I had a change to watch them as podcast on iTunes. Flex, Silverlight and even JavaFX had better catch up.

I realise there are wide spread confusions here are that people think that JavaFX can only run inside a browser, or it is based on extension of Swing, or about a fluffy stackitecture and the runtime. The real prize to be able write RIA that can ported/target to a multiple of devices (screen) in one DSL and one runtime. This is the rocket science that everyone has to understand.

We are waiting for Oracle to finish the work that Chris Oliver started. Produce a Java/JavaFX runtime that supports scenegraphs and replaces the old fashion Abstract Windowing Toolkit (pipeline circa 1995) and then it will contain combined 2D and 3D graphics. This runtime is called tentatively by Oracle, "The PRISM Runtime" and it will solve not only JavaFX but also Java Runtime Environment (JRE). That's right even those m****f***rs of b**k*rs will be able to download the JRE with the Prism ``Stackitecture''. If they want they still run little bitty Java Plug-in based financial trading applications, while the rest of us can work with a scenegraph enabled FX. Once Oracle release this code and the platform, I bet that Java on the desktop will be blooming fast! Then all they need to do is port it to devices. Ok Apple won't allow byte code interpreters or virtual machines to run in their walled garden with Java or even Flash. However If Oracle ever makes a deal with Google, and then with Android, to port the JavaFX runtime over there to those mobile devices. I think we will be laughing really hard. Finally JavaFX is still based on ideal of WORA, your JavaFX desktop can be with of course modifications be running on JavaFX mobile device if you architected that way.

*PP*

2
0

More from The Register

Bjarne Again: Hallelujah for C++
Plus: Now officially OK to admit you never used STL algorithms
Interwebs taunt Sir Jony over Apple eye candy makeover
Hey Ive, Ive... add more unicorns, willya?
SCO vs. IBM battle resumes over ownership of Unix
Zombie lawsuit back and wants to suck the brains out of Linux
Apple: iOS7 dayglo Barbie makeover is UNFINISHED - report
Plus: You don't like the icons? Blame marketing
Red Hat to ditch MySQL for MariaDB in RHEL 7
So long, Oracle! Don't let the door hit you on the way out
Shy? Socially inadequate? Fiddling with your phone could help
App 'tells the brutal truth' about social inadequates' chatup lines
Java EE 7 melds HTML5 with enterprise apps
New release arrives with GlassFish, NetBeans support
 breaking news
'Office Facebook' firm Tibbr wants you to PAY for mobe-meetings app
Great idea. Punters won't cough for it though
 breaking news
The only Waze is Google: Ad giant tipped to gobble map app 'for $1.3bn'
Pac-Man-satnav-ish upstart in bidding war with Apple, Facebook
 breaking news
PM Cameron calls for modern, programmable computers! (We think)
IT education musings to G8 chiefs to mystify IT industry