Maybe it’s time I think again about the jvm

I would love to be able to learn and use a programming language and technology that performs efficiently,  helps me reuse my skills and  my code. I shouldn’t have to reinvent the wheel to make it happen on the server side, desktop, android, iOS and other mobile devices. Today’s programming languages are not specialized enough. And there is no reason to repeat ourselves.

At this time, I see two available options.

One option is JavaScript/html5. Even if I have nearly 10 years of experience in web development, it feels like a big hack. When good solutions emerge, it’s just a step closer to what native solutions were doing many years before. Making it right feels impossible, there is just too much wasted time on little details. Not only that building a prototype with storyboard on iOS/MacOS or android visual editor is way faster and you will be closer to the real thing.

The second option are multi-platform native technologies. One I tried recently is Qt. While qml supposedly makes it possible to code in JavaScript, it’s quite limited and the look & feel on mobile doesn’t really convince – it doesn’t look like a mobile app at all. Also there is Xamarin, which looks great, but as it doesn’t run on Linux, this is a deal breaker for some.

While looking  at Xamarin, it makes me wonder why the same AOT compilation is not available with the jvm (Java Virtual Machine).  As I was looking for an answer,  I found RoboVM. This means, it is actually possible to do AOT with the jvm and to run on any platform, including the most restricting one,  iOS. I also found that RoboVM is not alone, avian also offers this possibility.

Hence there is a third option, to use the jvm. It enables you to do server side application, client side application, mobile application, but also offers many other opportunities to reuse my AOT compilation skill. Like Xamarin, it is possible to build a small portion of code for the ui on iOS and Android, and share all the rest. Here is a tutorial to get started with eclipse and iOS with RoboVM.

This option also offer a different strategy, JavaFX. Oracle open source JavaFX for android and iOS. The source can be found for OpenJFX, the Android repo, iOS support in net beans, JavaFX on iOS is included with RoboVM. This is great news: the solution looks great and writing an application to target all platforms at once look easier than ever.

The jvm seems a real contender and when I say jvm that doesn’t necessarily mean Java. There is Scala, kotlin and fantom as excellent alternatives.

For more information:
I found this stackoverflow with many resource to use JavaFX on different devices
OpenJFX
What do you need in order to build and deploy JavaFX Applications on Android?
How to build Open JavaFX for Android

Advertisements

One thought on “Maybe it’s time I think again about the jvm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s