Previous Next Title Page Contents

4 The Watch Example for MIDP

Mobile Information Device Profile (MIDP) is a set of Java APIs which provides a standard application runtime environment targeted at mobile information devices, such as cellular phones. The phone contains a Java virtual machine, and the user can download mini-applications as .jar files and run them on the phone. Application size is often restricted to 30kB, in particular for downloading applications over the air (i.e. as wireless data).

Such an environment provides an interesting application for the previously fictitious Watch example. It also presents a challenge: is the solution we developed for digital watches still viable if we extend the domain to include watch applications on a MIDP phone? Changes could be necessary on four levels:
The domain-specific modeling method and its metamodel
The models
The code generator
The framework code

A moment’s thought reveals that changes to the models (or certain changes to the metamodel which do not update models automatically) are the worst kind: many developers would potentially need to update many models. If the initial domain analysis has been good these can hopefully be avoided, or at least limited to backwards-compatible additions to support new functionality in the new platform.

Changes to the code generator or framework code will require only the metamodeler’s time, similarly for changes to the metamodel which automatically update relevant parts of the models. In particular, code generator changes can allow us to support a new platform with a fraction of the time normally needed — even though there are changes needed throughout the whole body of code.

First though we will set up and run the MIDP example, then return in Section 4.3 to look at what changes had been made to the original applet-based Watch to support MIDP.

Previous Next Title Page Contents