Comparing LWUIT and JavaFX Mobile
- Also check out the LWUIT blog. In the comment section Shai talks about specific technical differences (search for "LWUIT Differs from Java FX")
Open sourcing LWUIT last week has created a lot of buzz - the response has been phenomenally positive. We've also gotten a few questions regarding the relationship of LWUIT and the upcoming JavaFX Mobile platform - there still seems to be a bit of confusion here. So I thought it would be useful to devote a "FAQ" blog entry to this topic.
FAQ: LWUIT vs. JavaFX Mobile
1. What is LWUIT?
LWUIT (Lightweight UI Toolkit) is a UI toolkit library for Java ME.
LWUIT is aimed at current Java MIDP and Swing developers who are looking to enhance the interfaces of new or existing Java ME applications on MIDP 2.0 devices. LWUIT offers pre-made graphical functions and features that developers can quickly and easily assemble into a compelling interface. LWUIT allows developers to worry less about the building blocks and instead focus on a consistent and richer interface across phones. As a binary library that developers simply deploy together with their applications LWUIT works on the vast majority of today's mobile phones and platforms supporting MIDP 2 (including Windows Mobile as described here) as well as MSA devices going forward.
In short, LWUIT is the solution for building attractive and engaging applications on mass-market devices today.
2. What is JavaFX Mobile?
JavaFX Mobile is a Java ME platform with the JavaFX runtime (including JavaFX Script) on top of it.
JavaFX Mobile is targeted at developers, designers, and scripters who are looking to create very rich, very immersive experiences across the "screens of your life" (phone, desktop, TV, etc.). The amount of interactivity, animation, and control over the user's screen brings a new level of functionality to devices. Java FX Mobile requires MSA-enabled platforms which comprise the small but growing higher end of the mobile space - smart phones and high end feature phones.
JavaFX uses JavaFX Script, a declarative statically typed scripting language that allows people to build out interfaces by describing the functionality that they want to see, instead of building it from the ground up. This lets them think creatively and be creative. JavaFX includes scalable fonts, 2D graphics, rich animations, integrated audio and video, and as noted, you can build apps that will run across all the screens of your life. In addition, with JavaFX, you can use design tools like Photoshop and Illustrator to build out graphical elements and even entire interfaces that you can directly build into and manipulate within JavaFX. This lets the designers and developers work much more closely and efficiently together.
In short, JavaFX Mobile is the next quantum leap for the mobile Java platform - coming to devices in 2009.
3. When do I want to choose LWUIT over JavaFX Mobile or vice versa?
LWUIT focuses on improving the UI experience on today's mass-market phones. If you have an existing MIDP application that you would like to spruce up or you need to create an attractive new application targeted for todays MIDP 2 and MSA devices then LWUIT is your ticket.
If you're looking to the future and you want the dynamic capabilities and ease of development of the JavaFX Script language as well as immersive media and graphics then JavaFX Mobile is what you'll want. The JavaFX Preview SDK is available now so you can start experimenting with FX Script today and get ready for when JavaFX Mobile becomes available.
4. Does LWUIT compete with JavaFX Mobile?
Superficially, there are some similarities as both of these products address a better and more compelling user interface for mobile and other devices. But it should be clear from the above that there's really two target audiences and device profiles that are being addressed. Furthermore, since LWUIT will continue to run on MSA-compliant platforms (MIDP 2 is a required component of MSA) LWUIT will not be obsolete when JavaFX Mobile becomes available.
In short, having both options available makes the life of developers easier because they can choose the model that fits their requirements best and create compelling content for Java ME today and the future.
Hope that clears it up. Cheers,