简体   繁体   English

使用Visual Studio进行跨平台移动应用程序开发的缺点

[英]Disadvantages of cross-platform mobile app development using Visual Studio

Microsoft has introduced his new Visual Studio, with compatibility to develop multi-platform applications for Android, iOS and windows. 微软推出了他的新Visual Studio,兼容开发适用于Android,iOS和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) What is the difference between developing native apps for each platform, and using this kind of tools? 1)为每个平台开发本机应用程序和使用这种工具有什么区别? What is the disadvantage compared to using for example Objective-C or Java for iOS and Android separately? 与单独使用iOS和Android的Objective-C或Java相比,有什么缺点?

2) Is there any dependencies in order to running developed apps on different OSs? 2)是否有任何依赖关系,以便在不同的操作系统上运行开发的应用程序? Something like .NET framework? 像.NET框架这样的东西?

3) Is there any performance cost? 3)是否有任何性能成本? Or works just like native ones? 或者像本地人一样工作?

4) What kind of apps are supposed to be developed with such tools? 4)应该用这些工具开发什么样的应用程序?

In my point of view , this not good idea to develop android or ios application in XAMARIN. 在我看来,在XAMARIN中开发android或ios应用程序并不是一个好主意。 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. 有一些依赖项,如Xamarin将C#编译为本机代码,但仍依赖于Mono运行时来完成大量工作。

Native, no cheating – this is native. 原生,没有作弊 - 这是原生的。 But there is an overhead, it isn't like ObjectiveC native. 但是有一个开销,它不像ObjectiveC原生。 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. 应用程序将变得更大 - 当您试图从限制资源的移动设备中获取最大功能时,这些小问题很重要。

You still need a mac for ios:-) A huge emphasis on better app patterns like MVC or MVVM, because user interface is still native. 你仍然需要一个用于ios的mac :-)非常强调更好的应用程序模式,如MVC或MVVM,因为用户界面仍然是原生的。 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编写大约70%的可重用代码,但最后30%或更多,具体取决于您的应用程序设计和性质,必须是本机的。

Generally speaking, in my experience, I've had better luck finding support and code samples for native, than for Xamarin. 一般来说,根据我的经验,我有更好的运气寻找本机的支持和代码示例,而不是Xamarin。

And like I said, you still need to know ObjectiveC and Java – even if you are using Xamarin. 就像我说的那样,你仍然需要了解ObjectiveC和Java - 即使你使用的是Xamarin。

And Visual Studio + Xamarin = $$$$$. 而Visual Studio + Xamarin = $$$$$。 Plus a Xamarin developed product, while superior than HTML5 and Packaged HTML5, is going to cost you more. 此外,Xamarin开发的产品虽然优于HTML5和打包的HTML5,但会花费更多。 You have to evaluate if your needs justify the cost. 您必须评估您的需求是否合理。

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

I provide some links of debate on this topic 我提供了一些关于这个主题的辩论链接

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

Android Xamarin limitation Android Xamarin限制

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

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

https://www.quora.com/Why-would-people-build-native-mobile-applications-for-Android-iOS-using-Java-Objective-C-when-they-could-use-Xamarin-C-for-all-platforms-if-license-cost-isnt-an-issue https://www.quora.com/Why-would-people-build-native-mobile-applications-for-Android-iOS-using-Java-Objective-C-when-they-could-use-Xamarin-C-换所有的平台,如果许可成本,心不是-AN-问题

Why I Don't Recommend Xamarin for Mobile Development 为什么我不推荐Xamarin用于移动开发

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM