| By Matthew Ferris | Article Rating: |
|
| August 22, 2001 12:00 AM EDT | Reads: |
11,371 |
Jonathan Knudsen is a Java veteran who has given us such diverse titles as Java Cryptography, Java 2D Graphics, and The Unofficial Guide to LEGO MINDSTORMS Robots. His latest offering is Wireless Java: Developing with Java 2, Micro Edition (Apress, 2001, ISBN 1-893115-50-X).
As readers of Wirelesss Business & Technology know, the Java 2 Micro Edition is big, (pardon the expression). It was a major focus of the latest JavaOne conference, and take a look sometime at the number of subscribers to the KVM Interest list, as compared to some of the others. There are over 2,300 subscribers, making its popularity near that of Enterprise JavaBeans, and JavaServer Pages. Given that J2ME is coming on strong, a title such as this is a welcome companion.
This book could properly be called a handbook, as opposed to being an exhaustive treatment of each of the subjects. The author acknowledges this in the preface when he mentions that he has not delved as deeply as possible into many of the subjects. It's a brief, 176 pages without the API reference, and is targeted at the developer who's already quite comfortable with Java.
This brevity is actually a help, I think. While it's true that each subject could be treated more completely, it's also true that there's added pressure on developers these days. He or she must learn new technologies at an ever-quickening pace. Project life cycles have definitely accelerated in the past few years, so it's helpful to have a book that distills only the essential information. The rate of change is such that you need sources other than books to stay current (monitoring the KVM-Interest list, for example).
We're just starting to see the titles on Micro Java beginning to flow, and that will certainly heat up in the months ahead. It's true that Addison-Wesley has had a title out for some time dealing with the Java 2 Micro Edition, but in my opinion, that book was published too early. The APIs were not at all settled and the MIDP was not even released in beta. The timing of the Apress book, therefore, strikes me as a little better.
If you've worked with standard Java, you should find the book helpful. MIDlet life cycles are covered, and then what is and isn't in the MIDP in terms of the API contents. Next there's coverage of the UI classes in the MIDP, and again it's brief but to the point. All of the GUI classes in the lcdui package are dealt with. Together with the downloadable examples, you should find everything you need to build an interface.
The samples in the book use the Sun Wireless Toolkit as the IDE of choice. Those of us who started out doing this on the command line were cheered by the release of this tool, and it seems a safe choice to go with in building your J2ME apps. Knudsen does mention some of the other tools that are available for J2ME coding.
The other two items of weight in the MIDP are storage and networking. The chapter on persistent storage I found to be too light. That is, the RecordStore class, and the associated interfaces are dealt with, but I found myself wanting a little more in the way of samples that show some real-world data being stored on the device. What about a game where I store player scores - high scores as well as user preferences?
The networking chapter provides helpful information on how to network enable your MIDP apps, including some hints about which methods in the HttpConnection classes are more efficient than others. In addition, using cookies for session tracking, and the datagram connection are also dealt with. I was surprised, however, that no mention is made that while the Motorola SDK supports datagrams, the J2ME Wireless Toolkit does so only when you set an (undocumented) environment variable.
There are also chapters on performance tuning, XML parsing, and programming a game interface. The first two are especially welcome if you intend to focus on suit-and-tie "business" programming. Developers have gotten used to giving little thought as to whether creating a particular object will cause undue overhead. These are habits that must be broken when coding for limited devices such as cell phones, and the chapter on performance tuning contains some solid principles to observe in order to get your application to be a svelte, agile piece of code. The chapter on game programming is actually one of the fuller treatments in the book, providing insights into handling gaming actions, and how to deal with the Canvas class. Everyone should try to write at least one game, and if you ever have, you know it can be an entirely different matter from what you're used to with other kinds of applications. Knudsen provides guidance on things such as double-buffering your images, animation, and multithreading for improved performance.
Finally, the chapter on protecting network data was prescient. If the day ever comes when cell phones are tools for corporate staff to not only call a sales prospect, but to also record interactions, place orders, adjust inventory and the like, then the security of the data and transmission must be assured. Drawing on his cryptographic experience, Knudsen gives some examples as to how this can be achieved today, dealing with both sides of the network connection.
As noted above, this is not an exhaustive treatment of any aspect of the Mobile Information Device Profile, but for the Java developer who has the language well in hand, the book is an excellent companion to getting up and running with J2ME.
Wireless Java:
Developing with Java 2,
Micro Edition
Author: Jonathan Knudsen
Format: Paperback, 226 pp.
ISBN: 1-89311550-X
Publisher: Apress L. P.
FROM THE BOOK...
Ch. 1 Introduction
Ch. 2 Building MIDlets
Ch. 3 All About MIDlets
Ch. 4 Almost the Same Old Stuff
Ch. 5 Creating a User Interface
Ch. 6 Lists and Forms
Ch. 7 Persistent Storage
Ch. 8 Connecting to the World
Ch. 9 Programming a Game Interface
. Ch. 10 Performance Tuning
Ch. 11 Parsing XML
Ch. 12 Protecting Network Data
App MIDP API Reference
Published August 22, 2001 Reads 11,371
Copyright © 2001 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Matthew Ferris
Matthew Ferris is Mid-West Editor of WBT.
- It's the Java vs. C++ Shootout Revisited!
- Patterns for Building High Performance Applications
- OpenXava 4.3: Rapid Java Web Development
- Asynchronous Logging Using Spring
- Java for Programmers (2nd Edition)
- Cross-Platform Mobile Website Development – a Tool Comparison
- Write Once Run Anywhere or Cross Platform Mobile Development Tools
- Three Buzzwords That Every CIO Hears but One They Should Listen To
- Immersing into JavaScript Frameworks
- Workday Reportedly Prepping to Go Public
- Book Review: Sams Teach Yourself Java in 24 Hours
- Cloud Expo New York: The Java EE 7 Platform - Developing for the Cloud
- Book Excerpt: Introducing HTML5
- Adobe Sends Flex to the Apache Foundation
- Five Years Waiting for JRE 7: Is It Justified? (Part 1)
- Book Excerpt: Java Application Profiling Tips and Tricks
- i-Technology in 2012: Five Industry Predictions
- It's the Java vs. C++ Shootout Revisited!
- Patterns for Building High Performance Applications
- OpenXava 4.3: Rapid Java Web Development
- The Next Web Architecture
- Asynchronous Logging Using Spring
- Java for Programmers (2nd Edition)
- Is Write Once Run Anywhere Ever Going to Be a Reality?
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- JavaServer Faces (JSF) vs Struts
- The i-Technology Right Stuff
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- What's New in Eclipse?
- i-Technology Predictions for 2007: Where's It All Headed?
















