React Native v Xamarin Forms - 选择跨平台应用程序环境 [英] React Native v Xamarin Forms - Choosing Cross Platform App Environment

查看:174
本文介绍了React Native v Xamarin Forms - 选择跨平台应用程序环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找Xamarin Forms来构建跨平台应用程序。我们想要一个针对iOS,Android和Windows Phone的框架。它似乎是一个不错的产品,但许可证成本可能会导致我们的业务模式出现问题,而Windows Phone开发的许可也不清楚。

I have been looking at Xamarin Forms for building a cross platform App. We would like a framework which targets iOS, Android and Windows Phone. It seems like a nice product, but the license cost may cause us a problem with our business model and also licensing for Windows Phone development is unclear.

我遇到了另一个称为React Native的框架声称能够构建跨平台应用程序。我想知道是否有人能够让我了解它的优点和缺点,特别是如果可能的话,相对于Xamarin Forms。有一件事是它使用Javascript,它可能无法很好地扩展(无论是代码维护还是执行性能)。但是,如果有人密切关注React,并对其实用性形成了一些客观意见,我将不胜感激。

I have come across another framework called React Native which claims to be able to build cross platform apps. I wondered if anyone could give me an idea of its strengths and weaknesses, in particular, relative to Xamarin Forms if possible. One thing is that it uses Javascript, which may not scale well (either in terms of code maintenance or execution performance). But I would be grateful for input from anyone who has looked closer at React and has formed some objective opinions about its usefulness.

https://facebook.github.io/react-native/

谢谢。

推荐答案

披露:我不是Facebook或微软员工,我不参与任何一个平台,我只是一个网络开发者开始学习如何使用本机反应进行开发。

disclosure: I'm not a Facebook or Microsoft employee, I'm not involved with either platform, I'm a web developer that just started learning how to develop with react native.

反应原生

由facebook和open sourced构建 - 它目前(截至2015年10月)仅支持iOS和Android。它类似于Xamarin,因为您构建的UI组件将转换为本机组件,而不是在Web视图中运行,例如在其他框架中(例如:Cordova);优点是本机组件比Web组件响应更快。

built by facebook and open sourced - it currently (as of October 2015) supports iOS and Android only. It is similar to Xamarin on the fact that the UI components you build are converted into native components, and DON'T run inside of a web view, such as in other frameworks (e.g: Cordova); the advantage is that native components are more responsive than web components.

应用程序应该能够共享业务逻辑代码和大多数UI组件,但作为团队反应本机投放每个平台都有自己独特的界面,你的应用程序应该考虑到这一点,因此它允许并鼓励你(虽然它不强制你)为每个平台编写你的应用程序UI界面。

Apps should be able to share the business logic code, and most of the UI components, but as the team behind react native puts each platform has its own distinct interface, and your app should account for that, and as such it allows and encourages you (it doesn't enforce you though) to write your app UI interface for each platform.

所有代码都是用Javascript(不是Java)编写的,在nodejs进程中运行,使用XML元素描述UI,并使用类似于CSS的模式进行样式化,但是在内部解析为Javascript。

All the code is written in Javascript (not Java), running in a nodejs process, with the UI described using XML elements, and styled with a pattern that is similar to CSS, but internally parsed as Javascript.

您的应用程序将在两个线程中运行,即运行大多数UI的主线程,以及运行业务逻辑的nodejs线程。当您构建应用程序时,这会产生一些影响。

Your app will run in two threads, the main thread where most of the UI will run, and the nodejs thread where your business logic will run. This have some implications when you architect your application.

框架已经足够成熟,可以构建生产就绪的应用程序,但是官方支持的跨平台组件仍然需要增加。社区也正在构建您可能想要使用的优秀跨平台组件,大多数(如果不是所有组件都是免费的)。

The framework is mature enough for you to build production ready applications, but the cross-platform components officially supported still needs to increase. The community is also building great cross platform components that you might want to use, most if not all of them are free.

现在反应原生工作的团队是什么? (基于我在网上观看过的会谈):

what is the team behind react native working now? (based on the talks I've watched online):


  • 修复资产的工作流程 - 目前如果您修改资产,首先要有为每个支持的平台在不同的地方执行此操作,以便在开发时查看更改,您必须重新编译应用程序。

  • 增加反应本机UI元素的数量(特别是对于android平台)

总之,这些是你需要考虑的要点:

In summary these are the points you need to consider:

                 Xamarin                     React Native

built by:        Xamarin                     Facebook
language         C#                          Javascript (nodejs)
age              mature                      (prod ready), but not mature
community:       good support                good support
platforms        iOS, Android, Windows       iOS, Android
cost             FREE (open sourced)         FREE (open sourced)

这篇关于React Native v Xamarin Forms - 选择跨平台应用程序环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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