Question

We have an line-of-business app that runs on Windows Mobile. It's a Winforms app with a local SQL CE database and gets its data from a WCF Web Service running on the server.

Now customers are always asking "why don't you make a version for iPhone/iPad/Android/Phone 7 etc". My boss asked how hard this would be. My initial answer is very hard especially since I would probably be the only person doing the work. I don't have any experience outside my Visual Studio happy place.

Now I've come across MonoTouch and MonoDroid. They appears to offer an easy solution but I'm sure there are lots of issues. I doubt that I will be able to just compile my app for Android.

I'm inclined to suggest that it would be far too much work and that the only realistic solution is a mobile web site with several versions of each page for different screen resolutions. Unfortunately the existing app has a local database and is "sometimes connected" so that won't cut it.

Any suggestions and tips before I waste a huge amount of time?

Cheers
Mark

Was it helpful?

Solution

I doubt that I will be able to just compile my app for Android

That is correct; you won't.

So, background: the design philosophy of MonoTouch and Mono for Android is to bring the "core" .NET and C# experience to iOS and Android while also exposing the underlying features of each specific platform. Whereas PhoneGap and Titanium abstract the underlying platform (for a "write-once, run-anywhere" vibe), MonoTouch and Mono for Android provide no platform abstractions and directly expose the underlying platform types and members.

The result is that MonoTouch programs use MonoTouch.UIKit.UIButton, which directly wraps the underlying CocoaTouch UIButton type.

Similarly, Mono for Android programs would use Android.App.Activity, which directly wraps the underlying Android android.app.Activity type.

Common across both platforms are the "core" framework namespaces and types which you find on .NET, .NET CF, Silverlight, Windows Phone 7, and Mono: System, System.Collections.Generic, System.Linq (yes, Linq-to-Objects), System.Xml.Linq (yes, Linq-to-XML), System.IO, etc., etc. For example, see the assemblies included in Mono for Android.

So, can you use your existing Windows Mobile app as-is on Android? No, because Mono for Android doesn't provide System.Windows.Forms.

However, it should be possible for you to refactor your existing code to follow a Model/View/Controller design pattern (or MVVM, or...), abstracting away the UI (View) so that you can replace it for various platforms, e.g. an iOS UI with MonoTouch, a WP7 UI with XAML, an Android UI with Mono for Android, an HTML UI with ASP.NET MVC, etc., etc. You won't get a "write once, run anywhere" experience, but you will be able to provide the user with native user interfaces which are consistent with their chosen platform.

For example, see the MIX11 Conference Apps, which utilize a common code base while providing platform-specific UIs for iOS, Android, and WP7.

OTHER TIPS

look at titanium and phonegap.

My suggestion is to have a quick look at WP7. It's quite easy to jump in to, even more so if you have Visual Studio (which you do) and C# experience of any sorts. Then you should be able to more easily guesstimate how long it would take you to develop a C# application (and possibly port that to Android using MonoDroid).

And yes, Titanium & PhoneGap are options, but I personally think MonoDroid looks better.

What platform are you getting the most requests for? I am guessing Android, as that seems the most likely. I have seen a lot of people saying MonoDroid is really solid.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top