Surreal appeal of Sun's JavaFX for mobile

Java ME a safer bet?


Review It's somehow fitting that Sun Microsystems chose Barcelona, the home of modernist architect Gaudí and this week's Mobile World Congress, to announce JavaFX Mobile 1.0 - part of the JavaFX SDK 1.1 release.

Just like Gaudí's work, there's something wavy, colorful and even surreal about Sun's shining new hope for Java. I've never seen such a show of strength mixed with this much diffidence. Sun is evidently desperate for developers to like JavaFX.

Consistency of message, though, is not Sun strong point. Here it claims there exists 2.1 billion Java-based handsets, but here it's gone for 2.6b billion, adding that eight out of 10 cats, sorry handsets, shipped in 2008 were running Java technology. That's a discrepancy of some 500 million mobile phones.

But whichever data you subscribe to, it's a compelling notion that a brand-new, graphically oriented scripting language could have this kind of installed base already at launch.

Momentously, Sun has offered JavaFX 1.1 plug-ins for both Sun's own NetBeans platform and rival development ecosystem Eclipse. But there's still no sign of a GUI editor anywhere. Major lack of kudos to Sun until this vital component, which should have been there from the beginning, eventually arrives.

NetBeans does at least provide a Mobile Emulator, with two sample devices pre-installed: an FX Phone and an FX Touch Phone. The latter emulator is shown in the screenshot below, rotated counterclockwise - shades of iPhone envy there from Sun, methinks.

JavaFX Mobile emulator

If you can touch it like an iPhone, and turn it like an iPhone...

Another mobile demo impressively shows how Java Micro Edition (Java ME) now provides access to your mobile phone's accelerometer. Developers will soon be swinging their phones like Wiimotes while the garbage collector stutters to catch up.

To achieve this, the demo delves into the javax.microedition.sensor package, viz the following JavaFX code:

var sensors = SensorManager.findSensors("acceleration", null);

And then the function to get acceleration data (called by a Timeline every 100ms) is as simple as this:

function getData():Void {
    if(accelInfo.getDataType() == ChannelInfo.TYPE_DOUBLE) {
        var data: Data[] = accelConn.getData(1);
        axisX = data[0].getDoubleValues()[0];
        axisY = data[1].getDoubleValues()[0];
        axisZ = data[2].getDoubleValues()[0];
    }
}

This is a good example of how JavaFX gains much of its power by leveraging the underlying Java software stack. Other underlying phone features are similarly exposed, such as address book, Bluetooth, camera, messaging, location, and payment.

JavaFX Mobile apps will, in theory, run on existing Java ME phones, but will require an initial download of the new platform libraries. Sun, though, has been aggressively partnering with a number of handset, carrier and mobile software partners, including LG and Sony Ericsson - though notably not yet Nokia or Samsung - to preinstall the libraries on new phones.

A major criticism of Java ME has always been the fragmentation. It's never been possible to simply write a Java ME midlet, test it on a few phones, and safely assume that it'll therefore run everywhere. Hacks and workarounds need to be factored in for pretty much each model you want to support.

Broader topics


Other stories you might like

  • Alcatel-Lucent Enterprise adds Wi-Fi 6E to 'premium' access points
    Company claims standard will improve performance in dense environments

    Alcatel-Lucent Enterprise is the latest networking outfit to add Wi-Fi 6E capability to its hardware, opening up access to the less congested 6GHz spectrum for business users.

    The France-based company just revealed the OmniAccess Stellar 14xx series of wireless access points, which are set for availability from this September. Alcatel-Lucent Enterprise said its first Wi-Fi 6E device will be a high-end "premium" Access Point and will be followed by a mid-range product by the end of the year.

    Wi-Fi 6E is compatible with the Wi-Fi 6 standard, but adds the ability to use channels in the 6GHz portion of the spectrum, a feature that will be built into the upcoming Wi-Fi 7 standard from the start. This enables users to reduce network contention, or so the argument goes, as the 6GHz portion of the spectrum is less congested with other traffic than the existing 2.4GHz and 5GHz frequencies used for Wi-Fi access.

    Continue reading
  • Will Lenovo ever think beyond hardware?
    Then again, why develop your own software à la HPE GreenLake when you can use someone else's?

    Analysis Lenovo fancies its TruScale anything-as-a-service (XaaS) platform as a more flexible competitor to HPE GreenLake or Dell Apex. Unlike its rivals, Lenovo doesn't believe it needs to mimic all aspects of the cloud to be successful.

    While subscription services are nothing new for Lenovo, the company only recently consolidated its offerings into a unified XaaS service called TruScale.

    On the surface TruScale ticks most of the XaaS boxes — cloud-like consumption model, subscription pricing — and it works just like you'd expect. Sign up for a certain amount of compute capacity and a short time later a rack full of pre-plumbed compute, storage, and network boxes are delivered to your place of choosing, whether that's a private datacenter, colo, or edge location.

    Continue reading
  • Intel is running rings around AMD and Arm at the edge
    What will it take to loosen the x86 giant's edge stranglehold?

    Analysis Supermicro launched a wave of edge appliances using Intel's newly refreshed Xeon-D processors last week. The launch itself was nothing to write home about, but a thought occurred: with all the hype surrounding the outer reaches of computing that we call the edge, you'd think there would be more competition from chipmakers in this arena.

    So where are all the AMD and Arm-based edge appliances?

    A glance through the catalogs of the major OEMs – Dell, HPE, Lenovo, Inspur, Supermicro – returned plenty of results for AMD servers, but few, if any, validated for edge deployments. In fact, Supermicro was the only one of the five vendors that even offered an AMD-based edge appliance – which used an ageing Epyc processor. Hardly a great showing from AMD. Meanwhile, just one appliance from Inspur used an Arm-based chip from Nvidia.

    Continue reading

Biting the hand that feeds IT © 1998–2022