views:

555

answers:

8

We create non-game programs that run on mobile devices; iPhones, Windows Mobile, Android, Palm WebOS and the like. Our main program is written in C# for Windows Mobile and we've been asked to port it to iPhone. We are not looking forward to:

  1. The learning curve to pick up Objective-C, XCode, and Cocoa Touch.
  2. The pain of maintaining two sets of code to keep the product in sync on two different platforms.

We've decided that as a strategy we want to create all new products on as many mobile platforms as possible simultaneously, a formidable task.

We know we'll have to bend on these, but we'd prefer to:

  • Avoid forcing our users to be connected to the web to use a product.
  • Not have a bunch of different sets of source code.
  • Support as many mobile platforms as we can.

My question is this; What is your suggestion for the best strategy to develop for the 2 - 5 most popular mobile platforms?

EDIT: Based on the comments, I wanted to clarify that we have a product that we well-received on both PalmOS and Winmobile. It works exactly the same on both platforms, making it easy for a user to switch handhelds and still use it.

Now we're on the verge of creating many new business apps and want to expand that to other hardware/OSes. What are your suggestions to deploy on many new platforms with the minimum of pain?

+7  A: 

Consider implementing your applications via the web. This violates your preference for "avoiding your users to be connected to the web", but consider the web for the following reasons:

  1. If your C# applications were written the right way, you could expose a web front-end to these applications by reusing your existing libraries.
  2. Web 2.0 is supported by nearly all modern mobile platforms.
  3. Your developers could continue writing in the language they're used to (C#).
  4. There are many advantages to writing web apps vs platform-specific apps.
James Jones
I'm surprised no-one has asked him to look at offline web apps, which seem to meet the unconnected criteria while maintaining the goal of fitting as many platforms as possible.
Kendall Helmstetter Gelner
Unconnected web apps is hard on say WIndows Mobile, but give a year or two and WinMob will not be a problem anymore.
PeyloW
+1  A: 

With a c# application for the Iphone check out Monotouch. Its the OSS version of the .net framework for the iphone.

John Nolan
+5  A: 

Consider Appcelerator Titanium, Rhomobile's Rhodes, PhoneGap, xmlvm.org, or other cross-device toolkits.

CommonsWare
Using cross-device toolkits will help you get to market fast. It will however mean that you get a crappy user experience on all devices. This can be fatal to your business; iPhone and Android users have thousands of apps to chose from, with good user experience, and have become picky. If they do not think the app is Android- or iPhone-like enough they will skip your app. Which is bad since Android and iPhone users are the once you want, they are much more likely to pay for applications.
PeyloW
+3  A: 

I suggest you to separate the core of your application and the GUI. So you can continue to develop your applications in C# for Windows mobile and iPhoneOS (thanks to monoTouch). With this strategy you have only to develop the specific GUI on Windows mobile (C#) and iPhone (Cocoa Touch).

For other mobile os you can not use a cross platform dev env (for now). You need to redevelop all you application.

So:

  • Windows Mobile: Core(C#) & GUI(C#)
  • iPhone: Core(C#) & GUI(Cocoa Touch)
  • Android: Core(Java) & GUI(Java)
  • Other: depends on OS
Patrice Bernassola
MonoTouch still is no answer. You still have to learn CocoaTouch, and then implement your app without even a decent debugger. Also MonoTouch will not help you on Android. Instead write your application logic in plan C. And write three different user interfaces. Cocoa Touch on iPhone, in Java with JNI calls on Android, and in .NET with native calls on Windows Mobile.
PeyloW
+1  A: 

I'll go against the grain and give you some tough love instead of simply answering the question you asked.

My thought is, why would you want to make 2-5 versions of your application that will receive, at best, a lukewarm reception across all platforms? Because that is what you are going to get.

If you want to make applications that are well received and make users excited to use them, make them take advantage of the platform. iPhone apps should have well thought out user input and take advantage of as many platform features as possible, like mutl-touch, easy data storage, accelerometers, camera and so on.

Palm apps work great in the background so write something that takes full advantage of that. it might even be more than one app to keep to Palm's simple and small approach to apps.

Android apps can integrate much more tightly with the system, so let them do just that to the benefit of the user.

Your main benefit with any app should be that you understand the domain completely, and can describe what aspects of the problem domain work best with the strengths of any given device. Mobile apps are small(ish) and any small gain you get from trying to share code across devices (and how does that work exactly across Java/Obj-C much less Android to Blackberry library differences?) is totally lost in the distortion of your understanding through the prism of accommodation.

Kendall Helmstetter Gelner
+2  A: 

Virtualization

Depending on your hurry I heard that VMWare is working on a mobile virtualization product that would make it possible to unify platforms into a single execution point within VM on a mobile device. It will almost certainly support majority of smartphone platforms (Windows Mobile, Android, Symbian, Blackberry and maybe even iPhone). They (and we) would definitelly benefit the most when they'd support all of them.

If you're not in a hurry, maybe wait a bit.

Robert Koritnik
+4  A: 

I make the assumptions that you have already done your market research and actually knows that all platform will be profitable, and not just drain your resources developing for one or two.

There is no great answer unless you break the "no connect to internet" rule. But there is a good answer; plain old C.

Implement all application logic in plain old C. Then;

  • iPhone - Objective-C is a strict superset of C, so just use the code as is. And write a UI in Objective-C using Cocoa Touch.

  • Android - Android's Java have JNI for calling native code written in C. Write a thin glue layer, and implement your UI with normal Java for Android.

  • Windows Mobile - You can call native code from any .NET application. So write another thing glue layer, and implement your UI using C# or your prefered .NET language.

  • Symbian - Symbian uses a variant of C++, so just like on iPhone you can call your C code as is. Write your UI using C++ and Symbian API:s.

If you break the "no connect to internet" rule then implementing the server with your existing C# code and exposing it as a web service using HessianC# is a snap. And then Hessian implementations are available for every phone that you can install an application on, that has been sold since 2002 or so.

PeyloW
A: 

A bit late to your question. But you can use Rhodes (http://rhomobile.com/products/rhodes) to write for every major smartphone OS. Tens of thousands of other developers do. Rhodes was the first smartphone app framework and the only one to provide the benefits of Model View Controller enjoyed by web developers to native smartphone development.

Adam Blum
It's never too late to add to a question. Thanks, Adam.
Rap