Java ME Guideline: Profile - MIDP versions

Design Guidelines - General IntroductionDesign Guidelines - Technical Overview 

  1. Problem Description
  2. Solution Description
  3. List of Affected Devices
  4. Keywords
1. Problem Description

An application designed for the largest possible number of MIDP devices must be available for MIDP 1.0 (JSR 37) and MIDP 2.0 (JSR 118). In many countries, the number of MIDP 1.0 devices is still significant, as well as the number of downloads on these platforms, this volume cannot be neglected.

Use Cases

Mass market applications such as games, browsers, content players or communication tools may require MIDP 1.0 versions. Specialized business application tend to have a limited range of target devices, most of the time high end, they do not need to target almost all devices.

2. Solution Description

This Design Guideline suggests not to try and mask Profile differences within the code of the application but rather to develop 2 versions for the different profiles.

Solution Requirements

The application design requirements must not critically rely on advanced features beyond the scope of MIDP.

Solution Approach

PP/LINK - Fragment the application into versions. Develop one version per MIDP version. Differences between MIDP 1.0 and MIDP 2.0 are significant and numerous. If both MIDP 1.0 and MIDP 2.0 are targets, reduce features to the MIDP 1.0 set is often too restrictive since many application improvements are possible in MIDP 2. Feature reconciliation is painful and complex. Knowing that the MIDP ecosystem is fragmented, one need to chose the right fragmentation points reduce the number of versions (to reduce maintenance and porting costs) and increase compatibility. MIDP 1.0 to MIDP 2.0 is a valid fragmentation point.

Solutions Overview

Having two application versions, one for each MIDP version being accepted and incorporated in the application design from the beginning, one must select between the following approaches for each feature diverging from one version to another:

  • Pre-processing. Most of the time the code difference between the versions is extremely small, however it tends to be spread in many different places of the applications. This indicates pre-processing should be selected to create the versions. The good old C pre-processor, cpp is perfectly capable of doing the job. However, modern IDE embed a powerful pre-processor, Netbeans one is specially efficient and easy to use.

  • Target specific classes. Each version will probably have specific classes, mainly back port of MIDP 2.0 features into MIDP 1.0 or additional helpers for MIDP 2.0 specifics. Be careful not sharing code across target specific classes as it indicates a presumably hard to maintain and design.

  • Abstraction layer. Some features may abstracted out of their MIDP version details, be careful to provide the same API for MIDP 1.0 and MIDP 2.0 versions in order to contain fragmented code to the implementation of the abstraction layer.
Alternative Solutions

One can also imagine hard code the maximum number of connections in the JAD file, retrieve it from the network or even hard code a small database of values inside the JAR of the application.

Examples, Illustrations


Additional Information


3. List of Affected Devices

The devices in table are most popular MIDP 1.0 devices in North America and Western Europe by mid 2006. Most other popular device is expected to be compatible with MIDP 2.0 (without taking into account RIM BlackBerries, which are a different target).

Brand Model
Audiovox CDM-8450SP
Audiovox CDM-8920
Audiovox CDM-9950SP
LG PM-225
LG PM-325
LG VI-125
Nokia 3410
Nokia 3650
Nokia 3660
Nokia 7600
Nokia N-Gage
Samsung SGH-E630
Sanyo SCP-5500
Sanyo PM-8200
Sanyo SCP-5400
Sanyo SCP-7300
Sanyo SCP-8100
Sharp TM150
Siemens C61
Siemens CF62T
Siemens M56
Toshiba VM4050
4. Keywords

MIDP 1.0, MIDP 2.0

Copyright 2006 Sun Microsystems, Inc. and Orange SA All Rights Reserved.
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
Java 8 banner (182)