The J2ME Universe Today
The current universe of configurations, profiles and optionalpackages is shown in the diagram below. The tables immediately followingprovide more details about the abbreviations in the figure.
J2ME Overview |
|
As the diagram shows, J2ME has two main branches.The first is based on the Connected, Limited Device Configuration (CLDC). This configuration is for small wireless devices with intermittent network connections, like pagers, mobile phones, and Personal Digital Assistants (PDAs).The Mobile Information Device Profile (MIDP), which is based on CLDC, was the first finished profile and thus the first finished J2ME application environment.MIDP-compliant devicesare widely available.
The other major branch of the J2ME tree is based on the Connected Device Configuration (CDC). This configuration is for larger devices (in terms of memory and processingpower) with robust networkconnections. Set-top boxes and internet appliances are good examples of CDCdevices, although high-end PDAs like the Sharp Zaurus also fit thisconfiguration well. The Foundation Profile extends CDC and serves as the basis for several other profiles. It provides fundamental APIs gleaned from J2SE, including classes and interfaces from java.lang
, java.io
, java.security
, java.util
, and more. For a list of J2ME terms and definitions, see our glossary.
Optional packages bubble like a froth above the CLDCand CDC branches of J2ME. These provide all sorts of capabilitiesranging from Bluetooth communication through web services and instantmessaging. Look in the table for links to the specifications themselves.
For a thorough look at J2ME, see:
The world of wireless Java technology also includes Java Card, for smart cards. For more information on Java Card, see:
About Stacks and JSR 185
Devices implement a complete software stack, which usually consists of aconfiguration, a profile, and optional APIs. First generation J2ME mobile phonesusually implemented the following software stack:
Example J2ME Stack |
Given the plethora of configurations, profiles, and especially optionalpackages, how does a developer know what to expect on a device? JSR 185,Java Technology for the Wireless Industry, addresses this question byassembling other building blocks into a complete applicationenvironment. JSR 185 mandates CLDC 1.0 or 1.1, MIDP 2.0, and WMA. Supportfor MMAPI is optional. This helps nail things down for developers; on aJTWI device, the developer has a clear understanding of what APIs willbe available. The following figure shows a JSR 185 stack:
JSR 185 Stack |
For more information on JSR 185, see:
The Scope of Wireless Java Technology
Wireless Java technology is the intersection of two vast worlds, wireless data communications and the Java platform. Wireless Java technology spans parts ofJava Card, J2ME, J2SE, and J2EE. That said, some commonmisconceptions about wireless Java technology need clearing up:
- Wireless Java technology and J2ME are not the same thing. On the onehand, J2ME encompasses more than just wireless devices. While some parts of J2ME are expressly designed for wireless devices, other parts are not--CDC devices are likely to have standard Ethernet connections. On the flip side, wireless Javatechnology isnot confined to J2ME alone. You could have a laptop or palmtop computer running J2SE applications, connecting to other computers via an 802.11 LAN.
- MIDP is not all of J2ME.MIDP is the first finished profile and has the first installed base of devices out in the world, so people sometimes assume that you are talking about MIDP whenever you talk about J2ME. As you can see from the diagram above, though, J2ME has many facets; MIDP just happened to cross the finishline first.
- MIDP is not all of wireless Java technology.The Java platform offers plenty of choices forwireless programming: Personal Profile, J2SE on wireless devices, even thePDA Profile.
For other perspectives on wireless Java technology, select:
- Developing Wireless Applications with J2ME Technology (PDF) contains a high-level view of wireless Javatechnology.
- Introduction to Wireless Technologies describes Sun's wireless technologies briefly.
Why Use the Java Platform for Wireless Development?
The Java platform is an excellent choice for wireless development for many reasons. Here are three compelling advantages:
- The Java platform is safe. Java code always executes within the confines of theJava Virtual Machine1, which provides a safe environment for executing downloaded code. A binary application could freeze a device or crash it (imagine a blue screen on your mobile phone!) By contrast, at worst a Javaapplications can bring down only the Virtual Machine, not the device itself.
- The Java language encourages robust programming. The garbage collector saves programmers countless hours of hunting down memory leaks. Likewise, the Javalanguage's exception mechanisms encourage programmers to create robust applications.
- Portability is a big win for wireless Java technology. A single executablecan run on multiple devices. For example, when you write a MIDlet (a MIDP application) it will run on any device that implements the MIDP specification. Given the dizzying profusion of wireless devices, not havingto maintain a plethora of implementationsis a big advantage. Even if a Javaapplication makes use of vendor specific APIs, applications writtenusing the Java programming language are inherently easier to modify foranother device than applications written in C or C++.
A second benefit ofportability is the ease of delivering applicationsto a device over the wireless network (sometimes called Over-the-air, or OTA, provisioning). Binary applications can be moved from a server onto a device, too, but not safely.Because Java code runs inside the Java Virtual Machine1, code that is downloaded from the network can be run safely. Binary code cannot be contained at execution time andis much less safe.
The Market for Wireless Services
The market for wireless applications and services is huge. This market can be divided into two segments:
- The consumer segment consists of games, location-based services, productivity applications, and other generally useful applications. In the near term, these applications will be controlled and distributed by wireless carriers.
- The custom business segment will require custom development ofwireless clients to connect to existing enterprise applications. Many of these will be wireless applications that use middleware to access company databases.
Where to Go Next
Perhaps the best next step toward getting a good grip on wireless Javatechnology is to create some:
- Wireless Development Tutorial Part I
Learn how to set up a development environment for buildingJ2ME client applications. You'll install the tools, then build andrun a simple MIDlet. This article has all the information you need to getstarted with J2ME development. - Wireless DevelopmentTutorial Part II
In this article, you'll learn how to set up a Java servlet developmentenvironment, either Tomcat or the J2EE Reference Implementation server.You'll write a servlet and create a MIDlet that makes a networkconnection to the servlet.
'java core' 카테고리의 다른 글
Threads from aritma (0) | 2005.02.12 |
---|---|
Reference object model from java world (0) | 2005.01.28 |
Garbage collection from javaworld (0) | 2005.01.28 |
자바 코드 컨벤션 (0) | 2005.01.24 |
Java 코딩 지침 (0) | 2005.01.24 |