Feeds

Sun to lose lunch money on JavaFX

Opens wallet to tough kids

7 Elements of Radically Simple OS Migration

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.

Endpoint data privacy in the cloud is easier than you think

More from The Register

next story
PEAK LANDFILL: Why tablet gloom is good news for Windows users
Sinofsky's hybrid strategy looks dafter than ever
Leaked Windows Phone 8.1 Update specs tease details of Nokia's next mobes
New screen sizes, dual SIMs, voice over LTE, and more
Fiendishly complex password app extension ships for iOS 8
Just slip it in, won't hurt a bit, 1Password makers urge devs
Mozilla keeps its Beard, hopes anti-gay marriage troubles are now over
Plenty on new CEO's todo list – starting with Firefox's slipping grasp
Apple: We'll unleash OS X Yosemite beta on the MASSES on 24 July
Starting today, regular fanbois will be guinea pigs, it tells Reg
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Cloudy CoreOS Linux distro declares itself production-ready
Lightweight, container-happy Linux gets first Stable release
prev story

Whitepapers

7 Elements of Radically Simple OS Migration
Avoid the typical headaches of OS migration during your next project by learning about 7 elements of radically simple OS migration.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
Solving today's distributed Big Data backup challenges
Enable IT efficiency and allow a firm to access and reuse corporate information for competitive advantage, ultimately changing business outcomes.
A new approach to endpoint data protection
What is the best way to ensure comprehensive visibility, management, and control of information on both company-owned and employee-owned devices?