Java books hit the wire

Choose the best books for wireless Java development

1 2 Page 2
Page 2 of 2

The authors tried to use KJava to give readers a feeling of real Java-based Palm PDA programming in the absence of the PDA Profile (MIDP was not originally designed for PDAs and therefore cannot fully leverage many PDA features). But now, since the PDA Profile's release, KJava is almost completely irrelevant.

Mobile Information Device Profile for Java 2 Micro Edition

C. Enrique Ortiz and Eric Giguere do not claim to have written a general J2ME book. They accurately titled this book Mobile Information Device Profile for Java 2 Micro Edition and thoroughly explained MIDP APIs with extensive examples. When it comes to using MIDP API functions creatively for real-world problems, this book is the best in the bunch. It covers advanced issues such as how to maintain HTTP sessions, object-to-record-store mapping, and multiple alerts. The authors also go beyond MIDP specifications and devote two chapters to security and XML processing.

Chapter 10 "Techniques for Writing Better MIDP Applications" is excellent; every MIDP developer should read it. The authors discuss several techniques and patterns designed to produce better mobile code. For example, you should probably put a network-download process in a separate thread to avoid blocking the user interface when the wireless connection is slow or lost. Another useful technique: Simulate J2SE's ResourceBundle in MIDP to support wireless internationalization and localization.

On the server-side integration front, this book contains simple examples to illustrate how to access backend data through a servlet gateway. The book even illustrates how to process Web services SOAP (Simple Object Access Protocol) messages on the wireless device side. The authors demonstrate those techniques in real-world sample applications. The book's email application has both educational and practical values.

The security section, however, is disappointing. The authors could have written a better discussion on how to use the Bouncy Castle Crypto APIs to implement communication security solutions in MIDP applications. Instead, they waste time explaining basic, well-known security concepts and cut/paste Bouncy Castle source code without much explanation. Generally, the source code listings have too few comments. However, novice readers who have little security knowledge might find this book quite useful.

The API documentation at the end of the book eats up more than 60 pages and basically copies the Javadocs available on the Internet. The authors could have better used this space by presenting some big-picture and general J2ME issues. Overall, Mobile Information Device Profile for Java 2 Micro Edition is a hands-on book for MIDP developers at all levels.

Wireless J2ME Platform Programming

In plain terms and easy-to-follow examples, Vartan Piroumian discusses the structure and life cycles of MIDP applications, development tools, and usages, and the all-important MIDP APIs in Wireless J2ME Platform Programming. The MIDP low-end API chapter is particularly well written and could prove quite useful to wireless game developers. For beginner-level developers, this book offers an excellent introduction to basic MIDP concepts and techniques. As expected from a Sun author, this book extensively covers Sun's powerful J2ME Wireless Toolkit.

The last three chapters of the book are excellent. In Chapter 9, the author gives a comprehensive discussion on wireless internationalization issues and offers a solution, with sample code, for simulating J2SE ResourceBundle on the MIDP platform. Chapter 10 details over-the-air mobile application provision issues. Since the formal OTA spec and network carrier support are still in their infancies, discussing OTA in accurate terms that prove useful to developers is impossible. But this book's OTA discussion proves valuable to business managers and strategic developers who want to know how Java-based digital wireless networks work. Chapter 11 discusses the general structure of wireless data networks and some architectural issues.

However, Piroumian could have improved a number of discussions. From the viewpoint of MIDP programming, this book lacks small device application design topics. Because the book is targeted for beginner-level programmers, it doesn't cover J2ME/J2EE integration topics. The author limits the development tool and platform coverage to J2ME Wireless Toolkit and fails to discuss Palm OS MIDP tools.

Since this book is titled Wireless J2ME Platform Programming and is from Sun Press's Java series, I expected to find some balanced discussions on the different J2ME platforms and techniques. I was disappointed that the book covers only MIDP programming.

Side-by-side comparison

To see how the books compare to each other, check out the table below. However, remember that a 1-to-5 numerical scale is often too coarse to judge a book. Different books target varying audiences, emphasize different materials, and present ideas differently. I recommend reading the individual reviews carefully before purchasing any books.

J2ME books
 Core J2ME Technology and MIDPInstant Wireless Java with J2MEJ2ME in a Nutshell Java 2 Micro Edition Mobile Information Device Profile for Java 2 Micro Edition Wireless J2ME Platform Programming
PublisherPrentice Hall PTSOsborne McGraw-HillO'Reilly & AssociatesManning PublicationsJohn Wiley & SonsPrentice Hall Computer Books
Price9.999.999.954.959.994.99
Source codeWebCDWebWebWebWeb
Total pages710550450479380374
API docyesyesyesnoyesno
Big Picture415533
Related technologies215411
Future trends223432
Architecture and design423543
Useful sample code352442
Writing style424533
MIDP structure423344
MIDP high-level UI443354
MIDP low-level UI314345
MIDP persistent storage434453
MIDP network543454
Security342331
Internationalization112235
Application provision413124
Integration with J2EE241541
XML parsing111451
Palm development534321
Tools and development435334
Scales: 1: not covered; 2: some coverage, not enough; 3: satisfactory; 4: good; 5: excellent

Wrap up

All six books reviewed in this article are satisfactory. But none stands out as the best for all occasions. If you are just beginning J2ME programming and want to learn MIDP skills, Core J2ME Technology and MIDP and Wireless J2ME Platform Programming offer the best introductory texts. If you are an advanced developer, Core J2ME Technology and MIDP and Mobile Information Device Profile for Java 2 Micro Edition can teach you new programming techniques and give you application design advice. Mobile Information Device Profile for Java 2 Micro Edition and Instant Wireless Java with J2ME provide many reusable code samples. If you already know J2ME and MIDP, J2ME in a Nutshell is an excellent reference book. If you are a wireless enterprise system architect, a business manager, or an advanced strategic developer, you must read Manning's Java 2 Micro Edition.

J2ME is a collection of fast evolving technologies. MIDP 2.0 and PDA Profile are already in public review at the time of this writing (July 2002). Other J2ME profiles such as the RMI (Remote Method Invocation) Profile, Personal Profile, and Game Profile will come out soon. Community efforts are also underway to develop enterprise-level wireless application APIs, such as XML-processing and security APIs. So, we should watch out for many more exciting J2ME books!

Michael Yuan is a PhD candidate at the University of Texas, a research associate at the Center for Research in Electronic Commerce, and an open source Java developer.

Learn more about this topic

This story, "Java books hit the wire" was originally published by JavaWorld.

Copyright © 2002 IDG Communications, Inc.

1 2 Page 2
Page 2 of 2