使用Visual Studio进行跨平台移动应用程序开发的缺点 [英] Disadvantages of cross-platform mobile app development using Visual Studio

查看:244
本文介绍了使用Visual Studio进行跨平台移动应用程序开发的缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

微软推出了他的新Visual Studio,兼容开发适用于Android,iOS和Windows的多平台应用程序。

Microsoft has introduced his new Visual Studio, with compatibility to develop multi-platform applications for Android, iOS and windows.

这对开发人员来说是一个非常好的消息,一家大型可靠的公司生产这样的东西。它可以让生活变得更轻松。

This is a very good news, for developers, that a large and reliable company produced such a thing. It can make life easier, a lot.

但是,如你所知,当你获得优势时,总有一些缺点。所以我想知道:

But, as you know, there are always disadvantages when you get advantages. So I want to know:

1)为每个平台开发本机应用程序和使用这种工具有什么区别?与单独使用iOS和Android的Objective-C或Java相比有什么缺点?

1) What is the difference between developing native apps for each platform, and using this kind of tools? What is the disadvantage compared to using for example Objective-C or Java for iOS and Android separately?

2)是否存在任何依赖关系以便在不同的操作系统上运行开发的应用程序?像.NET框架这样的东西?

2) Is there any dependencies in order to running developed apps on different OSs? Something like .NET framework?

3)是否有任何性能成本?或者像原生的一样工作?

3) Is there any performance cost? Or works just like native ones?

4)应该用这些工具开发什么样的应用程序?

4) What kind of apps are supposed to be developed with such tools?

推荐答案

在我看来,在XAMARIN中开发android或ios应用程序并不是一个好主意。首先是性能问题。您无法像本机应用程序那样实现性能。
有些依赖项如Xamarin将C#编译为本机代码,但仍然依赖Mono运行时来完成大量工作。

In my point of view , this not good idea to develop android or ios application in XAMARIN. First of all performance issue occurs. You can not achieve performance like native application. There are some dependencies like Xamarin compiles C# to native code, but still relies on the Mono runtime to do a lot of its work.

原生,没有作弊 - 这是原生的。但是有一个开销,它不像ObjectiveC原生。这些应用程序会变得更大 - 当您试图从限制资源的移动设备中获取最大功能时,这些小问题很重要。

Native, no cheating – this is native. But there is an overhead, it isn’t like ObjectiveC native. The apps are going to be larger – this minor stuff matters when you are trying to get the max oomph out of your very resource restrictive mobile device.

您仍然需要一台Mac for ios :-)
非常强调更好的应用程序模式,如MVC或MVVM,因为用户界面仍然是原生的。您可以使用Xamarin编写大约70%的可重复使用代码,但最后30%或更多,取决于您的应用程序设计和性质,必须是原生的。

You still need a mac for ios:-) A huge emphasis on better app patterns like MVC or MVVM, because user interface is still native. You can write about 70% reusable code using Xamarin, but the last 30% or more depending upon your app design and nature, has to be native.

一般来说,在根据我的经验,我找到了本地的支持和代码示例,而不是Xamarin。

Generally speaking, in my experience, I’ve had better luck finding support and code samples for native, than for Xamarin.

就像我说的那样,你仍然需要了解ObjectiveC和Java - 即使您使用Xamarin。

And like I said, you still need to know ObjectiveC and Java – even if you are using Xamarin.

并且Visual Studio + Xamarin = $$$$$。此外,Xamarin开发的产品虽然优于HTML5和打包的HTML5,但会花费更多。你必须评估你的需求是否合理。

And Visual Studio + Xamarin = $$$$$. Plus a Xamarin developed product, while superior than HTML5 and Packaged HTML5, is going to cost you more. You have to evaluate if your needs justify the cost.

然而,在实际应用中,我认为它不是很有用。考虑一下......如果您使用C#进行编码,则必须将此代码转换为objective-C或Java,并且该转换依赖于Xamarin SDK。如果Apple明天在iOS的下一个版本中发布4,000个新API,那么在Xamarin API允许您调用这些本机API之前需要多长时间?如果添加Java,则乘以2。如果您不能等待,那么您可以在C#中编写代码,然后为其余代码编写本机代码,但现在您支持三个代码库,并且Xamarin的优势飞出窗外。

However, in practical application, I don't think it is very useful. Consider this... If you are coding in C# then this code has to be translated into objective-C or Java, and that translation depends on the Xamarin SDK. If Apple releases 4,000 new APIs in the next release of iOS tomorrow, how long will it be before the Xamarin API allows you to call those native APIs? And multiplied by two if adding Java. If you can't wait, then you code what you can in C#, and then write native code for the rest, but now you are supporting three code bases, and the advantage of Xamarin flys out the window.

我提供了一些关于这个主题的辩论链接

I provide some links of debate on this topic

http://willowtreeapps.com/blog/xamarin-or-native-development-tools-for-ios-android-项目/

Android Xamarin限制

Android Xamarin limitation

https://developer.xamarin.com/guides/android/advanced_topics/limitations/

https://www.linkedin.com/grp/post/121874-5848849341191569409

https://www.quora.com/Why-would-people -build-原生移动应用程序 - - Android的IOS的使用的Java-的Objective-C-时,他们-could-use-Xamarin-C-for-all-platforms-if-license-cost-annt-an-issue

为什么我不推荐Xamarin进行移动开发

这篇关于使用Visual Studio进行跨平台移动应用程序开发的缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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