A J2ME Tip on Binary Compatibility.

| No Comments

Recently, the CEO of a well-known software company that's diversifying into mobile applications explained how his developers are having difficulties with the write-once, run-anywhere promise of Java. After writing an application that should supposedly run on any J2ME-based MIDP-compliant (Mobile Information Device Profile) device, his developers discovered that all such devices are not created equal. One device, (Motorola's i85s phone) allowed up to eight characters for labeling the functionality of the device's buttons. A newer device (Motorola's i95cl Color Java phone) only allowed for seven. As a result, the program that worked fine on one device had its button labels truncated on the other. [David Berlind in "Binary compatibility: Holy grail or red herring?"]

Just an FYI for all of you who have not studied with J2ME or just missed it in the fine print-- Sun sanctions, but not encourages, the breaking of write one, run anywhere (WORA) ideal in J2ME. Anyone who has developed for devices know that their feature sets can be vastly different -- even in a single product category like mobile phones. Therefore J2ME is made up of varying device class profiles such as the Mobile Information Device profile (MIDP) for mobile phones and low end PDAs. (Would you want to package Interactive TV APIs in a mobile application?) Sun also allows for OEM specific APIs to be bundled in addition to the standard API in each device class profile such as MIDP. This allows a developer to make choices between compatibility or optimize for the devices capabilities throughout. Device class profiles and OEM APIs are understandable because capturing all of the differing requirements of all devices and make it work in very constrained places would be an exercise in futility.

Its still not binary compatability -- an ideal we strive for, but can never fully achieve. Its also not an "insidious problem" in J2ME, but rather the nature of the device space.

The developers of the nameless company he references used OEM specific APIs by Motorola and suffered the drawbacks of doing so. Shame on them if those developers didn't properly educate their CEO on that point. What is perplexing is that the phones are produced by the same OEM (Motorola) and was poorly designed.

With proper and thoughtful design utilizing a Model-View-Controller (MVC or Model 2) pattern, a certain amount of compatability can be achieved with J2ME code. How much depends on the design and the situation.

Leave a comment

About this Entry

This page contains a single entry by Timothy Appnel published on August 21, 2002 4:10 PM.

My Ideal Markup Editor Component -- A Discussion Starter. was the previous entry in this blog.

The Strange Pleasures of J2ME. is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.2rc2-en