Technical Overview
Together SUN and Orange have worked to produce this set of guidelines for Java ME Platform programming that aim to reduce the practice of generating a distinct executable version (jar file) of an application for each and every phone. This practice of creating so many versions is not only costly and wasteful of resources it is confusing to the end user and it inhibits the growth of the market for Java ME Platform. These guidelines look at some of the causes of fragmentation, and offer suggestions as to how an application may be written to achieve the optimal balance of application performance and coverage of a large number of phones. So, to use these guidelines, look at the capabilities that your application needs, for example screen output. Look at the guidelines for re-sizing images, determine what tolerances will work for your application, and apply the techniques to use one image to cover a range of varied screen sizes where the variation is relatively minor. The same can be done to cover different keypad inputs. Generating one version to cover all phones is unlikely, but the fewer versions means a wider market and lower costs. So to maximize the number of compatible devices per version, identify the platform and context that is relevant to the application. Then, for each point of variability, choose the technique to handle it. There is no general rule for selecting variability handling techniques, since some techniques may have different impact on different kind of applications. Techniques for de-fragmentation
In presence of a context or device variation likely to impact the number of versions of an application, we have identified six main options to work around it:
Sun and Orange have produced these guidelines to implement these techniques. Not all the techniques always apply to all the causes of fragmentation, some techniques are irrelevant for some variation points. Source code pre-processing - PP This technique mainly consists of generation of several compilation ready source codes from a single pseudo source code root. Pre processing tools (like CPP for C/C++ in Unices) allows building target specific executables using conditional compilation. More advanced techniques exist, mainly Aspect Oriented Programming (AOP). Linking - LINK This technique consists of building an abstraction layer hiding the variability points and provides target specific re-implementations of the abstracted sub-components. We call this technique LINK, because in C/C++ fashion fragmentation is resolved at object linkage time, which is Java ME Platform turns out to be building of the JAR file. Re-implementation - IMPL This technique consists in a consistent re implementation the software component showing the variable behaviour. In the Java ME Platform, the main usage of this technique is re implementation of a small GUI on top of the Canvas item. It is sometime combined with LINK when the re-implementation is varies form one target to another. Abandon - Drop This technique consists of abandoning the feature of the application relying on the functionality showing the fragmented behaviour. In the Java ME Platform, the main usage of this technique is abandon of sound. Subjective Initiated Adaptation - SUBJ Subjective initiated adaptation of runtime behaviour of the application against the platform is the techniques where the application is alone capable to query the platform particularities and adapt to them. In the Java ME Platform, a simple example usage of this technique is adaptation to screen size. Objective Initiated Adaptation - OBJ Subjective initiated adaptation of runtime behaviour of the application against the platform are the techniques where the application needs to be indicated by an external information what runtime behaviour it had to adopt in order to adapt to device particularities. In the Java ME Platform, a simple example usage of this technique is soft key codes. Proposed Approach A developer willing to maximize the number of compatible device per version must identify the platform and context variability points which are relevant to the application. Then, for each of those variability points, the right variability handling technique must be selected. There is no general rule for selecting variability handling techniques, since some techniques may have different impact on different kind of applications. Design Guidelines Index
Copyright 2006 Sun Microsystems, Inc. and Orange SA All Rights Reserved. | |||||||||||
|
| ||||||||||||