J2ME and WAP: Together forever?

The InfoWorld Test Center experts discuss the pros and cons of these two mobile technologies

The current state of the wireless world is downright exciting. Already technologies have been implemented that allow users to enjoy a freedom of mobility never before thought possible. Building on that excitement is a whole new set of technologies that promise to cut the tether forever. To address this, we put two of our experts together to talk candidly about two such technologies, debate the pros and cons, and give some insight about what we can expect in the future.

Ana: WAP (Wireless Application Protocol) was designed to allow wireless devices, and their limited screens and connection speeds, to access Internet and intranet applications. Phone.com, Ericsson, Nokia, and Motorola founded the Wireless Application Protocol Forum in June 1997, an organization that has grown to include hundreds of members. The goal was to offer a license-free standard to the entire wireless industry so that anyone would be able to develop WAP-based services.

And they have met that goal. WAP is an evolving standard but has already built a significant degree of industry support, making it the standard of choice for delivering and presenting wireless Internet services to the market for handheld devices.

WAP standardizes access not only for mobile phones but also for PDAs (personal digital assistants) and pagers. It works with all major wireless networks — including CDMA (Code Division Multiple Access), GSM (Global System for Mobile communications), TDMA (Time Division Multiple Access), and CDPD (cellular digital packet data) — over circuit-switched, packet, or Simple Messaging Service networks, and can be built on any operating system, including Windows CE, Palm OS, EPOC, and JavaOS.

WAP-based sites typically present information in one or two lines of data: company name and phone number; flight numbers and times; currency and exchange rate, etc. This is the information that WAP is good at handling, and it is quick and easy for individuals to access. But WAP is not for everyone. Due to its bare-bones nature, WAP benefits the most individuals with a high demand for mobility.

Tim: On those same lines, the Java 2 Platform, Micro Edition (J2ME) was developed specifically to address the vast consumer space of small devices, ranging from smart cards to pagers. This space, with its limited memory and display constraints, has proved to be an ideal environment for Java.

But before we venture too far into what J2ME is and the benefits it provides, it might make sense to state up front what it is not, and that is a replacement for WAP. Those who follow this space will quickly agree that, instead of looking at it as a WAP competitor, J2ME should be looked at as a complementary technology used to further expand the usefulness of wireless access and applications.

As you mentioned, WAP is a browser technology that allows users to browse WAP-enabled Web sites. Unfortunately, although useful in what it does, it does have a few shortcomings, including security and the fact that it requires constant airtime for stand-alone or offline operations.

When coupled with J2ME, however, users will now be provided with a full-featured Java-based application environment from which to enhance their experience. What makes it especially appealing is the fact that implementation is as easy as having your users download the application via their standard WAP browser.

Furthermore, by employing this type of technology, users will no longer be restricted to the limited monochromatic interfaces seen on WAP devices today, but rather we will enjoy full-color, animated graphics and applications that are much easier to navigate. Once a Java application has been stored on a handset, it can then exchange data with backend information systems using the existing WAP infrastructure.

With that said, users will also be happy to know that applications developed with J2ME are upwardly scalable to work with the Java Platform, 2 Standard Edition (J2SE) and the venerable Java 2 Platform, Enterprise Edition (J2EE) with little rework required.

What does the future hold?

Ana: Companies in the mobile data business and end users will all benefit from WAP.

The devices will cover a wide base of end-user needs, and phone manufactures will continue to improve and develop newer and more sophisticated devices that will continue to support and enhance services and the user’s experience. Because WAP is supported by all major phone manufacturers, it is very likely to become very successful.

I believe that J2ME will also triumph, Tim, as phone-manufacturing market leaders such as Nokia, Motorola, and LG Telecom also support it. Java is also an established platform, and J2ME will appeal to developers, which may lead to better wireless applications. Some individuals may not take J2ME seriously right away, however, because Java has traditionally been better suited to a desktop- and server-based environment and therefore appeals to mainstream developers more than it does to embedded-system builders.

Tim: I could not agree with you more, Ana, except for the statement that J2ME is not being taken seriously. In fact, if you consider the upcoming 3G (third-generation) standard, most vendors are already considering the use and inclusion of the technology. Moreover, once more individuals realize the huge potential that Java can bring not only to their tethered applications but also to those that are wireless, I expect to see an even bigger adoption of the technology.

The only real problem I see with WAP, or more specifically WML (Wireless Markup Language), in the future is that, just like any specialized language or technology, few qualified individuals are or will be available. Here is where Java really stands proud: as long as individuals continue using it — and I suspect that they will for some time to come — a constant source of talent will be available.

Tools of the trade

Ana: WAP has been designed to leverage the established Internet infrastructure by taking advantage of investments already made in programming, applications, development tools, and Web servers.

WAP is also closely aligned with existing data networking standards and Internet technologies, including IP and XML, while focusing on the unique requirements of wireless access.

WAP specifications are expected to evolve dramatically over the next few years.

WAP enthusiasts expect that a number of wireless Web sites will program their content directly in HTML/XML in an attempt to eliminate the translation process and proxy server technologies required to support WAP. In fact, most developers of small-footprint microbrowsers will likely offer hybrid WML/HTML products so that others will be able to display either WAP’s WML or traditional Internet HTML content. There are four WAP toolkits available for software developers to use in the development of WAP-based services, with Dynamical Systems Research, Ericsson, Nokia, and Phone.com supplying them.

Tim: Although I agree with you that many tools exist for transforming content into WML (including one you didn’t mention, IBM’s Transcoding Publisher), an even larger number exist for creating J2ME applications. Whether your pleasure is Metrowerks’ Code Warrior for Java or Sun’s J2ME Wireless Toolkit, chances are high you’ll find a tool capable of enabling developers to create feature-rich content and applications based on J2ME.

From a hardware standpoint, device manufacturers ranging from Nokia to Motorola are all building J2ME into their next-generation wireless handsets.

Future challenges and changes

Ana: 3G is the generic term used for the next generation of mobile communications systems. 3G systems will provide enhanced services to voice, text, and data, but will be known for their high speeds and multimedia data services.

As 3G becomes more widely available in the United States, home banking, ecommerce, and online trading applications will be modified for the mobile environment and videoconferencing. The wireless terminal will be the personal gateway to the world of voice, data, video, mobile Internet, and interactive multimedia communications.

Tim: I agree that once 3G has reached a saturation point more users will find the wireless experience appealing. From a J2ME standpoint, adoption is already taking place, as J2ME has been chosen as the industry standard for wireless devices by the Third Generation Partnership Project, a group responsible for defining the specification for the next-generation handset application environment.

But is it secure?

Ana: WAP currently uses the Wireless Transport Layer Security (WTLS) specification, which some believe has notable holes. WTLS was specifically designed to conduct secure transactions over a low-bandwidth environment without requiring PC-level processing power or memory in the handset. For this to work, the WAP gateway acts as a translator between WTLS encryption and the Web’s standard, more robust SSL (Secure Sockets Layer) security protocol. The problem occurs when the data is handed over from WTLS to SSL, a process in which the data is decrypted and then re-encrypted, meaning that for a split second the data is not secure. Even though the data translation occurs within a secure data center, it’s still vulnerable for that split second. New versions of the WAP specification are expected to address this issue, but it will probably take a while before the problem is resolved.

Tim: This is where J2ME, or more specifically Java, really shines, thanks to the fact that all Java applications, regardless of implementation, are restricted by a simple principle that untrusted code be placed in a sandbox, where it can play safely without doing any damage to the real world. When an applet or other piece of untrusted code is running in the sandbox, there are a number of restrictions on what it can do. The most obvious is that it has no access whatsoever to the local filesystem or system resources. Should you decide to allow access, a simple certificate is all that’s required.

J2ME has other benefits as well because it can support other Internet protocols. An example Sun gives is that you might download an IMAP-based mail application and communicate directly with your backend mail server, not only speeding the rate of data exchange but also doing so without using WAP.

For the developer in all of us who still is concerned with security, the toolkits mentioned above can also aid in building applications that make use of RMI (Remote Method Invocation) between the handheld and a Java 2-compliant back end, further removing doubt.

Final thoughts

Tim: In all, I would sum up both technologies by labeling them must haves for those venturing into the mobile space.

With the simplicity of WAP, the strength of Java, and the approaching promise of greater amounts of bandwidth, users will find transforming content from plain to pristine something of a joy.

Ana: I couldn’t agree more with Tim. The combination of WAP, Java, and the increase of bandwidth is going to make it possible to access the Internet and keep in touch with your world literally with your fingertips.

Ana Orubeondo, a senior analyst for the
InfoWorld Test Center, eats, sleeps, and dreams about
wireless technologies. Tim Fielden, a senior analyst for the
InfoWorld Test Center, has been doing development for the
last 15 years and closely follows the part Java is playing in
enterprise applications.

Source: www.infoworld.com