Feeds

Gaps blight JavaFX early promise

Sun repeats Swing mistakes

3 Big data security analytics techniques

Many Will Groan

Many will groan, though, at the prospect of having to learn a whole new scripting language that isn't really based on anything. At least starting with the best bits of an existing language like JavaScript would have kept it familiar.

The quirkiness isn't just in the syntax. There are surprising side-effects to the declarative approach. For example, doing this:

var myScene = Scene {

    fill: myGradient

    content: bind stuff

}

 

Stage {

    title: "My Stage"

    width: 450

    height: 450

    scene: myScene

}

Is very different than doing this, which produces a blank window:

Stage {

    title: "My Stage"

    width: 450

    height: 450

    scene: myScene

}

 

var myScene = Scene {

    fill: myGradient

    content: bind stuff

}

This is compile time versus runtime: myScene is compiled in therefore available anywhere in the script, but at runtime, the script elements are executed from top to bottom, not when they're first referenced - except in the case of a timeline function or GUI event.

To me, this breaks the principle of least astonishment. It also raises some thorny questions about the order in which script elements are executed. For example, does the ordering of import statements matter? I can see this leading to insidious runtime issues in big projects where simply swapping two import statements around magically fixes (or further breaks) things.

Whither Swing?

With Sun's new golden child running around, the question is what's the future of Swing? Is it now legacy. Will Sun continue to prioritize it? Swing is highly pervasive, with millions of dollars of investment in projects inside banks and large organizations around the world.

For this important toolkit to be "mothballed" by Sun would be unthinkable (and yet there have been rumblings in that direction). While Sun hasn't categorically asserted that it will continue to develop Swing, your "legacy" Swing components will at least interoperate more or less seamlessly in your JavaFX scene graph.

And of course your Java classes can be called directly as well. JavaFX objects can implement Java interfaces, allowing you to reference them in your Java code - the code need not know that it has an alien entity in its midst.

For companies that decide to take the JavaFX route, this does at least mean that there's a fairly comfortable migration path. And the future of Swing seems fairly secure, at least for now.

Is JavaFX for you?

Regardless of who uses JavaFX, there is the worry that Sun has failed to recognize - or at least target - the real audience here. We're talking Visual Basic refugees and web developers who know a bit of JavaScript and who may be lured into trying JavaFX.

Another potential audience will be Swing refugees worried that their careers are about to hit a dead-end unless they move with the times. Also, there are developers who would like to use Java for a UI but are scared of Swing's complexity.

For any of these people, JavaFX will feel like a major step backwards until that mythical GUI editor is ready.

Then there are Adobe Flex and AIR developers. It's highly unlikely that this group will switch as long as they perceive Sun's offering as inferior. And currently, Flex offers a more compelling all-round platform and set of development tools. It could take a couple more releases for JavaFX to catch up.

The target audience may not be as technical as your standard Java developer. They'll expect a high level of integration, point and click development, and an easy way to download and install new UI components. Swing never had such a thing, and a third-party component market never emerged in the same way that it did for Visual Basic or Delphi.

Here's Sun's chance to get it right second time around: to create a searchable online marketplace with point-and-click install of third-party libraries and widgets. A component ecosystem. Once again, Sun is leaving this vital aspect of the product to pure chance, no doubt hoping that a charitable third-party somewhere will handle this for them.

For a 1.0 offering, there are some noticeable gaps. JavaFX for mobile is still nowhere in sight, there's still no GUI editor of course, and the Linux version isn't even appearing in the nightly builds yet.

But despite these concerns, the platform should have a bright future - as long as Sun can plug the gaps and bring the next update to market significantly faster than 1.0.

Matt Stephens co-authored Use Case Driven Object Modeling with UML: Theory and Practice, which illustrates how to create the ideal software design with Enterprise Architect, Spring Framework and JUnit.

Top three mobile application threats

More from The Register

next story
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Inside the Hekaton: SQL Server 2014's database engine deconstructed
Nadella's database sqares the circle of cheap memory vs speed
Oh no, Joe: WinPhone users already griping over 8.1 mega-update
Hang on. Which bit of Developer Preview don't you understand?
Microsoft lobs pre-release Windows Phone 8.1 at devs who dare
App makers can load it before anyone else, but if they do they're stuck with it
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
IRS boss on XP migration: 'Classic fix the airplane while you're flying it attempt'
Plus: Condoleezza Rice at Dropbox 'maybe she can find ... weapons of mass destruction'
OpenSSL Heartbleed: Bloody nose for open-source bleeding hearts
Bloke behind the cockup says not enough people are helping crucial crypto project
Ditch the sync, paddle in the Streem: Upstart offers syncless sharing
Upload, delete and carry on sharing afterwards?
prev story

Whitepapers

Top three mobile application threats
Learn about three of the top mobile application security threats facing businesses today and recommendations on how to mitigate the risk.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
SANS - Survey on application security programs
In this whitepaper learn about the state of application security programs and practices of 488 surveyed respondents, and discover how mature and effective these programs are.