Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of Java.

Similar presentations


Presentation on theme: "Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of Java."— Presentation transcript:

1 Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of Java APIs for developing applications for mobile devices.. – Since these APIs cannot run on a traditional Java Virtual Machine (JVM), – due to the limited size of mobile devices in regards to memory and resource availability, – J2ME defines a limited version of the JVM

2 Advance Computer Programming – Device manufacturers install and prepackage their devices with this JVM (and associated APIs). – As a developer, you only need to develop applications targeting these devices and install them – J2ME can be divided into three parts / layers Configuration Profile Optional packages

3 Advance Computer Programming

4 – A configuration contains the JVM and some class libraries. – profile builds on top of these base class libraries by providing a useful set of APIs – optional packages, an optional set of APIs that you may or may not use when creating your applications – Optional packages are traditionally not packaged by the device manufacturers, and you have to package and distribute them with your application

5 Advance Computer Programming – The configuration and profile are supplied by the device manufacturers and they embedded them in the devices. – The most popular profile and configuration that Sun provides are the Mobile Information Device Profile (MIDP) – Connected Limited Device Configuration (CLDC), – CLDC is for devices with limited configurations; for example, devices that have only 128 to 512KB of memory available for Java applications. – the JVM that it provides is very limited and supports only a small number of traditional Java classes

6 Advance Computer Programming – This limited JVM is actually called the KVM – Its counterpart, the Connected Device Configuration (CDC) is for devices with at least 2MB of memory available and supports a more feature-rich JVM but still not a standard JVM – The MID profile complements the CLDC configuration very well because it minimizes both the memory and power required for limited devices – It provides the basic API that is used for creating application for these devices

7 Advance Computer Programming – For example, it provides the javax.microedition.lcdui package – that allows us to create the GUI elements that can be shown on a (limited) device running the MID profile on top of a CLDC configuration – Note that MIDP cannot be used with CDC devices. CDC devices get their own set of profiles, like the Foundation and Personal profiles – The latest versions of MIDP and CLDC are 2.0 and 1.1,

8 Advance Computer Programming Java Virtual Machine layer – This layer is an implementation of a Java Virtual Machine – that is customized for a particular device's host operating system and supports a particular J2ME configuration

9 Advance Computer Programming Configuration layer – The configuration layer defines the minimum set of Java Virtual Machine features – Also Java class libraries available on a particular category of devices – a configuration defines the commonality of the Java platform features and libraries – that developers can assume to be available on all devices belonging to a particular category. – This layer is less visible to users, but is very important to profile implementers.

10 Advance Computer Programming Profile layer – The profile layer defines the minimum set of application programming interfaces (APIs) available on a particular family of devices. – Profiles are implemented upon a particular configuration. – Applications are written for a particular profile and are thus portable to any device that supports that profile – A device can support multiple profiles. This is the layer that is most visible to users and application providers.

11 Advance Computer Programming MIDP layer – The Mobile Information Device Profile (MIDP) is a set of Java APIs that addresses issues such as user interface, persistence storage, and networking. The Java Virtual Machine layer, configuration layer, and profile layer together constitute the Connected Limited Device Configuration (CLDC). The MID Profile and CLDC provide a standard runtime environment that allows new applications and services to be dynamically deployed on end-user devices.

12 Advance Computer Programming Programming J2ME with MIDP APIs – The combination of CLDC and MIDP provides a complete environment for creating applications on cell phones and simple two-way pagers. – The core of a MID Profile is a MIDlet application – The application extends the MIDlet class to allow the application management software to control the MIDlet – All MIDlets extend the MIDlet class – The MIDlet class provides APIs for invoking, pausing, restarting, and terminating the MIDlet application.

13 Advance Computer Programming – The application management software can manage the activities of multiple MIDlets within a runtime environment. – In addition, the MIDlet can initiate some state changes by itself – notify the application management software of those changes. The whole set of MIDP API classes can be broken down into two categories:

14 Advance Computer Programming MIDP APIs for the user interface: – These APIs are designed so that interaction with the user is based around a succession of screens – each of which presents a reasonable amount of data to the user – Commands are presented to the user on a per- screen basis – The APIs allow the application to determine what screen to display next, what computation to perform, and what request to make of a network service.

15 Advance Computer Programming MIDP APIs for handling the database – These APIs organize and manipulate the devices database – which comprises information that remains persistent across multiple invocations of the MIDlet. The underlying CLDC API is used to handle strings, objects, and integers. A subset of the Java 2 API is also provided to handle I/O and network communications

16 Advance Computer Programming Event handling in J2ME – In contrast to event handling on the desktop version of the Java platform, is based around a succession of screens – Each screen carries a certain small amount of data. – Commands are presented to the user on a per-screen basis – The Command object encapsulates the name and information related to the semantics of an action. – It is primarily used for presenting a choice of actions to the user

17 Advance Computer Programming – The resulting command behavior is defined in a CommandListener associated with the screen. – Each Command contains three pieces of information: a label, a type, and a priority – The label is used for the visual representation of the command. – the type and priority are used by the system to determine how the Command is mapped onto a concrete user interface.

18 Advance Computer Programming Designing the user interfaces – Although it maintains a constrained profile, the MIDP API provides a complete set of UI elements. The following are some of the most important ones: An Alert acts as a screen to provide information to the user about an exceptional condition or error. A Choice implements a selection from a predefined number of choices. A ChoiceGroup provides a group of related choices. A Form acts as a container for the other UI elements. A List provides a list of choices.

19 Advance Computer Programming A StringItem acts as a display-only string. A TextBox is a screen that allows the user to enter and edit text. A TextField allows the user to enter and edit text. Multiple TextFields can be placed in a Form. A DateField is an editable component for presenting date and time information. A DateField can be placed in a Form. A Ticker acts as a scrollable display of text.


Download ppt "Advance Computer Programming Market for Java ME The Java ME Platform – Java 2 Micro Edition (J2ME) combines a resource- constrained JVM and a set of Java."

Similar presentations


Ads by Google