Slashdot Mirror


Learning Wireless Java

prostoalex writes: "Teaching developers to program for wireless platforms is probably not an easy task, since there are just so many focus groups in your audience. This book assumes that reader is already familiar with J2EE concepts, has programmed Java and knows the basic APIs for string manipulation and mathematical operations. Learning Wireless Java was a part of my first-month Safari subscription, and since learning to program for Java-enabled phones was a specific task I set for myself, there were some other books on the list that taught you the details of J2ME." Learning Wireless Java (1st Ed.) author Qusay Mahmoud pages 262 publisher O'Reilly rating 9 reviewer Alex Moskalyuk ISBN 0596002432 summary Java developers� guide to programming wireless devices

Qusay Mahmoud's text starts off with an introduction to the Java wireless platform, which includes learning about a good deal of four-letter abbreviations, among which are J2ME, CLDC, and MIDP. In fact, the first three chapters of the book offer a detailed explanation of what those platforms are, what they provide, and how they differ. For those who have done some J2ME programming before, this might seem a bit too detailed, but for beginners venturing into the wireless world these chapters offer helpful information on where to start, what software to download on your machine and what different software packages represent.

In fact, the author goes into detailed explanations of each software package that you need to download in order to start developing for J2ME, and most of the examples, such as setting the path and required system variables, provide step-by-step information for both Windows and Linux platforms.

You don't get to write your own MIDlet until chapter 4, and by that time you should be pretty comfortable with the terminology and abbreviations used throughout the book. Most of the examples in the early chapters of the book involve working with the command-line compiler, and only in section 4.2.6 does the author introduce the J2ME Wireless Toolkit IDE.

The rest of the chapters are concentrate heavily on the classes provided with the J2ME platform. Chapter 5 gives an overview of MIDP GUI programming with abundant examples and source code. Chapter 6 goes into MIDP event handling, where you learn about the ways users interact with their cellular phones and how all those button pushes are interpreted by the K Virtual Machine. Chapter 7 deals with networking issues (you actually get to write your own J2ME application for accessing the server), and Chapter 8 provides an introduction to database programming and storing non-volatile data on J2ME phones. While the application examples are definitely helpful, well-written and commented, I wish the author would spend more time discussing the hardware implementation of server-client communications, since it's not precisely clear how you can test your J2ME Internet-enabled applications on a real phone without calling your cellular operator and using up valuable minutes.

There is also a chapter on Palm OS programming, which was of limited value to me, and thus cannot be properly evaluated in this review. The appendices are very nice, and include the information that most of the developers would probably find very relevant. Appendices A, B, C, D, E, F and G include descriptions of such J2ME API libraries as java.io, java.lang, and java.util (even though the names are the same as J2EE versions, don't be tricked -- to save space, a lot of classes didn't make it to J2ME) as well as complete javax.microedition reference.

The book is a worthwhile read, easy to understand and follow if you have a good knowledge of Java behind you, and can definitely give you a good introduction to wireless development.

You can purchase Learning Wireless Java from bn.com. Slashdot welcomes readers' book reviews -- to submit yours, read the book review guidelines, then visit the submission page.

5 of 110 comments (clear)

  1. Yes but... by TweeKinDaBahx · · Score: 2, Interesting

    ...Will this be useful in developing for TabletPCs?

    Will the TabletPCs even support Java?

    I only ask because these things are coming out SOON, wil work on wireless techonology, but won't be running an open-source OS. Remember, just because you like it so muc doesn't mean it's the reality of the situation, M$ does still dominate over 90% of the market.

    Which brings me to my next point, why not do more open source development for windows, it's not like it would be impossible. Maybe if some really neat win32 based OSS projects became popular, it would really boost the image of OSS in general.

    (BTW this was not supposed to be a troll, so if it comes across as such I'm sorry)

    1. Re:Yes but... by welshdave · · Score: 2, Interesting

      I think Tablet PC's are aiming at a slightly different market to J2ME. Microsoft are competing against J2ME with their cut down version of Windows CE for mobile phones. But there's nothing to stop phones running this OS from running J2ME stuff as well.

  2. Just plain BS: No it's not by SkyLeach · · Score: 5, Interesting

    Teaching developers to develop good Java is hard, but it's easy to port good Java code to J2ME. I've done it dozens of times.

    The only code I have to change is anything UI related. As long as the developers don't embed BL into the UI then we can use the same code for both the PDA and the desktop. Even the event model can be the same.

    Just change the UI.

    Oh, and one more thing: don't use every package in the book. Trying to have every jakarta library on a PDA get's a little harsh.

    --
    My $0.02 will always be worth more than your â0.02, so :-p
  3. Another needed book by Anonymous Coward · · Score: 1, Interesting

    I just started developing applications using J2ME for the Nokia 9290 Communicator and Voicestream GPRS enabled SmartPhones. There is one book by WIley "GPRS and 3G Wireless Applications" that is a perfect companion to this o'reily book. You will understand the underlying wireless network architechtures which is very important. GPRS devices are the future for developers, check em out http://www.racowireless.com/voicedataphones.htm

    franco

  4. Look at my website for J2ME and iAppli notes by hqm · · Score: 3, Interesting

    I was in Japan for two years, and did extensive programming on the iAppli (Java that runs on iMode phones) and J2ME platforms. I even wrote a web browser for J2ME. You can see it all and get the source at http://www.ai.mit.edu/people/hqm/imode and also at sourceforge, look for the http://bearlib.sourceforge.net/ bearlib libraries.