Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mobile App - Targeting iPhone, WP7, Android, and Blackberry

Is there a sane way to develop a cross platform Mobile app? We want these to be native apps on each platform, and not necessarily some kind of web page.

Currently we're thinking to split it into two languages:

  • C# backend (business logic)
  • --> Standard C# app for WP7
  • --> App built on MonoTouch for iPhone/iPad/etc.
  • Java backend (business logic)
  • --> Standard Android Java app (MonoDroid version of C# not ready yet)
  • --> Standard Blackberry Java app

We could also develop initially in C# and use one of the conversion tools out there to get our C# converted into Java as a starting point.

Is there another approach? Our skillsets include mainly include a strong C# .Net background, and minor Java experience.

We don't really want to go low level and use something like C/C++ to get the job done. These are usually going to be simple LOB applications that communicate to some web service.

Side Question: how do game devs like the makers of Angry Birds do it?

UPDATE:

MonoDroid is now officially released. So it seems you would only need to use Java for the BlackBerry. We are considering not developing for BlackBerry at all, because developing for the other 3 platforms has been simplified. There is definitely some cost involved, as MonoTouch and MonoDroid are both $399 and you would also need a license for Visual Studio (this doesn't include cost for App store, etc.).

like image 777
jonathanpeppers Avatar asked Mar 23 '11 17:03

jonathanpeppers


2 Answers

There's no good simple answer that I know of for all mobile platforms. You can use development environments like Appcelerator Titanium, which cross-compile to native code on various platforms (right now, for instance, I think Titanium supports iOS and Android, with plans for Blackberry). However, these usually have a limited API that you have access to, and you still end up needing to design different UIs for the different platforms (in my commercial work, I have never successfully used such a platform)

You could also design all the business logic in a web-services back end, and then just write "thin client" apps for each platform. This works, but of course requires network access when the end user wants to use your app. (Usually it'll be there, but sometimes may not)

Ultimately, I usually end up doing what you propose -- writing the basic business logic in a couple of different languages as generically as possible, and then bundling that in with custom UI/device code for each platform. Haven't found a better way myself....

(BTW, I believe games like Angry Birds are written largely in OpenGL and then loaded onto the OpenGL processor on each platform. But I could be mistaken...)

like image 61
Jeff Hay Avatar answered Nov 10 '22 16:11

Jeff Hay


Those are some great answers. I agree, x-platform development is still very primitive. I'd like to add 2 points:

1) You do not need to write your backend in different languages. Choose one language (based on your comfort level, performance etc. criteria) and then connect from your platform-specific apps directly to the backend. If your backend is server-side code, one way of talking to it would be via XmlHttpClient. If it's a piece of native code common across various apps and is written in say C++, you can use JNI from Java and wrapper assembly from C#.

2) Another reason for avoiding x-platform tools is that you'd always need to wait for them to support the new APIs released by the platform vendor (Apple, Google, MSFT etc.). Once these companies release new APIs, the tools will need to be updated and only then will you be able to use the new APIs.

like image 39
Beta Avatar answered Nov 10 '22 16:11

Beta