Slashdot Mirror


Programming Wireless Devices With Java 2

Jeff Carroll writes "Developers building Java applications for wireless handheld devices have been looking forward for some time now to the release of devices supporting version 2.0 of the Connected Limited Device Configuration (CLDC), and version 1.1 of the Mobile Information Device Profile (MIDP). These new releases contain support for features demanded by developers that didn't make the original releases. In support of CLDC 2.0 and MIDP 1.1, Roger Riggs and his team of authors from Sun, Nokia, and Motorola have released Programming Wireless Devices with the Java 2 Platform, Micro Edition, Second Edition (since I don't have a copy of the first edition, I can only evaluate the new edition on its own merits)." (Read on for his review.) Update: 07/23 16:31 GMT by T : Whoops -- that's CLDC 1.1 and MIDP 2.0, not the other way around. Programming Wireless Devices with the Java 2 Platform, Micro Edition, 2ed. author Roger Riggs, Antero Taivalsaari, Jim Van Peursem, Jyri Huopaniemi, Mark Patel, Aleksi Uotila pages 464 publisher Addison-Wesley Professional rating 7 reviewer Jeff Carroll ISBN 0321197984 summary In-depth introduction to and reference on CLDC 2.0 and MIDP 1.1.

As is characteristic of the titles I've seen from Sun's Java series, this book goes into great detail about architectural decisions, standards process, and philosophy underlying the new release. The first six chapters are given over to this discussion. This material is mostly great for experienced developers seeking a deeper understanding, occasionally so abstract as to be silly (as in the case of the Java washing machine and its downloadable stain-removing code), but likely to be of only secondary interest to new J2ME developers focused on coming up to speed.

What this book does best is comprehensive exposition of the J2ME APIs. There are chapters dedicated to the APIs for forms, graphics, games, sound, persistence, and networking, with code samples offered in most cases, and a Java Almanac-style reference to all J2ME-specific classes and interfaces is provided as an appendix. Features that are new to the J2ME second edition are clearly identified.

The remainder of the book constitutes a detailed discussion of the new technologies for event-driven launch, application security, and over-the-air deployment, perhaps the most potentially confusing of which is event-driven application launch. While the book explains the new technology well, it doesn't address how it will be introduced by network operators, or how it might interact with or replace similar existing proprietary technologies such as Sprint's MUGlets.

Another subject that is not dealt with here that will soon be relevant to developers for any particular J2ME-supporting network is that of optional packages (OPs) - features to be supported at the option of particular device vendors and/or network service providers. It is fairly clear that, going forward, the wireless network infrastructure and its supported features will be an integral part of the J2ME platform that will have to be taken into account by developers, and books which fail to discuss popular and commonly adopted OPs will be of limited usefulness (you'd think that Sun would know that after all that rhetoric about the network being the computer). In general, a book of this sort would benefit from the participation of network operators, as it does from that of device manufacturers Nokia and Motorola.

All the code samples and background on architecture notwithstanding, this book is clearly targeted at experienced Java programmers, not handheld device programmers working in other technologies. If you don't already know Java, this book will not teach you. There is also nothing said here about selection, configuration, or use of development tools; readers who are not already adept at the use of J2ME development tools, including the Wireless Tool Kit (WTK), should not expect to acquire that knowledge from this book. (People who need help in this area may want to consider Jonathan Knudsen's Wireless Java or Kim Topley's J2ME in a Nutshell.)

Keeping the aforementioned caveats in mind, this is an excellent introduction to and reference on the new release of J2ME.

You can purchase Programming Wireless Devices with the Java 2 Platform, Micro Edition, 2ed. from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

11 of 108 comments (clear)

  1. Re:Games? by Nick+of+NSTime · · Score: 2, Informative

    I meant to say wireless networked games on cell phones.

  2. There are no such beasts by Gzip+Christ · · Score: 5, Informative
    Developers building Java applications for wireless handheld devices have been looking forward for some time now to the release of devices supporting version 2.0 of the Connected Limited Device Configuration (CLDC), and version 1.1 of the Mobile Information Device Profile (MIDP).
    You've got that backwards dude. It's MIDP2.0 and CLDC1.1. See here and here.
  3. Re:I thought Java was doomed by yatest5 · · Score: 0, Informative
    I've been told Python does everything Java does and better.

    Well it doesn't run on Mobile Phones so it doesn't do that better....?

    --
    • Mod parent up! [a] by Anonymous Coward (Score:5) Thurs, June 31, @13:37
  4. So far.. by Dexter77 · · Score: 5, Informative

    I've been involved with wireless programming and Java since late 90's. So far Java hasn't lived up to its promises. Sure, you can do nice games on mobile phones, but real programming is a joke.

    For an example six months ago I had to do a little program that sent data through Nokia 9210's irDa port. API seemed to support it, so I made a program that used the irDA. Unfortunately the program never could open the irDa port. After days of research I finally found out that Nokia had NEVER implemented the irDa port correctly to the library that Java used. They had a typo in the port name, but nobody seemed to care about 'a minor flaw' at Nokia. The bug had been there for years and there was no way you could use irDa with Java in Nokia 9210(i).

    After that I just switched to the C++ and everything worked perfectly.

    The problem with mobile phones and Java generally is that if hardware interface is not implemented correctly, you can do nothing about it. Can you imagine yourself coding hundreds of hours a Java program and finally realising that the API hasn't been yet implemented fully and the program can never run. Ok, maybe not never, but would you like to wait years before you get fully implemented API?

  5. Re:Washing Machines and Ad-hoc Networks by idlethought · · Score: 4, Informative

    Compared to the other demands on medium/high end mobile (camera, bluetooth, the GSM/CDMA network itself), Java doesn't have that much implication for battery performance- provided it has a decent software implementation or some form of HW acceleration.

    Some phones have better Java technology than others however.

  6. Interesting ? by MosesJones · · Score: 2, Informative


    I'm assuming you are based in the US, because right now there are loads of games on mobile phones in Europe and Asia, and some of them are already interactive across the network.

    And that was MIDP 1.0

    --
    An Eye for an Eye will make the whole world blind - Gandhi
  7. Re:I thought Java was doomed by tuffy · · Score: 3, Informative
    I've been told Python does everything Java does and better.

    Whats to believe?

    Python can do everything Java can do (Turing-completeness, and all that) but better is far too subjective a claim. Python is a higher level language than Java is and offers more powerful language constructs. But, Java's current implementation tends to run faster than Python's for much the same reason. Python offers scores of standard libraries to perform useful tasks, but those libaries tend toward one-off minialism. Java also offers scores of standard libararies, but Java's take a "implement everything and the kitchen sink" approach.

    Which is better depends on what you need.

    --

    Ita erat quando hic adveni.

  8. You are denying reality... by MosesJones · · Score: 4, Informative


    Bloody hell.. lets see there are nearly 100 mobile phones that support J2ME, there are over 100 million sold in the last 12 months world wide and Nokia in ONE QUARTER ALONE sold over 800,000 of the high end smart phones.

    Low end phones like the 6310i have been J2ME phones for around a year now. And now almost ALL phones released in Europe and Asia are J2ME enabled.

    Basically you know zip, zero, nada about Mobile Applications.

    This isn't new, this is way over 12 months old and represents already a multi-million dollar industry in selling J2ME applications to consumers.

    --
    An Eye for an Eye will make the whole world blind - Gandhi
  9. I beg to differ. by Dr.+Bent · · Score: 4, Informative

    There are only about 125 classes in the entire MIDP specification, and alot of these are things like Integer and IllegalStateException. When you get down to the meat of it, there's maybe a couple dozen classes that you really need to understand.

    I find MIDP to be very simple and easy to use. Maybe it helps to be a Java progammer and understand the Java way of doing things, but I've built a few J2ME applications and I've been amazed at how little time they took to create, and how well the finished product performed.

  10. Re:I thought Java was doomed by MyPantsAreOnFire! · · Score: 3, Informative

    Yes and no. Java's OO structure (IMHO) is much clearer and strictly defined. Java also runs on micro-devices (what this review is about) whereas Python does not. There are those people that will also argue that Java's performance benchmarks can also beat out Python. Python's a great language, and I've been impressed with it, but then again, C# is much the same. Java is the king of that hill, and it will take some serious work to knock it off.

    --
    --My other sig is a ferrari.
  11. J2ME news and articles by Anonymous Coward · · Score: 1, Informative
    There are many sites focused on J2ME. This one is for news and developer articles (it also has links to other J2ME resources):

    Lurker's Guide to J2ME