Friday, November 7, 2008

Is Device Fragmentation Still Relevant?

Portability across devices was certainly a larger issue in the early days of J2ME and probably still is when developing demanding games.  However, in the case of other applications running on the modern smartphones based on CLDC 1.1/MIDP 2.0, portability is a matter of careful programming and thoroughly reading specifications.  The so-called porting solutions were needed for very old phones (i.e. based on J2ME CLDC 1.0/MIDP 1.0) that no longer exist or due to bad programming practices by people who did not understand the specs or the Java language itself.

Furthermore, many of the differences in device characteristics such as varying screen sizes, key codes and device APIs can often be classified by using device frameworks.  There are several useful J2ME frameworks available such as J2MEpolish (http://devices.j2mepolish.org/interactivedb/searchdevices.faces) and WURFL (http://www.wurflpro.com) that provides the required device information to greatly facilitate porting efforts.  When porting an application to many devices, you need to maintain different sets of resources (i.e. images) for the device main screen size family running with the same code and you need to know the key code variations.  This is where the tools such as J2MEpolish and WURFL are extremely useful.

However, the portability issues are still prevalent though when you need to sign a J2ME application so that it can access some of the sensitive J2ME APIs such as SMS, network, and camera APIs.  There are no common set of root certificates you can rely on to sign your application, and the MIDP spec is somewhat ambiguous as it states that a signed application whose certificate cannot be verified must not be installed, whereas an unsigned application can be installed, but warns the user for every sensitive operation.  As a result, you need to know what root certificates are on what device manufacturer phones in order to provide a signed application if you know that it can be verified, or an unsigned application if you don't know what certificates are installed on the phone in question.

Bookmark and Share

No comments: