Flutter vs React Native 的区别

    xiaoxiao2022-07-02  145

    Hello All, happy reading.  

    大家好,祝阅读愉快。

    I think everybody knows, what is Flutter and React native ?  

    我想所有人都知道,什么是 Flutter 和 React Native ?

    If you don’t have an answer, no worries let’s tighten your seat belts will have nice drive on mobile platforms and their comparisons, and what to choose for better development.

    如果你没有答案,请不用担心,让我们系好安全带,开启一段美妙的旅程,通过下文详细介绍两者的区别,以便让我们对两者有更清晰的认识,做出最更好的选择。

    Before dive into the Flutter vs React Native comparisons, let us have a quick look on evolution of Mobile platforms.  

    在深入了解Flutter vs React Native比较之前,让我们快速了解一下移动平台的发展。

    Mobile Platforms

    The leading mobile platforms are iOS (Apple), Android (Google), where as we had Windows and Blackberry platforms also available, based on the performance, usage and simple UI these two platforms are no where in the market and they are outdated.  

    目前市场上主流的平台是 iOS (苹果) 和 Android(谷歌),同时还有 Windows 和 Blackbrry 平台。基于性能、使用和简单的用户界面,目前这两个平台已经没落了,可以忽略。

    The following picture demonstrates the clear vision on current ruling platforms  

    下图展示了当前移动平台统治的一个现状Android & iOS competitors

    Android & iOS competitors

    Mobile Development Approaches

    Mobile app development is complex. To build apps that reach all users, developers must deal with many different operating systems, SDKs, development tools, screen size and form factors, as well as technology landscape that is still in a constant state of flux.  

    移动应用程序开发很复杂。要构建覆盖所有用户的应用程序,开发人员必须处理许多不同的操作系统,SDK,开发工具,屏幕大小和外形规格,以及仍处于不断变化的技术环境。

    Choosing how to build a mobile app, though, can have the most dramatic effect on the eventual cost, time, and success of a mobile project. This is second only to determining the scope and functionality of the app itself. Failure to match an application’s requirements to the right mobile development approach all but guarantees wasted time and effort–often resulting in a less effective end result.  

    但是,选择如何构建移动应用程序可以对移动项目的最终成本,时间和成功产生最显着的影响。这仅次于确定应用程序本身的范围和功能。未能将应用程序的要求与正确的移动开发方法相匹配,除了保证浪费时间和精力 - 通常导致最终结果不太有效。

    There are three primary approaches to building mobile apps today: Cross-Platform, Hybrid and Native.  

    目前构建移动应用程序有三种主要模式:跨平台,混合 和 纯原生。

    Native Approach (Platform specific tools)

    Native app development name implies, native apps are built using platform-specific SDKs and development tools provided by the platform vendors. For iOS, that means apps are built using Swift / Objective C in Apple’s Xcode. Android, that means apps are built using Kotlin / Java in Android Studio. Windows Phone is .NET and Visual Studio, and so on. Every platform has its own SDKs, and often, its own programming language.  

    原生应用程序开发意味着,原生应用程序是使用平台供应商提供的平台特定的SDK和开发工具构建的。对于iOS,这意味着应用程序是使用苹果的Xcode中的Swift / ObjectiveC构建的。Android,这意味着应用程序是在Android Studio中使用Kotlin / Java构建的。Windows Phone是.NET和Visual Studio,依此类推。每个平台都有自己的SDK,通常也有自己的编程语言。

    The advantage of native mobile apps, of course, is maximum access to the features and APIs available on each platform. If something can be done on a mobile device, then native apps will impose the fewest limits.  

    当然,原生移动应用程序的优势在于最大限度地访问每个平台上可用的功能和API。如果可以在移动设备上执行某些操作,则原生应用程序将施加最少的限制。。

    “Native architecture tends to offer the richest, most graphically engaging user experience, high performance, and the ability to integrate with native device functions and backend enterprise systems.”

    原生架构倾向于提供最丰富,最具图形吸引力的用户体验,高性能以及与本机设备功能和后端企业系统集成的能力。

    Hybrid Approach (Mix of cross-platform & native)

    Recognising that most developers, given the choice, would prefer apps that have the “reach” of web and the “richness” of native, hybrid attempts to blend the benefits of web and native mobile app development. According to a recent UI Survey on HTML5, when asked what makes HTML5 development more appealing than other options for writing software, 62% said reach/cross-platform support as one of the biggest benefits. Hybrid apps are developed using standard web technologies, like HTML, JavaScript and CSS(cross-platform) and native components, but are able to overcome the limits of “pure” web apps by using platform-specific native “wrappers” to package and deploy the code.  

    认识到大多数开发者,如果有选择的话,会更喜欢那些“触手可及”的应用程序,以及那些“丰富多彩”的原生混合型应用程序,它们试图将web和原生移动应用程序开发的好处融合在一起。根据最近一项关于HTML5的用户界面调查,当被问及是什么使得HTML5开发比其他编写软件的选项更具吸引力时,62%的人表示,Reach/Cross Platform支持是最大的好处之一。混合应用程序使用标准的Web技术(如HTML、javascript和CSS(跨平台)和原生组件)开发,但能够通过使用特定于平台的本机“包装器”打包和部署代码来克服“纯”Web应用程序的限制。

    The native wrappers allow hybrid apps to be installed on devices, deploy via app stores and access native device APIs via JavaScript. Since hybrid apps are built with web technologies,  

    原生打包程序允许在设备上安装混合应用程序,通过应用程序存储进行部署,并通过JavaScript访问本机设备API。因为混合应用程序是用网络技术构建的。

    Cross-Platform Approach (Java Script, HTML, CSS)

    跨平台方法(Java脚本、HTML、CSS)

    “ Write once deploy Twice” | Cross-platform development is the practice of developing software products or services for multiple platforms or software environments. Engineers and developers use various methods to accommodate different operating systems or environments for one application or product.  

    “一份代码,部署两次”|跨平台开发是为多个平台或软件环境开发软件产品或服务的实践。工程师和开发人员使用各种方法为一个应用程序或产品适应不同的操作系统或环境。

    Different cross platform approaches

    The idea of cross-platform development is that a software application or product should work well in more than one specific digital habitat. This capability is typically pursued in order to sell software for more than one proprietary operating system, such as to accommodate use on both Google and Apple platforms.  

    跨平台开发的思想是,软件应用程序或产品应该在多个特定的数字环境中有良好的运行。这种能力通常是为了向多个专有操作系统销售软件而实现的,例如适用于Google和Apple平台。

    In general, cross-platform development can make a program less efficient. For example, it can require redundant processes or file storage folders for the various systems that it’s supposed to support. It may also require that a program be “dumbed down” to accommodate less sophisticated software environments. However, in many cases, the makers of software figured out that the limitations of cross-platform development are worth dealing with in order to offer an application or product to a wider set of users.  

    一般来说,跨平台开发会降低程序的效率。例如,对于它应该支持的各种系统,它可能需要冗余的进程或文件存储文件夹。它还可能需要“简化”程序以适应不太复杂的软件环境。然而,在许多情况下,软件制造商发现,为了向更广泛的用户提供应用程序或产品,跨平台开发的局限性是值得处理的。

    There are many cross-platform approaches are in the market, and “React Native” is the best of all the other approaches, but it has many advantages and dis-advantages.  

    市场上有许多跨平台的开发框架,而“React Native”是目前所有已知的框架中使用最多的,但它有许多优点和不足之处。

    Here comes the Google’s Flutter with powerful features and nice architecture.

    Flutter vs React Native :

    React native

    React native is an open source mobile application framework created by Facebook. It is a cross platform technology where we can develop both iOS and Android apps.  

    React Native是一个由Facebook创建的开源移动应用程序框架。它是一种跨平台技术,我们可以在其中开发iOS和Android应用程序。

    React native there for in the market around 4 years (March 26, 2015) and lot companies uses it, like Myntra, Uber Eats, Instagram and Facebook. It is a quiet matured community, lot of applications are developed and launched in the market.  

    React Native 已经发展了4年左右(2015年3月26日)市场上很多企业都在使用它,比如Myntra、Uber Eats、Instagram和Facebook。它是一个安静成熟的社区,许多应用程序都在市场上开发和发布。

    Flutter

    “Build beautiful native apps for iOS/Android from a single code base”.  

    “从单一代码库构建适用于iOS / Android的精美原生应用”。

    Flutter is an open source mobile application framework created by Google. It is used to develop applications for Android and iOS, as well as being the primary method of creating applications for Google Fuchsia.

    Flutter是由Google创建的开源移动应用程序框架。它用于开发Android和iOS的应用程序,以及为Google Fuchsia创建应用程序的主要方法。

    Slowly all featured companies adopting Flutter, like Alibaba Group, Groupon, Hamilton and Google.

    慢慢地,Flutter逐渐被一些企业所尝试,如阿里巴巴集团、Groupon、汉密尔顿和谷歌。

    Architecture

    React Native architecture

    Flutter architecture

    2. Feature Set

    Feature set comparisons

    3. Corporate Sponsors

    Corporate sponsors

    4. Language Choice

    Language choice comparisons

    5. Difficulty Curve

    Difficulty level comparisons

    6. Productivity

    Productivity comparisons

    7. State Management

    State management comparisons

    Flutter take on featured companies

    Conclusion

    Flutter has more advantages over React Native, like Machine Code (AOT), Bridge less architecture, Widgets support (Flutter components) and most important it is Google’s product. They have already enormous experience on mobile platform (Android).

    My take on these different platforms is, every technology has their own strengths and weaknesses.

    “Based on Use Case”, we need to choose mobile platforms.

    If you are dealing with lot of platform specific API’s like HealthKit, Sensor based features, advanced animations and so on, Native Platform is better choice.

    If you are new to mobile technology and want develop both Android and iOS apps better to start with Flutter.

    If your application is dealing with less animation and lot of UI stuff, and you are good at Java Script and web frameworks React Native is better choice.

    If your application dealing with all the above cases and based on your convenience choose Hybrid app development.

    最新回复(0)