Blog

Java in the Mobile Market: Google Android vs. JavaFX – Part 2: A Detailed Comparison

Florian Moritz
Florian Moritz
November 6th, 2009

After dealing with general market trends in part 1 of this blog series this second and final part provides a more detailed comparison of Google Android and JavaFX.

Google Android and JavaFX cannot be compared directly as they do not represent exactly the same technical construct. They both are, however, software platforms, for which applications can be created: Google Android is an operating system, whereas JavaFX is only a runtime environment that runs on an operating system (and even on Android). This means Android applications can only run on a Google Android operating system, but JavaFX applications can run on every operating system providing a JRE (Java Runtime Environment) – this can be a Java SE (standard edition) or Java ME (micro edition, limited extend compared to Java SE) or Java EE (enterprise edition, more complex and powerful compared to Java SE). Theoretically a JavaFX application could also run on Google Android, this has been successfully demonstrated on Java One 2008, but official support is not provided.

In addition it is not easy to compare the GUI architecture of both platforms, because Android applications are more integrated into the operating system and benefit from up-to-date GUI standards available on the new Android platform. JavaFX is new, but Java on mobile phones – mainly represented by Java ME – is anything but new on the market. Because of the huge backwards compatibility many compromises had to be made and the integration into a mobile operating system is much looser than it is on Android, which results in an advantage for Android in this respect.

The following paragraphs will contrast all comparable facts concerning numerous GUI topics, development aspects, compatibility, licensing or market situation.

Perspective for Google Android

The big advantage of Google Android is that it is a stand-alone operating system with a strong focus on individual developers who create a great diversity of applications for the platform. These apps can be bought or downloaded for free from Android Market, a store for Android apps, which is under continuous growth and also offers quite a lot free apps. The technology is new and up-to-date to today’s requirements and therefore doesn’t suffer from any backwards compatibility drawbacks. The alliance around Android has created a system from scratch, which means that engineers had the liberty of building a completely new environment. The information portal under android.com is quite well structured and offers a good entrance, for users and developers.

In addition, the integration of popular Google services such as Web Search, Mail or Calendar into the OS appeals to many interested client developers.

Optimized for mobile usage, Android, as a free operating system, can also be used on netbooks, which has been successfully proven [in German].

Concerning its GUI aspects, Android has a well-conceived Look and Feel architecture with a modern default look. Especially the font rendering and the default fonts are nice and brilliant. In addition, the available demos and examples generate a wave of enthusiasm particular among GUI developers. But the quality of GUIs is still a bit behind the possibilities of Apple’s iPhone. The choice of the Java language and Eclipse as an IDE was a great idea, because many developers are quite familiar with those. The GUI building process, on the other hand, could have been made easier by providing a more powerful WYSIWYG tool rather than designer-unfriendly XML structures. Regarding the GUI rendering and theme creation Android relies on pixel-based images for GUI component rendering, based on 9-slice-scaling, which provides high performance and at the same time nicely looking results. Also, the workflow between design and implementation when creating a theme is not optimized.

Most source code for the Android platform is published under a free license, but on the downside, several main parts are proprietary and under control of Google. In the USA or Germany, for example, when Android was introduced, only a few network operators offered Android phones. But new market tendencies show, that more and more Android phone become available through different hardware vendors.

Perspective for JavaFX

A main principle of Java is “Write once, run everywhere”, which is also applicable to JavaFX. JavaFX applications run on top of the latest version of the Java runtime environment of the respective system.

The main strength of JavaFX is its strong GUI orientation: JavaFX Script, the programming language of choice for creating JavaFX applications, establishes a new syntax, which is optimized for fast and intuitive GUI declaration. It has been built from scratch, with a completely new API in order to avoid restrictions from older Java based platforms. But exactly this new language also constitutes a risk, because developers have to be convinced of the new possibilities first and have to learn mastering them. Still, JavaFX Script code will be combinable with the plain old Java code as it compiles to native Java bytecode.

For JavaFX Mobile a Look and Feel architecture with UI components exists since version 1.2. It offers three different methods of defining a look and feel. For example Adobe Photoshop or Illustrator can be included into the process and component styles can be declared via CSS, but this approach is still in its infancy.

Development can be done with NetBeans IDE – a well-known IDE among Java developers with growing acceptance. The JavaFX plugin for NetBeans offers a live preview while coding GUI fragments, but no WYSIWYG mode with direct manipulation is provided, which is a drawback from a GUI designer’s perspective. The integration of Adobe Photoshop and Adobe Illustrator into the workflow is a great idea, because these are the most common tools designers working with. The concept of building UIs by describing all the graphical elements, has a major drawback concerning the API for mobile usage (common profile), because the graphical effects, like drop shadows, reflection or motion blur, are not available in this mode. Up-to-date and attractive looks are hard to realize without those effects, except that these effects are pre-rendered in Photoshop and integrated via 9-slice-scaling. A further drawback has been known for years among GUI designers: the font rendering. JavaFX does support anti-aliazing (a.k.a. font smoothing), but in a way that is not really convincing.

The 9-slice-scaling concept, which is a good practice, when painting pixel-image based components, can theoretically be done by describing the GUI with CSS, but the feature is only planned and not implemented, yet. Multi-touch can be used, as demonstrated on JavaOne 2008 (PDF).

All in all, JavaFX Mobile is based on long experience and advanced ideas, but the extend to which these two key ingredients were translated into solutions is not yet satisfactory today.

Java Me behind JavaFX

Java ME can be a good base and an entrance to make JavaFX apps run on older devices, because it is extremely widespread, but the user experience of today’s Java ME apps is quite awful and lags far behind modern GUIs. If Java ME shall have a chance in the future, using the nice GUI ideas of JavaFX is the only way to survive.

General Perspective

When having a final look Google Android and JavaFX Mobile, we can identify several strengths and weaknesses regarding chances for market success.

Device Compatibility

The strength of Android is its lack of backwards compatibility requirements and the resulting ability to focus on new powerful devices. The aim of JavaFX Mobile instead is to run also on older devices with Java installed, as Java ME is installed on about 85% of devices out there, today. This sounds great in theory, but on the other hand, those mobile devices mostly do not have the newest version of Java, which is required to run JavaFX apps and installing a new Java runtime on these devices is a major challenge for common users. Accessing the mass market with these precondition in the back seems to be difficult for JavaFX Mobile. But then again, the backwards compatibility issue might not be that hindering regarding market success, as users will probably purchase new phones, anyway – at least every two years (in Germany) when they renew their mobile phone contract.

Community

Comparing development communities, the one behind Android seems to be livelier. More and more apps appear on Android Market, which are created by interested individual developers or companies. The JavaFX Mobile community is small and more reserved, because the actual results that can be achieved with JavaFX technology do not really leave demo status. (JavaFX Mobile also plans to release a store concept called “Java Store”, which can be tested in beta status.) In this respect, Sun’s store obviously lags behind Google’s store. Furthermore the mailing list or forums concerning JavaFX show little, actually declining activity.

Where Do Apps Run?

JavaFX suffers from a more complex abstraction layer, because it is intended to run on a wide variety of hardware and operating systems. Once fully functional, however, this can be a great advantage, as it allows one implementation of an applications to run on many devices with different OS’s. This benefit does not exist with Android apps – at least not in this extend. (JavaFX apps even run – without official support though – on Android, but not vice versa, which underlines the “run everywhere” principle of JavaFX.)

Development with Android is bound to devices that run with the Android OS, which makes the whole process less complex, but also less flexible.

Designer-Developer Workflow

JavaFX brings the designer-developer-workflow into focus. This is achieved by trying to include the common designer tools Adobe Photoshop and Adobe Illustrator in the so called “Production Suite”. This approach of using vector-based graphics is a must have for future and resolution independent solutions. Android on the other hand banks on usage of traditional pixel images with 9-slice-scaling (or 9-patch-drawing as it is called by Google).

On the development side both competitors use common IDEs with Eclipse for Android and NetBeans for JavaFX, which is a lower barrier for developers getting in touch with a technology the first time.

Which Devices Are Out There?

Currently, Android seems to be further ahead in terms of readiness for daily use. The first Android based phones are available on market since about one year. The first phones were built by HTC, the G1 and the HTC Magic or G2. A third device with a new GUI and interaction concept has been released in July 2009, it’s called G2 Touch or HTC Hero. Today even some more devices with Android entered the market, e.g. the Samsung Galaxy. The HTC Hero shows, that the GUI architecture of Android is so well established that it can be changed visually from bottom up, and that main interaction concepts can be easily modified. For example the Desktop interaction, the dial pad or the main bottom taskbar are different compared to the default GUI used with G1 and G2. Finally, also Sony Ericsson decided to release an Android based phone, called Xperia X10.

There are no official “JavaFX devices” comparable to “Android phones”, but JavaFX can be tested on several platforms. For example, on JavaOne 2009 the HTC Diamond was sold with pre-installed JavaFX support. In addition, many new important devices, such as the iPhone or the HTC Magic, do not provide out of the box support for JavaFX and Java ME, which is an extremely limiting factor regarding JavaFX’s future perspective.

Google also announced to push its influence forward by releasing a new operating system, called “Google Chrome OS”. The Linux-based OS should primarily run on netbooks, but traditional desktop computers and laptops are an obvious next step. It’s almost safe to assume that applications for Android also might run on Chrome, so a market consolidation should be in reach with this second step into OS market.

Market Indicator: Mobile Internet

The statistics referred to in part 1 of this article show that the iPhone dominates the mobile browsing market. Android is just a bit behind but almost on par with Java ME – and in this context it has to be taken into account that Android is only available for months whereas Java ME has been around for years. If that trend continues, it can be assumed that Android will overtake Java on the mobile browsing market.

Alternative Approaches

Besides all market competitors that run on several platforms, including operating systems and runtime environments such as Java, Microsoft Silverlight, Adobe Flash etc., another “run everywhere” platform should not be neglected – the web browser. Browsers will be available on every mobile device of the future, because web pages need to be accessed in any case. So it is an obvious decision for application vendors to deploy their applications as web applications in a web browser, if they want to reach lot users with one implementation. Interestingly, Opera Mobile, one of the leading browsers on the mobile browser market, is written in Java, using Java ME. Google Android and iPhone are using their own browsers with Google Chrome and Apple Safari, respectively. With new versions of browser technology, including HTML 5 and CSS 3.0, GUI building facilities improve and more powerful and modern web-based GUIs will evolve. So the perspectives for browser based apps seam to stay excellent.

On the Java server-side, JSF (Java Server Faces) is another interesting technology in this environment that will be released in the second half of 2009 in version 2.0.

Conclusion

The evolvement of the market situation shows that Google Android will establish itself as platform on an increasing share of devices. The biggest competitor seems to be the iPhone, followed by Symbian based devices by Nokia, SonyEricsson, Panasonic and Samsung or BlackBerry and Palm. If JavaFX misses the opportunity of being present in the current heterogeneous market evolution, it will be amongst the first to lose the game.

Some conditions have to be met for JavaFX to survive on the mobile market: support on the iPhone, a stable and usable API and platform, other new devices with current versions of Java runtime, something like “JavaFX ready” phones along with a free open and easy store concept for downloading and installing JavaFX apps.

Below the line, the market chances for Google Android and JavaFX differ; Android is more established today, but JavaFX has a nice long term strategy with great ideas, whose success, however, is questionable considering the sluggishness that Sun demonstrates in terms of JavaFX’s market introduction.

All trademarks and product names used on this website are the properties of their respective owners and are used solely for descriptive purposes.

Want to know more about our services, products or our UX process?
We are looking forward to hearing from you.

Employee Experience Manager
+49 681 959 3110

Before sending your request, please confirm that we may contact you by clicking in the checkbox above.