Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Java ME Design Guidelines Reduce Porting, Testing, and Maintenance Costs

Java ME Design Guidelines Reduce Porting, Testing, and Maintenance Costs


To help minimize the cost of developing Java ME applications for multiple platforms, Sun and Orange have teamed up to create a set of design guidelines that help developers simplify cross-device development. The goal is to reduce pattern of generating an executable for each device.

The guidelines focus on the following six techniques for de-framentation:

  • Incorporate target specific source code fragments and use a pre processor to generate target specialized builds. We call this technique pre processing (PP)
  • Write an abstraction layer and target-specialized sub-components. We call this technique linking (LINK).
  • Re-implement the software component with the variable behaviour. E.g. a small GUI on top of the Canvas item. We call this technique re-implementation (IMPL)
  • Abandon usage of the software component with the variable behaviour. We call this technique drop (DROP).
  • Application determined runtime adaptation (subjectively initiated adaptation - SUBJ) e.g. to query the platform particularities and adapt to them, such as screen size.
  • Data-driven runtime adaptation (objectively initiated adaptation - OBJ) e.g. soft key codes.

The guidelines discuss when features should be abandoned in order to minimize fragmentation as well as how to handle HTTP temporary redirection robustly. The six techniques are then applied to the different aspects of J2ME development, including:

  • Platform: supporting both MIDP 1.0 and 2.0 as well as localization
  • Screen: Sizing, color, GUI capabilities
  • Input: Handling different keys, key assignment, and keypads
  • Memory: Use of memory, RMS, reducing jar size
  • Multimedia: MEDIA file support on different devices, querying for supported media types, etc
  • Connectivity: Connections, implementing networking, single or multiple HTTP connections, HTTP temporary redirection
Tools that exist to help with the fragmentation problem include the Netbeans Mobility Pack, EclipseME, and J2ME Polish. The EclipseME blog has a recent post talking about some of the preprocessing work they're doing.  J2ME Polish is due out with version 2.0 very soon, they are currently in 2.0 Beta 3.  Version 2.0 will include numerous enhancements to help avoid fragmentation.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p