I regularly come across companies asking me if their application is possible to write in Java ME. It often comes as an afterthought but they usually also say,"…and across all devices". It’s this last thing that’s impossible to achieve and I usually explain that while it’s usually easy (and inexpensive) to support one phone type, the effort, testing and cost escalates when supporting a large number of device types.
However, Shai Almog, one of the developers of the new Lightweight UI Toolkit (LWUIT) has an interesting post asking "Is Device Fragmentation Still Relevant?".
The premise is that newer CLDC 1.1 phones, from say the last three years, are much improved now. If you avoid older phones and write code that adapts rather than relies on the pre-processor (switched sections of code for each device type for you non-programmers), it’s possible to support a large number of phones with just one version of the application.
Shai’s take on this is as follows..
"Claim: You can’t guarantee all devices.
No one can.
Pre-processor calls can always be added if push comes to shove, in current devices though I think there are far better solutions. Even with pre-processor I would never commit to every device using every firmware for anything overly elaborate with full functionality. I saw quite a few companies making such commitments and they are just not realistically achievable, you cannot guarantee support for all devices no matter what you do!"
My view on this is that applications should be specified (device types and functionality) around what’s possible for a sensible amount of effort and cost. In the same way that some after market car accessories don’t fit every car ever produced, we should not expect after market applications to fit every phone.
I agree with Shai that we should question the Java device fragmentation mantra. With a sensible device support choice it’s possible to reach a very large number of phones without resorting to a web browser approach that (currently) provides much less usability and functionality.