Welcome!

Machine Learning Authors: Yeshim Deniz, Zakia Bouachraoui, Pat Romanski, Elizabeth White, Liz McMillan

Related Topics: Mobile IoT

Mobile IoT: Article

Wireless Java: Developing with Java 2, Micro Edition

Wireless Java: Developing with Java 2, Micro Edition

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

More Stories By Matthew Ferris

Matthew Ferris is Mid-West Editor of WBT.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


CloudEXPO Stories
Headquartered in Plainsboro, NJ, Synametrics Technologies has provided IT professionals and computer systems developers since 1997. Based on the success of their initial product offerings (WinSQL and DeltaCopy), the company continues to create and hone innovative products that help its customers get more from their computer applications, databases and infrastructure. To date, over one million users around the world have chosen Synametrics solutions to help power their accelerated business or personal computing needs.
All in Mobile is a place where we continually maximize their impact by fostering understanding, empathy, insights, creativity and joy. They believe that a truly useful and desirable mobile app doesn't need the brightest idea or the most advanced technology. A great product begins with understanding people. It's easy to think that customers will love your app, but can you justify it? They make sure your final app is something that users truly want and need. The only way to do this is by researching target group and involving users in the designing process.
Digital Transformation and Disruption, Amazon Style - What You Can Learn. Chris Kocher is a co-founder of Grey Heron, a management and strategic marketing consulting firm. He has 25+ years in both strategic and hands-on operating experience helping executives and investors build revenues and shareholder value. He has consulted with over 130 companies on innovating with new business models, product strategies and monetization. Chris has held management positions at HP and Symantec in addition to advisory roles at startups. He has worked extensively on monetization, SAAS, IoT, ecosystems, partnerships and accelerating growth in new business initiatives.
Whenever a new technology hits the high points of hype, everyone starts talking about it like it will solve all their business problems. Blockchain is one of those technologies. According to Gartner's latest report on the hype cycle of emerging technologies, blockchain has just passed the peak of their hype cycle curve. If you read the news articles about it, one would think it has taken over the technology world. No disruptive technology is without its challenges and potential impediments that frequently get lost in the hype. The panel will discuss their perspective on what they see as they key challenges and/or impediments to adoption, and how they see those issues could be resolved or mitigated.
Lori MacVittie is a subject matter expert on emerging technology responsible for outbound evangelism across F5's entire product suite. MacVittie has extensive development and technical architecture experience in both high-tech and enterprise organizations, in addition to network and systems administration expertise. Prior to joining F5, MacVittie was an award-winning technology editor at Network Computing Magazine where she evaluated and tested application-focused technologies including app security and encryption-related solutions. She holds a B.S. in Information and Computing Science from the University of Wisconsin at Green Bay, and an M.S. in Computer Science from Nova Southeastern University, and is an O'Reilly author.