Programming Wireless Devices with the Java 2 Platform, Micro Edition

Programming Wireless Devices with the Java 2 Platform, Micro Edition

by Roger Riggs, Riggs, Mark Vandenbrink
     
 
This book presents the Java™ 2 Platform, Micro Edition (J2ME™) standards that support the development of applications for consumer devices such as cell phones, two-way pagers, and wireless personal organizers. To create these standards, Sun collaborated with such consumer device companies as Motorola, Nokia, NTT DoCoMo, Palm Computing, Research In Motion,

Overview

This book presents the Java™ 2 Platform, Micro Edition (J2ME™) standards that support the development of applications for consumer devices such as cell phones, two-way pagers, and wireless personal organizers. To create these standards, Sun collaborated with such consumer device companies as Motorola, Nokia, NTT DoCoMo, Palm Computing, Research In Motion, Siemens and many others. The result is a highly portable, small-footprint application development environment that brings the unique capabilities of Java technology, including platform independence and enhanced security, to the rapidly growing wireless market.

This definitive Java™ Series guide provides a programmer's introduction to the Java 2 Platform, Micro Edition. It presents a general description of wireless technology, an overview of the J2ME platform, and information on the small-footprint K Virtual Machine. In addition, the book details the Connected Limited Device Configuration (CLDC) and the Mobile Information Device Profile (MIDP), the standards which define the Java platform features and libraries for wireless, resource-constrained devices.

Key topics include:

  • Overview of the Java 2 Platform, Micro Edition (J2ME)
  • Goals, requirements, and scope of the CLDC and MIDP standardization efforts
  • High-level CLDC and MIDP platform architecture, including the security model
  • CLDC application model, and compatibility with the Java programming language and virtual machine specifications
  • Class libraries supported by the CLDC standard
  • MIDP application model
  • MIDP libraries, including user interface, networking, and persistence APIs

Numeroussample applications illustrate how to put the technology and standards to work, including a PhotoAlbum application, an AddressBook application, and a Sokoban game application.

Written by a team of authors that includes the original J2ME technology experts from Sun and Motorola, this book provides both a description of the Java 2 Platform, Micro Edition, as well as practical implementation advice.



Editorial Reviews

Booknews
This book offers an overview of the Java 2 Platform, Micro Edition. It describes standards that support the development of applications for cell phones, two-way pagers, and wireless personal organizers, presenting a general description of the technology involved and information on the small-footprint K Virtual Machine. The book also outlines the goals, requirements, and scope of the CLDC and MIDP standardization efforts, high-level CLDC and MIDP platform architecture, CLDC and MIDP application models and compatibility with Java language, and CLDC and MIDP libraries. Annotation c. Book News, Inc., Portland, OR (booknews.com)

Product Details

ISBN-13:
9780201746273
Publisher:
Pearson Education
Publication date:
06/01/2001
Series:
Addison-Wesley Java Series
Pages:
384
Product dimensions:
7.39(w) x 9.23(h) x 0.73(d)

Read an Excerpt

Chapter 2: Overview of Java 2 Platform, Micro Edition (J2ME™)

2.1 Java 2 Platform

Recognizing that one size does not fit all, Sun Microsystems has grouped Java technologies into three editions, each aimed at a specific area of today's vast computing industry:
  • Java 2 Platform, Enterprise Edition (J2EE™) for enterprises needing to serve their customers, suppliers and employees with scalable server solutions.

  • Java 2 Platform, Standard Edition (J2SE™) for the familiar and well-established desktop computer market.

  • Java 2 Platform, Micro Edition (J2ME™) for the combined needs of:

    • consumer and embedded device manufacturers who build a diversity of information devices,

    • service providers who wish to deliver content to their customers over those devices,

    • content creators who want to make compelling content for small, resource-constrained devices.
Each Java platform edition defines a set of technologies that can be used with a particular product:
  • Java virtual machines that fit inside a wide range of computing devices,

  • libraries and APIs specialized for each kind of computing device,

  • tools for deployment and device configuration.
Figure 2.1 illustrates the Java 2 Platform editions and their target markets, starting from the high-end platforms on the left and moving towards low-end platforms on the right. Basically, five target markets or broad device categories are identified. Servers and enterprise computers are supported by Java 2 Enterprise Edition, and desktop and personal computers by Java 2 Standard Edition. Java 2 Micro Edition is divided broadly into two categories that focus on high-end and low-end consumer devices. Java 2 Micro Edition is discussed in more detail later in this chapter. Finally, the Java Card™ standard focuses on the smart card market....

2.2 Java 2 Platform, Micro Edition (J2ME)

...Java 2 Platform, Micro Edition (henceforth referred to as Java 2 Micro Edition or J2ME) specifically addresses the large, rapidly growing consumer space, which covers a range of devices from tiny commodities, such as pagers, all the way up to the TV set-top box, an appliance almost as powerful as a desktop computer. Like the JAVA 2 PLATFORM, MICRO EDITION (J2ME) 9 larger Java editions, Java 2 Micro Edition aims to maintain the qualities that Java technology has become known for, including built-in consistency across products, portability of code, safe network delivery and upward scalability.

The high-level idea behind J2ME is to provide comprehensive application development platforms for creating dynamically extensible, networked devices and applications for the consumer and embedded market. J2ME enables device manufacturers, service providers and content creators to capitalize on new market opportunities by developing and deploying compelling new applications and services to their customers worldwide. Furthermore, J2ME allows device manufac-turers to open up their devices for widespread third-party application development and dynamically downloaded content, without losing the security or the control of the underlying manufacturer-specific platform.

At a high level, J2ME is targeted at two broad categories of products:

  • High-end consumer devices. In Figure 2.1, this category is represented by the grouping labeled CDC (Connected Device Configuration). Typical examples of devices in this category include TV set-top boxes, Internet TVs, Internet-enabled screenphones, high-end wireless communicators and automobile entertainment/ navigation systems. These devices have a large range of user interface capabilities, total memory budgets starting from about two to four megabytes and persistent, high-bandwidth network connections, often using TCP/IP.

  • Low-end consumer devices. In Figure 2.1, this category is represented by the grouping labeled CLDC (Connected, Limited Device Configuration). Cell phones, pagers, and personal organizers are examples of devices in this category. These devices have very simple user interfaces (compared to desktop computer systems), minimum memory budgets starting at about 128 kilobytes, and low bandwidth, intermittent network connections. In this category of products, network communication is often not based on the TCP/IP protocol suite. Most of these devices are usually battery-operated.
The line between these two categories is fuzzy and becoming more so every day. As a result of the ongoing technological convergence in the computer, telecommunication, consumer electronics, and entertainment industries, there will be less distinction between general-purpose computers, personal communication devices, consumer electronics devices, and entertainment devices. Also, future devices are more likely to use wireless connectivity instead of traditional fixed or wired networks. In practice, the line between the two categories is defined more by the memory budget, bandwidth considerations, battery power consumption and physical screen size of the device, rather than by its specific functionality or type of connectivity.

Because of strict manufacturing cost constraints, the majority of high-volume wireless devices today such as cell phones belong to the low-end consumer device category. Therefore, this book focuses only on the CLDC and MIDP standards that were specifically designed for that category of products.

2.3 Key Concepts of the J2ME Architecture

While connected consumer devices such as cell phones, pagers, personal organizers and TV set-top boxes have many things in common, they are also extremely diverse in form, function, and features. Information appliances tend to be special-purpose, limited-function devices. To address this diversity, an essential requirement for the J2ME architecture is not only small size but also modularity and customizability.

In general, serving the information appliance market calls for a large measure of flexibility in how computing technology and applications are deployed. This flexibility is required because of

  • the large range of existing device types and hardware configurations,

  • the different usage models employed by the devices (key operated, stylus operated, voice operated),

  • constantly improving device technology,

  • the diverse range of existing applications and features,

  • the need for applications and capabilities to change and grow, often in unforeseen ways, in order to accommodate the future needs of the consumer.
The J2ME architecture is intended to be modular and scalable so that it can support the kinds of flexible deployment demanded by the consumer and embedded markets. To enable this, the J2ME environment provides a range of Java virtual machine technologies, each optimized for the different processor types and memory footprints commonly found in the consumer and embedded marketplace.

For low-end, resource-limited consumer products, the J2ME environment supports minimal configurations of the Java virtual machine and Java libraries that embody just the essential capabilities of each kind of device. As device manufacturers develop new features in their devices, or service providers develop new and exciting applications, these minimal configurations can be expanded with additional libraries that address the needs of a particular market segment. To support this kind of customizability and extensibility, two essential concepts are defined by the J2ME environment:

  • Configuration. A J2ME configuration defines a minimum platform for a "horizontal" category or grouping of devices, each with similar requirements on to-tal memory budget and processing power. A configuration defines the Java language and virtual machine features and minimum class libraries that a device manufacturer or a content provider can expect to be available on all devices of the same category.

  • Profile. A J2ME profile is layered on top of (and thus extends) a configuration. A profile addresses the specific demands of a certain "vertical" market segment or device family. The main goal of a profile is to guarantee interoperabil-ity within a certain vertical device family or domain by defining a standard Java platform for that market. Profiles typically include class libraries that are far more domain-specific than the class libraries provided in a configuration. One device can support multiple configurations.
Configurations and profiles are discussed in more detail below. Both configurations and profiles use the capabilities of the Java virtual machine (JVM), which is considered to be part of the configuration. The virtual machine usually runs on top of a host operating system that is part of the system software of the target device. The high-level relationship between the different software layers—the JVM, configuration, profiles and the host operating system—is illustrated in Figure 2.2....

Meet the Author

Roger Riggs is a Senior Staff Engineer at Sun Microsystems, Inc. with a focus on design and architecture of the Java 2 Micro Edition platform for wireless devices. He led Sun's efforts within the Java Community Process to standardize the APIs for wireless devices in the MIDP effort. Previously, he led the effort to develop the JavaPhone™ technology APIs.

Antero Taivalsaari is Engineering Manager of the K Virtual Machine (KVM) team at Sun Microsystems, Inc. He started the Spotless research project at Sun Labs, and wrote the original KVM implementation that became the cornerstone of the Java 2 Micro Edition platform. In addition, he led the CLDC standardization effort.

Mark VandenBrink is Chief Architect for systems software at Motorola Semiconductor Products Sector, where his team has been working on KVM-based wireless technology for over three years. He was the leader of the Mobile Information Device Profile standardization effort, and a member of the Connected Limited Device Configuration expert group.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >