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.

14 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. this book's title is misleading by cpfeifer · · Score: 5, Informative

    The title of this book should be 'J2ME programming for devices' since there's nothing inherently 'wireless' about the material the author presents. There's no mention of programming for different wireless networks (GPRS, mobitex, flex...) or how to integrate w/existing popular wireless services (SMS).

    --
    it's not going to stop until you wise up, no it's not going to stop. so just give up.
    1. Re:this book's title is misleading by cpfeifer · · Score: 2

      I agree with you. The APIs should abstract the network & it's quirks from the developer. However, with today's less-than-perfect networks "wireless programming" to me means writing applications that are able to cope with a high-latency, low-throughput, on again off again network.

      --
      it's not going to stop until you wise up, no it's not going to stop. so just give up.
  4. Re:A glimmer of reality... by yatest5 · · Score: 2

    Java, on anything other than sparc hardware, is utterly slow and bulky. Wireless (depending on what kind of wireless bluetooth, 802.11b, etc...) can be really quite slow.

    Er, are you sure? If the network communication was fast, then the language would need to be fast, but if it's slow (as you say, but I disagree, BT is anything but slow) you would hve plenty of time to do your calculation before you had to do more network activity.

    The whole point of running java is so apps can work on the multitude of new devices coming out.

    --
    • Mod parent up! [a] by Anonymous Coward (Score:5) Thurs, June 31, @13:37
  5. Re:New kind of slow by yatest5 · · Score: 2

    Java = slow
    Wireless = slow
    Java + Wireless = I'de rather not think about it.


    See my post here. This is bunkum.

    If you have some magicly fast method of networking for these new devices (like, maybe we should like them together with co-ax), then I'm sure there's a few companies would like to hear about it.

    --
    • Mod parent up! [a] by Anonymous Coward (Score:5) Thurs, June 31, @13:37
  6. Re:A glimmer of reality... by FortKnox · · Score: 4, Informative

    Java, on anything other than sparc hardware, is utterly slow and bulky.

    How true this was in 1998. But after Java1.2 came out (we're on java 1.4 atm), its been compairable to C++.

    I can't stand it when people talk about how slow java is. When was the last time you coded any java?

    --
    Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
  7. Re:New kind of slow by Joel+Ironstone · · Score: 3, Insightful

    There is no reason why a cell phone or wireless device would communicate any slower with java on it than without. The protocols are all coded in embedded assembler or a PGA. Java or whatver other applications language will have nothing to do with data transmission rate.

  8. Re:New kind of slow by klausjensen2 · · Score: 3, Informative


    Wireless + Java = Fast

    When using dedicated hardware Java is much faster on a wireless device that using a Virtual Machine on a Pentium machine, do your homework:

    http://www.arm.com/aboutarm/4X8JCD/$File/ARM926E J- S.pdf

  9. Re: Your sig by Jon+Abbott · · Score: 2

    sig: My $0.02 will always be worth more than your 0.02, so :P

    You might need to update your sig soon...
  10. Re:You are wrong. by sahala · · Score: 2, Funny
    Yeah Java's definitely a fad. It'll go away in 1-2 years.

    Obviously.

  11. 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.

  12. Re:You are wrong. by sahala · · Score: 2
    Your phone is also a fad. It'll go away in 1-2 years.

    Somehow I doubt that, considering that I don't have a mobile, and I still use the same clunky land-line phone that I've had for the past 3 years.