About the Reviewer
Daniel Mendes has a Bachelors degree in Computer Science and ten years of experience in software development. He has worked in several countries and various industries, from Fashion to Molding. He has applied his skills to many technologies, from web and graphical design to database programming, and for the past two years has focused on developing J2ME applications. He is currently working on his masters degree in computer science and is involved in 3D mobile development.
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.

J2ME in a Nutshell

Author(s): Kim Topley
Publisher: O'Reilly
PubDate: March 2002, 1st edition
Reviewer: Daniel Mendes






One Minute Review

Pros

  • Well structured and formatted
  • Good example code
  • Covers security subjects.

Cons

  • Outdated
  • Written in 2000/2001 makes it inaccurate.
  • Not newbie friendly.
  • Not enough depth, limited in scope.

Purpose & Audience

The J2ME in a Nutshell book offers a complete and detailed overview of the J2ME platform components in the first 9 chapters followed by a quick reference listing of the APIs that constitute the platform. However, this is not a beginner's book. The target audience is the intermediate Java (J2SE) programmer with some knowledge of the Java Language and Virtual Machine specs. This book is not self-contained and requires the reader collect information from other resources. Two companion books (Java in a Nutshell and Java Enterprise in a Nutshell) are suggested pre-requisites for taking full advantage of the

Accuracy and Applicability

Unfortunately the text, written in 2000-2001, is seriously outdated. Much information about CDC has become extremely inaccurate. For example: the Game profile is discussed but ath has been withdrawn from the specification, the RMI profile is now called RMI Optional Package, and the CLDC/CDC VM Reference Implementations at present incorporate HotSpot technology.

Another issue is that this book is limited in scope. It covers only the CLDC 1.0 (JSR30), MIDP 1.0 (JSR37), and has limited coverage of CDC 1.0 (JSR36) and associated profiles. The example code, on the other hand, is interesting and worth a thorough analysis. The book also covers in detail some of the J2ME platform shortcomings like security and how to workaround those limitations.

How does this book help?

For a J2SE developer, the book delivers what it promises a "fast paced introduction into the J2ME platform", covering CLDC/MIDP 1.0, the CDC and it's profiles. Kim presents the reality of developing for limited devices and how you have to adapt your programming style to work with such devices. He does this by comparing the J2SE platform to the J2ME platform and warning about features that J2SE developers will not find in J2ME development, and he highlights the importance of good memory management skills. The aim of the book is to help the developer build up a new programming style; the guidelines presented aid the developer not only to know the platform but also its limitations and presents techniques to work around them.

Chapter highlights

The first nine chapters comprise Part I of the book.

Chapter 1 provides the historical background of the Java language and how the J2ME platform is a return to its roots (OAK), a brief overview of the J2ME configurations and profiles (outdated and inaccurate). This chapter also serves to show where J2ME fits in the overall Java platform panorama, covering descriptions for EmbeddedJava, Personal Java, and JavaCard.

Chapter 2 describes the CLDC and goes over the KVM and several limitations of J2ME (when compared to J2SE) including lack of support for floating-point and reflection. There is also information of use to a system implementor on how to compile and build your own KVM, class loading and how to interface with native code (need custom VM.) It is a good overview and most of the information is still valid.

Chapter 3 gives us a complete description of the uses of the MIDP and of how to get a handle on MIDlet development. MIDlet execution environment and Lifecycle are clearly described, and a multi-threaded example is provided to help understand all the theory. This is one of the "must read" chapters, but I would have liked a bit more attention to device fragmentation.

Chapter 4 covers the GUI abilities in the CLDC and describes the high level GUI API javax.microedition.lcdui and all its constituent components in detail with some simple examples.

Chapter 5 is of interest for game programmers since it covers the low level graphical API, talks about double buffering, clipping, how to extract the proprieties from the device, and other simple but useful examples. This chapter needs to be updated. A lot of new material about game development and the low level API has been introduced, and several third party GUI APIs (like the Nokia UI API and others) are not even mentioned.

Chapter 6 describes Networking and Storage. The coverage is complete, and the examples are good. This is another "must read" chapter as most of the information is still of great use.

Chapter 7 talks about CDC and it's profiles. The information is basic and seriously outdated because the CDC platform was at early stages of development and many of the Profiles are recent. This chapter is a great reason to have a second edition with more in-depth and up to date reporting.

Chapter 8 basically walks you thru all the command line tools options. This is one of those chapters I would immediately cut since it's actually easier to use the help command of the tool, or the help documentation.

Chapter 9 serves as an introduction to the programming environment available for mobility development. J2ME Wireless Toolkit (now renamed SUN Java wireless Toolkit) and Sun Forte IDE are covered (Sun Forte is now NetBeans.) There is an interesting section about how to deal with SSL, HTTP and Certificates, but otherwise this chapter is useless. A better format would be to have an up to date resource list in electronic format maintained by the book author, or simply provide links to such a website.

Part II of this book, is a well formatted and annotated API quick reference. However, most IDEs have in-line help systems (popup javadoc, java hints, etc...) that make this kind of print quick reference an irrelevant thing of the past. We should look more and more for electronic quick references that can be easily searched, sorted, and filtered.

Comparison

Compared to other books that target the same people this one is much faster paced, but it does not cover any of the new material. It is projected for people that can "figure it out" and do not need step by step instructions to progress.

The printed API quick reference provided in Part II is not worth much these days. You can access to up to date information from SUN Microsystems website and print it.

J2ME in a Nutshell is not a newbie friendly book. Other books do a better job of guiding/aiding the developer than what is offered in Part I of this book. Still, the example code and chapter 3 and 6 are really good, and they worth a read. I would like to see O'Reilly come up with a new edition with lots more exposure of the CDC and the new JSRs and APIs.

Expectations

My hope is to create a great reference library for J2ME development. My expectations for this book were that it would give me a good understanding of the J2ME platform and of the APIs. When I first bought this book in 2003 those expectations were well met. This book seriously helped me to understand the platform and adapt my programming style to limited devices. After rereading it in 2006, however, I can see that 3 years in mobile time is an eternity, so I would not buy this edition of the book as it is.

Rating

5/10 - NOT RECOMMENDED


 

I contacted O'Reilly about the possibility of a second edition, they promptly replied:

"Unfortunately, we don't have any plans at this time for a new edition of that book. Thanks for your interest."
-Chris Olson
O'Reilly Book Support

I rate this book with 5 out of 10 beans, due to its initial value and good example code;The First Edition of this book is seriously outdated and I cannot in good faith recommend it to newcomers to the J2ME development scene.

Resources / Links