针对/开发一个编程语言(C#)多个移动平台?成本效益? [英] Targeting/Developing for multiple mobile platforms with one programming language (C#)? Cost-Benefit?

查看:186
本文介绍了针对/开发一个编程语言(C#)多个移动平台?成本效益?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,它是能够使用C#编程多个移动平台,如:

Today it is possible to use C# programming for multiple mobile platforms such as:

  • WindowPhone7
  • Android - Monodroid
  • iPhone - Monotouch

(随时编辑,如果我错过了一些) 当然,它仍然是编程工作的用户界面,但应用程序的主库可以共享。

(feel free to edit if I missed some) Of course, it is still programming effort for UI, but main libraries of app can be shared.

我们都可以感谢一个团队聚集在项目和超级英雄的米格尔·德·伊卡萨的努力是无价的。

We can all thank to a team gathered around Mono project and superhero Miguel de Icaza whose effort is priceless.

让我困扰的是,什么是这些选项的好处是什么? 它是维护跨多个移动平台的一个应用程序较少的障碍则每个库分开不必code获得更好的性能成本。学习每种语言的曲线?作为所有交易VS .NET忍者

What bothers me is, what are the benefits of these options? Is it cost of maintaining one app across multiple mobile platforms less impediment then having to code each library separately for better performance. Learning curve of each language? Being Jack of All trades vs .NET Ninja

或者明知该应用程序的二进制文件在本地环境中编程较少的大小,甚至优化的更好,不要忘记,你必须等待支持新的平台,操作系统更新。

Or knowing that binaries of app programmed in native environment are less in size, maybe even optimized better and not to forget that you have to wait support of new platform os updates.

更新:显然有一件事要考虑,那就是支持。由于Novell公司是由Attachmate公司集团收购,所有的Mono团队被裁掉。但是的负责人米格尔·德伊卡萨核心成员成立新公司Xamarin 这将重塑从暂存单移动开发工具。

UPDATE: Obviously there is one more thing to consider and that is support. Since Novell is bought by Attachmate Group, all Mono team is laid off. However the core member of the team lead by Miguel De Icaza founded new company Xamarin which will reinvent Mono Mobile development tools from the scratch.

推荐答案

在我看来,使用一个单一环境的大促中(即C#/。NET)是code便携性。而凉的东西像LINQ的是,一旦你习惯了它,你不能没有。然而,一些移动操作系统的(IOS,安卓,WP7)与关于用户界面完全不同。

In my opinion, the big pro of using one single environment (i.e. C#/.NET) is code portability. And cool things like LINQ that, once you get used to it, you can't live without. However, the few mobile OS's (iOS, Android, WP7) are quite different with regards to UI.

而且,如果我没有记错你的应用程序,它有UI交互的公平份额,如果它是在移动设备上运行。大多数移动应用程序是像80%的用户界面code。

And, if I am not mistaken about your application, it's got a fair share of UI interactions if it is to run on a mobile device. Most mobile apps are like 80% UI code.

所以,你最终会编写一套独立的UI code为每个平台无论如何 - 例如,你会写在Silverlight WP7(和所有的WPF善良),你会写一个完全不同的code在可可的iOS(IB,视图,控制器和东西),你会写但一个完全不同的code为Android。

Therefore, you'll end up writing a separate set of UI code for each platform anyway -- for example, you'll be writing in Silverlight WP7 (and all the WPF goodness), you'll be writing a completely different set of code for iOS in Cocoa (IB, Views, controllers and stuff), you'll be writing yet a completely different set of code for Android.

我的经验一直认为它采取了很多的经验,写出优秀的UI code在任何​​平台上 - 例如学习WPF / SL已经被扔在可可触摸和整个Android的乱七八糟的噩梦。当然,你可以写三组用户界面的外观和感觉相当类似,但有机会,你会非常努力地试图重用code和有共同的数据结构,你的用户界面的最终会低于平均水平相比,专用的应用程序 - 在移动应用程序的今天,这种你死我活的世界中,严禁超(更不用说低于标准杆)的UI体验就意味着死亡您的应用程序

My experience has always been that it take a lot of experience to write good UI code on any platform -- e.g. learning WPF/SL is already the nightmare that is, throw in Cocoa Touch and the whole Android mess. Of course you can write three sets of UI that look and feel reasonably similar, but chances are that you'll be trying so hard to reuse code and have common data structures that your UI's will end up sub-par when compared to dedicated apps -- and in this cut-throat world of mobile apps today, a non-super (not to mention sub-par) UI experience means death to your app.

另外,所有三个移动环境有不同的连通性的范例,以及多媒体范式。你最终会写三个版本,并学习三种环境中,虽然写在一个语言,你所熟悉的。

Also, all three mobile environments have different connectivity paradigms, as well as multimedia paradigms. You end up writing three versions, and learning three environments, albeit writing in one language you're familiar with.

最你要重用的后端模块。决策引擎,搜索程序,数据管理等,甚至这些都将成为问题,因为你会力量在你的数据结构的妥协只是为了能够方便地与三组不同的UI code工作在三个不同的UI范式。例如,你用DependencyObjects使用绑定到Silverlight的意见在MVVM模式?如果你这样做,它不会与可可的MVC模式的工作,你必须code单独的绑定。

The most you're going to reuse is back-end modules. Decision engines, search routines, data-management etc. And even these are going to be problematic because you'll be force to have compromises in your data structures just to enable easy integration with three different sets of UI code working on three different UI paradigms. For example, do you use DependencyObjects for use to bind to Silverlight views in an MVVM model? If you do, it won't work with Cocoa's MVC model, and you have to code those bindings separately.

和因为不是所有的移动环境使您可以使用全套功能 - 例如,MonoTouch的为iOS确实不能在编译时确定不是通用的结构。你基本上使用.NET的一个很小的子集(且必须不断的进行提醒自己哪些功能可以用在),只是让你可以在三个不同的平台上运行他们都没有显著的变化。

And since not all mobile environments enable you to use the full set of functionalities -- for example, MonoTouch for iOS does not generic constructs that cannot be determined at compile time. You're essentially using a very small subset of .NET (and must constant be reminding yourself what functionality can be used where) just so that you can run them all on three different platforms without significant changes.

现在拥有所有这些限制的图像,当你写的WP7平台,支持设置整个.NET功能。我不知道你,但我会发疯。和你的WP7应用程序是永远不会甚至接近正在与其他应用程序竞争力在那里。

Now image having all these limitations when you are writing for the WP7 platform, which supports the entire .NET features set. I don't know about you, but I'll go crazy. And your WP7 app is never going to be even close to being competitive with other apps out there.

在我看来,痛苦和妥协是不值得的。你将最终有三个马马虎虎的应用程序,这人既不是平台会喜欢。

In my opinion, the pain and the compromises are not worth it. You'll end up with three so-so apps, which people in neither of the platforms are going to like.

除非所有的善良就在你的应用程序的后台逻辑,它是那么好,人们会忽略用户界面问题只是为了让您的应用程序的后台功能。根据我的经验,这种情况几乎不会发生。

Unless all the goodness lies in your app's back-end logic, and it is so good that people are going to ignore UI issues just to get to your app's back-end functionalities. In my experience, this almost never happens.

这篇关于针对/开发一个编程语言(C#)多个移动平台?成本效益?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆