Saturday, December 18

BlackBerry Java Application Structure

BlackBerry Java applications is coded using the Connection Limited Device Configuration (CLDC) Application Programming Interface (API) which is in the Java Micro Edition. Application for BlackBerry devices also can use the Mobile Information Device Profile (MIDP) API that is built on top of CLDC and / or the BlackBerry APIs. For the terminology which is easier, then, "BlackBerry application using the BlackBerry API" will be called RIMlet, and, "Application using MIDP API" will be called a MIDlet.

The figure below illustrates the foundation of the BlackBerry application compiler. The top two blocks indicate that the BlackBerry application could be built on top of MIDP API or the Blackberry API. A BlackBerry application is only built on the MIDP API (commonly called a MIDlet) can not access the BlackBerry API, but not vice versa. By using BlackBerry API, you can create applications that are efficient, responsive, and more interesting because the BlackBerry API designed specifically for BlackBerry devices.


RIMlet and MIDlet have different life cycles. The life cycle of a RIMlet consists of initialization, an application entry point (with the function main()), and termination of application (with the function of System.exit()). For more details, please see the picture below.


MIDlet, in accordance with the specifications, has a life cycle as follows: inactive, active, paused, and Destroyed. Based on specific feedback, the code in the MIDlet application can tell the BlackBerry application management software to change the status of the MIDlet application. Some examples of feedback can be a user interaction on the BlackBerry device, change the date and time, boot up or shut down, and many more. MIDlet life cycle can be seen in thethe following figure.

1 comment: