Magazine
 
Quick Review:Ajax
 
Cross-platform programming with Java technology and the IBM Web Services Toolkit for Mobile Devices
 

Therefore, the code for the Palm and Pocket PC device becomes slightly more complicated with the addition of a secondary thread used only to make the HTTP connection. The code in the sample programs shows how this is done. However, if you don’t plan to deploy your application to the BlackBerry platform, you won’t need to worry about this issue.

Conclusion

Writing one Java application that will run intuitively for the user on Palm OS4, Pocket PC 2002, and BlackBerry OS 3.2 platforms is not as straightforward as desktop or server Java programming. The MIDP environment is not as robust as J2SE or J2EE, and the differences among devices can play havoc with your cross-platform plans. You need to take care to ensure that the GUI controls you use work properly and somewhat consistently on each deployed platform. In addition, the user interface requirements must not exceed the various devices’ capabilities.

To some extent, you must take a least-common-denominator approach and work around the various characteristics and limitations of your target devices to create an application that is usable on each of them. In addition, you might have to add complexities that are unnecessary on some platforms in order to satisfy the requirements of others. For example, the addition of a secondary thread for HTTP connections for BlackBerry OS platforms makes code more complex than necessary for Palm OS4 and Pocket PC 2002 devices.

In the end, it is worth putting in the additional work and complexity to have one application run on multiple devices. Doing so reduces code maintenance and the time and effort needed to track multiple versions of the same application. Furthermore, this approach takes advantage of the cross-platform features of the Java programming language. Over time, as J2ME and MIDP improve, the differences between the various MIDP implementations and their behavior on the various devices will diminish. This will result in an easier and more straightforward path to cross-platform J2ME and MIDP development.

June 2008 | Java Jazz Up |38
 
previous
index
next
 
 
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,

30
, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,   Download PDF