In my last post I compared SMS and WAP applications, now I'll write about WAP and J2ME applications. J2ME (Java 2 Micro Edition) provides a platform for you to download, install and execute programs in your mobile phone. Unlike WAP applications, the user needs to download the J2ME mobile application (called a MIDlet) through the WAP browser like this:
(1) The user clicks on the WAP browser on the phone, enters a URL to the MIDlet. (2) After downloading the MIDlet, the phone prompts the user to install the MIDlet, the user says OK. (3) Once the MIDlet is installed, an icon appears on the phone. The user clicks the icon to launch the MIDlet.
The user interface for a J2ME application is similar to a WAP application -- the user may use the joystick or navigation keys to point and click at the options on the screen, which will cause network requests to be transmitted to the server. However J2ME offers some features not found in WAP:
- Interactivity: The J2ME application has full control over the phone display and input. The application may render text and graphics (even individual pixels) dynamically, and handle input from the joystick or navigation keys, without having to transmit a request to the server. With WAP you are limited to simple layouts of text, images and input controls.
- Error Handling: If the network connection drops when a WAP application transmits a request to the server, the user will see an unfriendly error message (e.g. "Couldn't reach the indicated web server"). The message is generated by the WAP browser -- you have no control over it. With J2ME the application is able to catch these errors and display a helpful message. The application may even attempt to retransmit the request.
- Offline Usage: WAP applications work only when the phone is connected to the mobile data network, since the WAP browser relies on a WAP server to provide the WAP content. J2ME applications may be used without connecting to the mobile data network. Data storage space in the phone is available to J2ME applications, so it's possible for the applications to store data into the phone temporarily and transmit the data to the server when the mobile data network is connected.
So if you need absolute control over the user interface, proper error handling and/or offline usage, you should use J2ME and not WAP. However you should be aware that there are some phones that don't support J2ME, and the installation of J2ME applications is somewhat cumbersone for users.