Chris Ritke is thinking and writing...

...about this and that and some other things...

Saturday, February 19, 2005

Mobile Java: Write once, run everywhere?

Well... no, yes - ahem - sort of.

If your using MIDP 1.0 only, which means that you'll end up looking with a pretty crappy looking app, then yes, write it once, test it on all the phones you can get your hands on and yes, you'll have one version that'll run on pretty much every phone.

But that's not the solution, is it? The app is supposed to look great, right? So you're going to have to somehow build your own ui widgets and do fullcanvas and all that - but now what? There's still a ton of MIDP1.0 phones, there's Nokia's FullCanvas and there's MIDP 2.0's GameCanvas, among others. And then there are a million different display sizes. Sheesh.

Well, what has made sense for us is to build a set of three libraries that have all of the widgets and all that, one for MIDP 1.0, one for Nokia's FullCanvas and one for MIDP 2.0. All of the widgets automatically figure out the display size and build themselves accordingly. Now all we have to do is write an app once, compile it with each of the three libraries and voila - three versions of the app which all together will run on pretty much every phone. The only thing left is to map each phone model of each manufacturer to one of the three versions. Maybe I'll post our mapping table some day!

Oh, I forgot one thing: we still have to test each version on every phone we can get our hands on. There's always a little quirk here or there. Life could be soooo much simpler.

0 Comments:

Post a Comment

<< Home