I am a C++ programmer interested in developing applications for Android as well as the iPhone platform. I have explored both these platforms by writing simple applications in Java (Android) and Objective-C (iphone). But the fact is that I am not comfortable with either of these languages, and it bothers me that I have to write 2 very different versions of the same application to support both platforms. (And then what do I do to run it on a Nokia phone?)
I开发者_开发问答s using web technologies (JavaScript/HTML/CSS) a viable solution for writing apps which will run on multiple mobile platforms? I have heard of Appcelerator and PhoneGap, but I am not sure how mature these products are. I'd appreciate any feedback from folks who have used web apps as a solution for developing cross platform mobile apps.
The two solutions that you mention will certainly produce something that runs and is cross-platform. However, the apps will never have the same great experience as native apps. They will never be able to fully use all the great native APIs.
For some apps this will work. Others will look and feel terrible. And you know how Apple users react to that :-)
Will your app run as a normal webapp? If the web provides everything you need then I'd strongly suggest writing a mobile enabled webapp, instead of trying to push apps to each platform. This will get you compatibility with every device that can run a web browser.
The 3 most mature are:
Quickconnect at sf PhoenGap at github? Rhmobile at github
Write a cross-platform core in C++. Then you can use it from iPhone by renaming your files to .mm (Objective C++), and from Android by means of JNI (via NDK). The first part works like a charm from my experience. Haven't played with NDK much, but it's just GCC, so why not.
Think twice before you use a webview based solution such as PhoneGap. While PG is great, the Android webview is very broken on Android 4.x It very often results in a completely unacceptable experience. Don't bet the farm on webview, unless you have read and evaluated this: http://code.google.com/p/android/issues/detail?id=25147. Sure this will improve with future releases, but millions of 4.x phones with lame webviews will remain in the market for years. It's sad.
精彩评论