NativeScript与Flutter [英] NativeScript Vs Flutter

查看:218
本文介绍了NativeScript与Flutter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开始研究带有Angular语言的本地脚本.最好的部分是我可以用于Web&的代码共享技术.两者都使用移动应用程序.

但是我想在这里问的是Angular是Google开发的框架,Google还为本机移动应用程序开发提供了另一个框架,即扑打

为什么Google没有使用Telerik通过Native Script实现的Angular框架.我确信一定有某些原因.我想了解原因.

如果我可以开发Web&具有通用技能(即Angular)的移动应用程序,然后为什么我应该学习/选择像Flutter这样的新框架.

我不确定我是否应该在这个地方问这个问题.如果没有,那么请帮助我找到合适的地方.

解决方案

Flutter在这里不是主要问题,真正的问题是斯基亚(Skia).

skia是2D渲染引擎,它允许用户以高性能运行应用程序,而不是使用html(chrome Web引擎)或使用本机外观(nativescript),skia允许我们在屏幕上绘制每个像素屏幕,使我们可以流畅地编写游戏.

在动荡的Live 2018中受到谴责的Google的真实意图是在所有平台之间创建一个连贯的UI:

  • 桌面
  • 网络(蜂鸟)
  • 移动(颤振)

所有这些框架都将skia用于UI以及用于与OS交互的相应框架(浏览器,桌面,移动设备),因为skia是渲染引擎,并且我们控制每个像素,因此我们可以确保小部件在其上看起来相同所有类型的Skia框架.

另一方面,本机脚本使用它们加载在平台上的节点引擎,每次我们尝试使用组件时,我们都将其称为系统引擎,以具有本机外观的方式将组件放置在屏幕上,这使我们要直接使用运行Java/swift的虚拟机的功能,这就是为什么在nativescript中可以使用android.[ANDROID_JAVA_CLASS]ios.[SWIFT_CLASS].

本地脚本的主要发明是使用来自nodejs引擎内部的本机类,它们在运行时加载以执行特定的平台代码. 当您将本机脚本移动代码转换为PWA时,不需要此节点引擎,因为浏览器拥有自己的引擎,因此我们可以从PWA中删除不必要的代码.

注意:nativescript不是用于移动开发的有角度的框架,它是用于移动开发的nodejs框架,而Angular/vuejs只是在nativescript核心逻辑之上运行的框架. 这就是为什么如果您愿意,甚至可以为nativescript编写react插件的原因.

I have started working on Native Script with Angular. The best part is the code sharing technique which i can use for Web & Mobile app both.

But one thing which i want ask here is that Angular is a framework which is developed by Google and Google also provides another framework for Native mobile app development i.e. Flutter

Why Google hasn't used the same Angular framework which Telerik has implemented with Native Script. I am sure that there must be some reason for it. I want to understand the reason.

If i can develop Web & Mobile app with a common skill i.e. Angular, then why i should learn/choose a new framework like Flutter.

I am not sure whether is it the right place where i should ask this question or not. If not, then please help me to find the right place.

解决方案

Flutter is not the main deal here, the real thing is Skia.

skia is a 2d rendering engine which allows the user to run apps in high performance, this way instead of using html(chrome web engine) or using the native look and feel(nativescript) skia allows us to draw on each pixel of the screen, which allows us to write games in flutter.

Google real intentions as they reviled in flutter Live 2018 are to create a coherent UI between all platforms:

  • desktop
  • web (hummingbird)
  • mobile (flutter)

all of those frameworks use skia for UI and the respective framework for interacting with the OS (browser, desktop, mobile), because skia is a rendering engine and we control every pixel we can assure that a widget will look the same on all type of skia frameworks.

On the other hand nativescript use a node engine which they load on the platform, and each time we try to use a component we call the system engine to place a component on the screen with the native look and feel, this allows us to use features straight from the virtual machine which runs java/swift, this is why in nativescript you can use android.[ANDROID_JAVA_CLASS] or ios.[SWIFT_CLASS].

nativescript main invention is around using native classes from inside nodejs engine which they are loading on runtime in-order to execute the specific platform code. When you are transforming nativescript mobile code to a PWA there is no need for this node engine because the browser has it's own engine this way we can remove unnecessary code from the PWA.

NOTE: nativescript is not an angular framework for mobile development its a nodejs framework for mobile development and Angular/vuejs are just frameworks which runs on top of nativescript core logic. Thats why if you want you can even write a react plugin for nativescript.

这篇关于NativeScript与Flutter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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