Is there a strategy or at least best practice to write an app that runs on iPhone, BlackBerry and Android?
I'm ignorant about the development environments for BB and Android, but I assume they both support Java apps.
I know that the iPhone would require an ObjectiveC portion (as well as a whole new UI).
Has anyone done this?
Also, you could give a try to Mobile Community Framework (MCF). This is a crossplatform framework running natively on iPhone, Android, WinMobile, Symbian and BlackBerry. MCF handles network, location and proximity operations for you, in a Wi-Fi Ad-Hoc network or through dedicated proxy server if no direct connection is possible. It has simple API, and it's free to use. This way you can develop your app interface and logic separately on each platform, and use MCF to connect instances of your application in a way you like.
More info at http://uvamobiltec.com
We are currently looking into this also and we found:
Titanium
Kony Solutions
These products have good reviews. The Titanium is free for the community edition.
You can always write a javascript app on the web, and it should work on all three. Of course that doesn't get installed on the phone.
Android has a webview that runs Javascript. I'm sure the other platforms do also. If you wrote most of your logic in javascript, you could may be able to reuse that javascript across platforms.
If you want to write cross-platform web app, SenchaTouch or Phonegap is a good choice.
If you prefer native app, the best cross-platform solution is Titanium. Using Titanium, you can write you app in Javascript, and it compiles JS to native code (Objective-C, Java...)
http://j2mepolish.org could be good choice, however, iphone is only in the roadmap. But android and BB are already supported as well as all other j2me phones.
When writing multiplatform apps, you need to decide how much of the code to share. The 2 options are
The 2nd approach tends to give better apps but it is a more work (assuming you don't need to write the cross platform libraries).
The tricky thing with the mobile world is picking a language. Right now you have
You can cross compile java to javascript and vice versa. You can also compile java to C or use a javascript engine that you can call from C. I don't think you can run C on a java/javascript phone. That leads me to suggest writing your code in Java/Javascript. Cross compiles (and mixing languages in general) have the downside of making debugging a bit harder.