Welcome!

Machine Learning Authors: Yeshim Deniz, Zakia Bouachraoui, Elizabeth White, Pat Romanski, 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
Your job is mostly boring. Many of the IT operations tasks you perform on a day-to-day basis are repetitive and dull. Utilizing automation can improve your work life, automating away the drudgery and embracing the passion for technology that got you started in the first place. In this presentation, I'll talk about what automation is, and how to approach implementing it in the context of IT Operations. Ned will discuss keys to success in the long term and include practical real-world examples. Get started on automating your way to a brighter future!
Cloud is the motor for innovation and digital transformation. CIOs will run 25% of total application workloads in the cloud by the end of 2018, based on recent Morgan Stanley report. Having the right enterprise cloud strategy in place, often in a multi cloud environment, also helps companies become a more intelligent business. Companies that master this path have something in common: they create a culture of continuous innovation.
Eric Taylor, a former hacker, reveals what he's learned about cybersecurity. Taylor's life as a hacker began when he was just 12 years old and playing video games at home. Russian hackers are notorious for their hacking skills, but one American says he hacked a Russian cyber gang at just 15 years old. The government eventually caught up with Taylor and he pleaded guilty to posting the personal information on the internet, among other charges. Eric Taylor, who went by the nickname Cosmo the God, also posted personal information of celebrities and government officials, including Michelle Obama, former CIA director John Brennan, Kim Kardashian and Tiger Woods. Taylor recently became an advisor to cybersecurity start-up Path which helps companies make sure their websites are properly loading around the globe.
DevOpsSUMMIT at CloudEXPO, to be held June 25-26, 2019 at the Santa Clara Convention Center in Santa Clara, CA – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real results. Among the proven benefits, DevOps is correlated with 20% faster time-to-market, 22% improvement in quality, and 18% reduction in dev and ops costs, according to research firm Vanson-Bourne. It is changing the way IT works, how businesses interact with customers, and how organizations are buying, building, and delivering software.
Automation is turning manual or repetitive IT tasks into a thing of the past-including in the datacenter. Nutanix not only provides a world-class user interface, but also a comprehensive set of APIs to allow the automation of provisioning, data collection, and other tasks. In this session, you'll explore Nutanix APIs-from provisioning to other Day 0, Day 1 operations. Come learn about how you can easily leverage Nutanix APIs for orchestration and automation of infrastructure, VMs, networking, and even backup/DR. We'll review available APIs and conduct live demonstrations of integrations and the automating common IT tasks.