Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Enterprise J2ME Wireless Applications
  • Alternative view 1 of Enterprise J2ME Wireless Applications
  • Alternative view 2 of Enterprise J2ME Wireless Applications

Enterprise J2ME Wireless Applications

4.0 1
by Michael Yuan

Industrial-strength J2ME™ for enterprise developers, architects, and decision-makers

J2ME offers an extraordinarily flexible and robust platform for developing mobile applications with enterprise-class performance, reliability, and value. Now, leading mobile developer Michael Yuan covers every aspect of building industrial-strength applications


Industrial-strength J2ME™ for enterprise developers, architects, and decision-makers

J2ME offers an extraordinarily flexible and robust platform for developing mobile applications with enterprise-class performance, reliability, and value. Now, leading mobile developer Michael Yuan covers every aspect of building industrial-strength applications with J2ME: design, architecture, tools, processes, business issues, and more.

Yuan introduces innovations that make the platform even more powerful, ranging from new J2ME profiles and wireless messaging APIs to mobile databases and web services tools. These innovations allow existing Java™ developers (especially J2EE™ developers) to leverage their skills and add mobility to enterprise applications. Yuan also presents more than a dozen complete sample applications—including the application that earned him the grand prize in Nextel, Sun, and Motorola’s nationwide wireless developer contest. Coverage includes:

  • Patterns and best practices for building end-to-end mobile applications
  • Emerging mobile “killer applications”: driving productivity and cost reduction
  • “Smart client” applications: architecture and construction
  • Advanced HTTP techniques for authentication and session tracking
  • Overcoming hardware and network limitations
  • Leading-edge mobile enterprise messaging techniques
  • Mobile databases and synchronization engines
  • XML and mobile web services, including the J2ME Web Services Optional Package
  • New options for mobile security in the enterprise

Product Details

Prentice Hall
Publication date:
Product dimensions:
6.98(w) x 9.24(h) x 1.02(d)

Read an Excerpt

About this BookTarget Audience

This book targets all mobile software developers and business decision makers. It focuses on end-to-end architectural patterns, best practices, key innovations, and real-world design approaches. For different readers, this book offers different benefits:

  • Managers and entrepreneurs: This book is a comprehensive guide to mobile enterprise applications and the Java 2 Micro Edition (J2ME). It covers the capabilities, limitations, common best practices, and commercial solutions of the state-of-the-art mobile Java technologies. It helps you decide which mobile Java profile and products are the best for your business.
  • Experienced mobile developers: This book skips the basic MIDP API tutorial materials and goes straight to the more advanced and more useful topics. It uses several complete sample applications to illustrate common architectural patterns and coding best practices in mobile enterprise applications. For developers who are looking for specific solutions (e.g., messaging, database,

  • Experienced Java developers: For experienced Java enterprise developers (J2EE developers), the move to mobility is about leveraging existing skills. This book walks through familiar design patterns and best practices and shows developers how to apply them in mobile applications. Lightweight mobile versions of enterprise Java APIs (such as JDBC, Java servlet, JMS, and Java Cryptography Extension) are discussed. Those are excellent examples of how to scale down enterprise solutions for mobility while still preserving core functionalities. With a few notes on mobile-specific issues, it is the fastest pathto add mobility to existing enterprise infrastructure.

To fully understand the technical content in this book, the readers should be familiar with the basic Java 2 Micro Edition, Mobile Information Device Profile (J2ME/MIDP) APIs and development tools. A quick MIDP programming guide is provided in Appendix A.

To run the end-to-end sample applications, you will need to deploy the serverside components to your own Java application server and run the clientside components on the desktop emulator or real devices. Please refer to the product manuals of your tools for step-by-step instructions.

Although serverside Java is not the focus of this book, familiarity with basic Java 2 Enterprise Edition (J2EE) concepts such as servlets, Java DataBase Connectivity (JDBC), Java Messaging Service (JMS), Java


This book is divided into six parts:

  • Part I is the introductory material for mobile commerce, mobile enterprise applications, and J2ME. It covers the overall architecture, current status, and future roadmaps of J2ME.
  • Part II is the heart of this book. It presents several example applications to illustrate the smart client mobile application paradigm, common architectural patterns, and best practices. It covers how to run container-managed applications (e.g., servlets) on PDA devices. It also presents a useful advanced HTTP client library for J2ME clients.
  • Part III is about mobile messaging. In the mobile world, messaging clients are easy to use and fit into the mobile lifestyle. In the enterprise world, messaging is the best way to build loosely coupled applications that have guaranteed quality-of-service (QoS). This part of this book seeks to combine the best of the two worlds. It covers email and SMS-based end-to-end applications as well enterprise mobile messaging servers.
  • Part IV discusses mobile databases that are core to occasionally connected and synchronization-based applications. This part covers commercial and open source innovations for mobile databases, synchronization engines, and legacy database connectivity. Two sample database applications from PointBase are presented.
  • Part V covers how to integrate mobile clients into the enterprise Web services infrastructure. It discusses existing and emerging J2ME

  • Part VI is all you need to know about J2ME mobile security solutions. It goes way beyond the simple connection-based end-to-end solutions such as the HTTPS. This part covers open source and commercial cryptography toolkits for J2ME. Due to the complexity of cryptography APIs, API tutorials for each important toolkit are provided.
  • There are two appendices to this book. One of them uses a simple end-to-end MIDP application to illustrate the whole development and deployment cycle. The other appendix introduces the IBM WebSphere Studio Device Developer IDE and provides undocumented instructions on how to install IBM J2ME runtimes on PocketPC devices.
Code Examples

This book uses complete example applications to demonstrate design patterns, best practices, and important API usages. Since this book discusses a wide range of technologies, innovations, and application scenarios, it is impractical to cover everything within a monolithic example. Instead, I decided to develop several small to midsize samples, each focusing on a particular topic. This approach allows the readers to partition the learning task and read one part of this book at a time.

The source code is presented in easy-to-digest segments that are relevant to the discussion text. Nonessential parts of the code (e.g., exception handling, importing packages) are often deliberately omitted from the listings for clarity. Hence, the printed listings are suffcient for understanding the ideas but are not directly runnable code.

  • iFeedBack: The grand prize winner of the NexTel/Motorola/Sun wireless application contest in 2002 (Chapter 3).
  • Echo: A GUI client and a service running in an OSGi clientside container (Chapter 4).
  • Pizza Order: An example included in the IBM Service Management Framework download. It demonstrates how to build smart clients with HTTP front ends (Chapter 4).
  • Smart Ticket: The Sun Wireless Blueprints application v2.0 early release code (Chapter 5).
  • HttpClient: The code for the advanced HTTP library we develop in this section (Chapter 6).
  • Mail: An MIDP email client based on the Mail4ME v1.0 library (Chapter 8).
  • WMATester: A simple messaging application that illustrates the use of Wireless Messaging API v1.0 (Chapter 9).
  • ContactManager: A mobile address book based on the PointBase v4.5 library (Chapter 11).
  • ContactManagerSync: A synchronized mobile address book based on the PointBase v4.5 library (Chapter 13).
  • AmazonExample: An k

  • PeekAndPick: A RSS reader for mobile phones developed by Jonathan Knudsen (Chapter 15).
  • Google: A simple client for the Google Web services API. Both kSOAP v1.2 and v2.0 versions are available (Chapter 16).
  • SmartPhrases: An integrated Google search and online dictionary application (Chapter 16).
  • MapPoint AxisFacade: An Apache Axis facade for MapPoint v3.0 Web services (Chapter 18).
  • MapPoint AxisClient: Personal Profile and MIDP clients for the Map-Point facade (Chapter 18).
  • MobileSecurity: A collection of small applications that demonstrate the correct usage of cryptography APIs (Chapter 20).
  • SimpleDemo: A simple MIDP application to illustrate key concepts and APIs in MIDP programming (Appendix A).
Commercial Products

This book covers and compares more than 30 toolkits and libraries from more than a dozen third-party vendors. The descriptions and API usage examples of those products are intended to give the readers a solid technical ground to make informed comparisons and decisions. They also serve as realworld examples for API and tool designs. However, they do not substitute for the formal product documentation from the vendor. I strongly encourage interested readers to obtain the latest evaluation package and documentation from the vendor to investigate further.Related Publications

Some of the materials used in this book are loosely based on articles I published previously on several online magazines.

  • The Sun Smart Ticket blueprint discussed in Chapter 5 is also covered in “End-to-End J2ME Application Development by Example,” published on the Sun Wireless Java Web site in June 2003.
  • The first half of Chapter 9 is also covered by “Mobile P2P messaging, Part 1,” published on IBM developerWorks in December 2002.
  • Examples in Part IV are adapted from “High-availability mobile applications,” published on JavaWorld in June 2003.
  • Chapter 16 is based on “Access Web services from wireless devices,” published on JavaWorld in August 2002.
  • The example in Chapter 18 is adapted from “Let the mobile games begin, Part 2,” published on JavaWorld in May 2003.
  • Part VI is loosely based on “Data security in mobile Java applications,” published on JavaWorld in December 2002.
Production Notes

This book is produced by the Latex typesetting system on a 1GHz Apple PowerBook running Mac OS X—the best consumer operating system ever produced. Microsoft Word is used for collaborative editing and reviewing. The figures are made with Microsoft Visio, OmniGra2e, GIMP, and the ImageMagick utilities.

The example applications are developed using a variety of development tools, including VI, JEdit, IntelliJ IDEA, and the WebSphere Studio Device Developer IDE. Apache Ant is used to build the applications. Mobile clients are tested on many vendor SDKs, including those from Sun Microsystems (the J2ME Wireless ToolKit), IBM (the WebSphere Micro Environment), Nokia, and Motorola. Real device testing was conducted on Motorola i95cl, Nokia 7210, Nokia 6800, and PocketPC Phone devices.

Meet the Author

MICHAEL JUNTAO YUAN is a researcher, developer, author, and advocate for Java and open source technologies. He is a research associate at the Center for Research in Electronic Commerce at the University of Texas at Austin and the Wireless Java columnist for JavaWorld. Yuan won the 2002 Grand Prize in Nextel, Sun, and Motorola’s national J2ME application contest. Currently, he leads an effort in BuzzPhone.com to develop a series of official blueprint applications for Nokia.

Customer Reviews

Average Review:

Post to your social network


Most Helpful Customer Reviews

See all customer reviews

Enterprise J2ME Wireless Applications 4 out of 5 based on 0 ratings. 1 reviews.
Guest More than 1 year ago
The substance of this book bodes well for the future of J2ME. As you may known, there have been several books on J2ME published in the last year. Like 'Java Development on PDAs' by Wilding-McBride. For the most part, these have been aimed at someone completely new to J2ME development. They have tended to focus on the client side, because this is more tangible and easier to explain. Here Yuan shifts the focus to the server side. He does have screen shots of some client UIs and related code. But the bulk of the discussion moves to server related issues, like how can you sync to a database, or how to send SMS messages in a network. You can consider the book to be focused on connectivity. Not at the lowest level of network connections, but at a higher conceptual level of hooking to existing applications. In part, this is because UI capabilities are much more limited compared to those on a full Java desktop or even a laptop. But it is mostly because the bigger value is in building logic on the server. Sound familiar? Mainstream java traced this route from applet development in 1996 to, a few years later, J2EE/XML on the server, when people realised that is where java is best suited. In about half the time, J2ME is walking down the same path. Yuan does not suggest this, but the impression I got from the book is that in a few more years, if J2ME is running on a server that is not as resource constained as its clients, then it may be replaced by J2EE. It seems that if server side J2ME is to prosper, it may be only on very physically limited servers.