he promise of write-once-run-anywhere is arguably more attractive and far more economically advantageous for developers targeting mobile devices; mobile hardware is so diverse that cutting development time by writing one version of the applicationmobile developers' holy grailis highly desirable. In practice, however that quest is rarely achievable, but you can minimize the time and effort necessary to target multiple devices if you plan ahead.
No application design decision is more apparent to your customers or target audience than the user interfaceand the user interface is potentially the most difficult to address in a wireless application. Although the MIDP profile provides a standardized environment on which to write applications and a set of classes to help you create user interfaces, the actual availability, appearance and functionality of interface widgets varies substantially from device to device, even between different device models. Further, environment constraints, such as memory, screen real estate, and persistent storage availability, inevitably prevent you from displaying large amounts of data on a screen.
This article presents some of the concerns, pitfalls, and obstacles in creating a user interface for an application expected to run on diverse devices
|Author's Note: Although I prefer working with IBM's WebSphere Studio Device Developer. I like to use Sun's Wireless Toolkit version 1.4 to further test my applications. I used the wireless toolkit and a simple text editor to create the project for this article, making extensive use of the toolkit's memory and network monitoring facilities. The toolkit also comes with a very complete UI Demo application that you can use to see all of the UI widgets discussed in the first part of the article. You can also use this application to see how different user interfaces look on different devices.
Because this article focuses on UI problems, I didn't worry too much about network data access or data parsing, but in real-world applications intended for a variety of devices you should try to minimize the total size of the application and memory use.