BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Codename One Adds Support for Java Apps to Target the Universal Windows Platform

Codename One Adds Support for Java Apps to Target the Universal Windows Platform

Codename One, a popular app development environment that allows Java to be used for a variety of platforms, can now also target the Universal Windows Platform. This will allow Java developers to target any device where Windows 10 is installed- whether phone, table or desktop- and raises the number of targetable platforms to eight.

In the world of mobile development, with a fragmented market of several competing platforms, developers often have to choose between two opposite options: develop native applications for each of the target platforms (iOS, Android, Windows Phone, etc.), providing an optimum user experience at the expense of higher development and maintenance cost, or develop a single solution for all platforms, usually in the form of a web application, making better use of time and resources but giving up the particular advantages of each different platform. At a middle point between these two options, there are tools like Codename One or Appcelerator, which attempt to provide a unified development experience while making use of some platform-specific capabilities.

Codename One users could, up to now, develop an application in Java, and without any modifications to the source code, create an installable package for iOS, Android, Blackberry, Windows Phone, JavaScript, J2ME and desktop. This was made possible by using build servers that can target all the different platforms in conjunction with bridge technologies like ParparVM, among others. On the other hand, Microsoft is taking a step towards device convergence with Windows 10 and its Universal Windows Platform: an application created for UWP can be installed and run in any device running Windows 10, either phone, tablet or PC. By combining both facts and allowing Codename One to target UWP, developers can make their applications installable in 300 million new devices.

Codename One makes use of IKVM.NET, an implementation of Java for Mono and the .NET Framework, to be able to target UWP. IKVM includes a .NET implementation of the JVM and the Java class libraries, together with tools for interoperability between Java and .NET. When targeting UWP, Codename One will compile and pack the Java application together with IKVM and configuration settings specific to Windows 10; this may not be as optimum as developing the application directly in .NET, but has the advantage of reusing the same source code.

Whether this approach will become mainstream remains to be seen. Although the argument of being able to target a myriad of platforms with the same source code sounds compelling, and judging by reactions to previous releases of Codename One, there seems to be a common sentiment among users in the community having very high expectations of an app, and developers tend to conclude that the only way to meet such expectations is by developing the app natively. If nothing else, making it easy to port existing Java apps into UWP will probably boost the number of apps available for Windows 10.

Rate this Article

Adoption
Style

BT