views:

562

answers:

5

I am willing to develop a mobile application. I wish to have something working for android, windows mobile, symbian and blackberry. Which is the best way to do that?

I had read here:

You could aim to wrap the sections of the platform specific APIs (iPhone SDK etc.) that you use with your own interfaces. In doing so you are effectively hiding the platform specific libraries and making your design and code easier to manage when dealing with differences in the platforms.

I was hoping there exists a framework that does this for me, but it doesn't exist or I didn't find any. I feel that sort of things will make my code harder to maintain and perhaps it's better to have one version for each platform.

Anyone with experience in the field?

Another links of interest:

+3  A: 

Does Java not count (in various guises)

It should be simpler to manage API differences in a consistent language/runtime platform where capabilities can be assessed in-code ... and configurations of code made at build-time.

As much as I dislike Java, it is fairly ubiquitous. As for the iPhone ... apart from it being much hyped and locked down ... you can get Java to run on jail-broken phones ...

What happened to Apple's open and friendly appearance? The cynic-inside knows the answer ;)

Aiden Bell
My question is not about a language is about how to manage platform specific APIs.
Macarse
The APIs depend on the runtime, and so im most cases with mobile applications, the language ... which in turn dictates how you manage the API and how you deploy an app (do you need to rewrite it in another *language* for each device to manage the API differences.
Aiden Bell
Not another language but, for example, I am doing an application that you can press a button and gives you a pseudo random number. The one coded for android should be different from the one coded for symbian. So, which is the best way to manage those differences?
Macarse
Use a platform native to all operating systems that provides the ability to maintain consistent code/configurations at deployment or use fixed API to assess device capabilities ... java.
Aiden Bell
+2  A: 

There really isn't any magic bullet that I'm aware of. Even within just the Blackberry platform, there are tons of different devices with different capabilities, screen resolutions, etc. And that's just from one, single manufacturer; Symbian and Windows Mobile are likely even worse.

The answer is likely that you should focus on relatively new and consistent platforms (accordingly with very few and all pretty much similar devices), like Android and iPhone OS, if you really want to reduce your code forking and maximize your audience.

My advice will almost certainly change within a few years when there are nine different iPhone OS devices and two dozen Android platforms.

Kevin L.
+3  A: 

You might want to look into PhoneGap (http://phonegap.com/). From their own description page:

PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript.

If you’re a web developer who wants to build mobile applications in HTML and JavaScript while still taking advantage of the core features in the iPhone, Android and Blackberry SDKs, PhoneGap is for you.

In addition to using JavaScript, it supports JavaScript acccess to native controls and features of the phones (GPS, accelerometers etc...).

Marius Kjeldahl
+1 ... I think we should make ECMAScript the standard for alot of stuff. Great language.
Aiden Bell
I've used PhoneGap. It's pretty nice. Be aware that now and then PhoneGap apps get rejected by Apple. http://groups.google.com/group/phonegap/browse_thread/thread/8457987d1d07aede#
Nosredna
@Nosredna: Good info. I found this: http://nachbaur.com/blog/updates-on-apple-phonegap
Macarse
Macarse
+1  A: 

The first question to ask yourself is if you need a native application, if you do not then designing a mobile web site solution should give you the most cross compatibility, failing that I would make a iPhone and J2ME solution (the J2ME can then be ported for Android relatively easily) for the greatest coverage of users

kgutteridge
A: 

try out different cross platform dev tools,

http://stackoverflow.com/questions/3369413/what-is-the-common-things-across-mobile-platform

sohilv