Feeds

Sun to lose lunch money on JavaFX

Opens wallet to tough kids

Choosing a cloud hosting partner with confidence

The new language has at least one major plus point. Swing components and their attributes are hidden inside pretty declarative wrapping, so the SimpleLabel tag wraps a Swing JLabel, TextField wraps a JTextField, and so on. JavaFX code compiles down to Java bytecode and co-exists with Java very easily.

Unfortunately, this area doesn't win a gold star due to what appears to be lazy grammar coding. The parser doesn't understand context too well, so keywords such as "insert" must be escaped, as in this example from the Planet JFX site I linked to earlier:


import javax.swing.JTextArea;

var textArea = new JTextArea();
textArea.<<insert>>("Hello", 0);

There are other plus points, though. These include the first-class functions for callbacks (which compile down to anonymous inner classes) and expression-based binding of GUI elements to dynamic/calculated values. The ease with which you can bind UI components to a database back-end is just awesome.

The decision to use a nice, clean JSON-like declarative syntax instead of XML was a brave one, but a good one. It means your scripts will actually be readable (which is lucky given the current lack of decent tool support).

Declarative does not have to automatically mean XML. However, there's no reason why there shouldn't also be an exactly interchangeable XML dialect.

For example:


import javafx.ui.*;

Frame {
  title: "Die, Ajax! - Hello World"
  visible: true
}

Is the same as:


<someroot>
  <import>javafx.ui.*</import>
  <frame title="Die, Ajax! - Hello World" visible="true" />

</someroot>

This interoperability would make it easier for XML tools to produce and consume .fx files, which would be a good thing for obvious reasons.

JSP has this capability and HTML of course has XHTML. Flex and Silverlight, meanwhile, go the other way and only use XML (MXML and XAML respectively). Not having an XML dialect is just really stupid - there's no other word for it. It's as if the last decade of XML development never happened.

Given that JavaFX is denied access to the world of XML tools, which might have helped those interested in using the language, you would hope that its home-grown tools support is therefore second to none. But it isn't.

I'll tackle the JavaFX tools market - and how this may affect the technology's chances in the highly competitive RIA field - next time.®

Matt Stephens is co-author of Use Case Driven Object Modeling with UML: Theory and Practice, which illustrates how to get from use cases to source code and tests, using Spring Framework, JUnit and Enterprise Architect.

Business security measures using SSL

More from The Register

next story
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
Not appy with your Chromebook? Well now it can run Android apps
Google offers beta of tricky OS-inside-OS tech
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
Greater dev access to iOS 8 will put us AT RISK from HACKERS
Knocking holes in Apple's walled garden could backfire, says securo-chap
NHS grows a NoSQL backbone and rips out its Oracle Spine
Open source? In the government? Ha ha! What, wait ...?
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.
Security and trust: The backbone of doing business over the internet
Explores the current state of website security and the contributions Symantec is making to help organizations protect critical data and build trust with customers.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.