Orientation / development for several mobile platforms with one programming language (C #)? Costs and benefits?

Today, you can use C # programming for several mobile platforms, such as:

(feel free to edit if I missed some) Of course, this is still programming for the user interface, but the main application libraries can be shared.

We can all thank the team gathered around the Mono project and the superhero Miguel de Icaz the efforts are priceless.

What bothers me, what are the benefits of these options? Is it worth it to maintain a single application on multiple mobile platforms less obstacles, and then order each library separately for better performance. Learning curve of each language? Being Jack of all professions against .NET Ninja

Or knowing that the application binaries programmed in the native environment are smaller, they may even be better optimized and do not forget that you need to wait for support for new os platform updates.

UPDATE . Obviously, there is one more thing to consider, and that is support. Since Novell is acquired by Attachmate Group, the entire Mono team has been fired. However, a key member of the team, led by Miguel De Icasa, founded the new company Xamarin , which will invent Mono Mobile development tools from scratch.

+24
android windows-phone-7 xamarin.android
Mar 17 '11 at 6:45
source share
8 answers

In my opinion, a great professional using one single environment (like C # /. NET) is code portability. And cool things like LINQ, when you get used to it, you cannot live without it. However, several mobile OS (iOS, Android, WP7) are very different from the UI.

And, if I'm not mistaken about your application, it got a fair share of user interface interactions if it should run on a mobile device. Most mobile apps are like 80% UI code.

Thus, you still write a separate set of user interface code for each platform - for example, you will write in Silverlight WP7 (and in its entirety WPF), you will write completely different code sets for iOS in Cocoa (IB, Views, controllers and other), you will write another completely different set of code for Android.

My experience has always been that writing good user interface code on any platform requires a lot of experience - for example, learning WPF / SL is already a nightmare that throwing Cocoa Touch and all the mess in Android. Of course, you can write three sets of user interfaces that look and feel fairly similar, but most likely you will try so hard to reuse the code and have common data structures that your user interface will ultimately be lower compared to dedicated applications - - and in this world of mobile applications today, a non-super (not to mention parallel) user experience means death for your application.

In addition, all three mobile environments have different connectivity paradigms, as well as multimedia paradigms. You end up writing three versions and learning three environments, although you write in the same language that you are familiar with.

The most that you are going to reuse are server modules. Decision making mechanisms, search procedures, data management, etc. And even that will be problematic because you will have to make compromises in your data structures to simplify integration with three different sets of user interface code running on three different interface paradigms. For example, you use DependencyObjects to use to bind to Silverlight views in MVVM models? If you do this, this will not work with the Cocoa MVC model, and you will have to code these bindings separately.

And since not all mobile environments allow you to use the full range of functions, for example, MonoTouch for iOS does not have common designs that cannot be determined at compile time. You essentially use a very small subset of .NET (and you must constantly remind yourself what functionality you can use there) so that you can run them on three different platforms without significant changes.

Now an image that has all of these limitations when you write for the WP7 platform, which supports the full range of .NET features. I don’t know about you, but I’ll lose my mind. And your WP7 app will never be close to being competitive with other apps out there.

In my opinion, pain and compromises are not worth it. As a result, you get three so-so applications that will not like any of the platforms.

If all your kindness lies in the logic of your application, and it is so good that people will ignore user interface problems in order to gain access to the functionality of your application. In my experience, this almost never happens.

+19
Mar 23 '11 at 13:12
source share

The biggest advantage for me is the ability to reuse business logic and communication code between mobile platforms. Yes, I have to write UI again and again, and it takes time to think it over, but at least my underlying platform is reused.

In my experience, when moving to a new platform, it takes me a lot longer to learn the user interface structure than to learn a new language.

+2
Mar 24 '11 at 10:02
source share

Since the accepted answer was written in 2011, several different frameworks have appeared that bring the MVC and MVVM patterns to Mono for Android and MonoTouch, which helps quite a lot when developing applications for these purposes.

For MVC, check out a project called MonoCross

For MVVM check Stuart Lodge MvvmCross

The latter contains a lot of code for opening images on three platforms, composing emails, opening web browsers, playing sounds, and more. It also handles navigation between ViewModels.

+2
Aug 20 2018-12-12T00:
source share

The big advantage is, of course, the reuse of code / class libraries on all platforms. With this in mind, you can quickly port / develop applications, which in turn reduces costs.

In addition, due to code reuse, this will reduce maintenance costs.

0
Mar 17 2018-11-11T00:
source share

There are certain flaws in the Monotouch / Droid libraries. There is a slight decrease in speed (about 5%, so in most cases they are not taken into account).

In my experience, the size is not much different. A significant part of the size is in resources (data resources, packed images and the like - not using a processor), and most applications do not carry so many resources (due to loading time and availability, there are many default settings on mobile platforms).

I do not think you should use frames in games. I do not have much experience in the development of mobile games, but the rather different framework that you use in game development (XNA, Android NDK ..) and the need for system resources (CPU usage, memory, etc.) make them pretty useless IMHO .

0
Mar 17 2018-11-11T00:
source share

Benefits:

  • The code is in one language and (mainly) on each platform.
  • Reduce development time
  • Cheaper

Disadvantages:

  • The inclusion of the necessary libraries significantly increases the minimum size of the application - if the application is large, the difference is not so significant.
  • Performance overhead

If you have money and people, it is always better for some people to focus on iPhone and Objective-C, on some Android and Java, etc. Thus, your programmers will have a deep knowledge of the platform that you are aiming at and be able to make sure that your application takes full advantage of the platform - the application does not have to be exactly the same (except, possibly, games) on all platforms, you need play your strengths and weaknesses: the iPhone application should look and function like an iPhone application, etc.

However, if you don’t have people or money, using one language together with several frameworks is certainly cheaper and faster and can give you better results than the result of an intense attempt to develop each platform individually.

0
Mar 20 '11 at 16:20
source share

Another way to look at this is that you can easily port your existing .NET / C # application to many mobile clients (both native and non-native) using WebORB . On the client side, you will need to code either in your native language, or you can create an Adobe AIR application that is portable enough for various mobile OSs such as iOS, Android and BlackBerry PlayBook.

0
Apr 18 '11 at 23:13
source share

A cross-platform solution only works if your application is simple and straightforward. If you need complex features such as a local data warehouse with complex object graphs, go to native or expect to spend months debugging problems.

0
Mar 07 '14 at 1:23
source share



All Articles