介绍 (Introduction)

Recently, Flutter became a rising star on mobile app development and it looked very promising. I didn’t want to fall in love with this new framework because I was so disappointed with Xamarin / React Native. These two cross-platform frameworks made me believe native mobile development is the only answer. However, I was so tired of writing the same codes twice for iOS and Android. I did a lot of research on Flutter and decided to try it out.

最近,Flutter成为移动应用程序开发方面的后起之秀,它看起来非常有前途。 我不想爱上这个新框架,因为我对Xamarin / React Native感到非常失望。 这两个跨平台框架使我相信本地移动开发是唯一的答案。 但是,我为在iOS和Android上两次编写相同的代码感到非常厌倦。 我对Flutter进行了很多研究,并决定尝试一下。

I know making a tech decision is enjoyable, but at the same time, very painful. To help you make a great decision, I want to share my thoughts and experience in Flutter compare to Native iOS / Android development.

我知道做出技术决定很有趣,但与此同时,这也是非常痛苦的。 为了帮助您做出明智的决定,我想与本地iOS / Android开发人员分享我在Flutter中的想法和经验。

学习曲线 (Learning Curve)

Flutter uses Dart as its main programming language. It is not hard to get used to it if you are already familiar with Java and Javascript. I felt Dart is less productive and old-style compared to Swift/Kotlin. Also, some of its features and concepts are hard to understand. I prefer to write codes in Swift/Kotlin but don’t worry too much. Dart is fair enough.

Flutter使用Dart作为主要编程语言。 如果您已经熟悉Java和Javascript,就不难适应它。 与Swift / Kotlin相比,我觉得Dart的生产力和老式风格有所下降。 而且,它的某些功能和概念很难理解。 我更喜欢用Swift / Kotlin编写代码,但是不必太担心。 Dart足够公平。

You have to write codes for UI. Yes, this is the only option we have. There is no XML, Storyboard, or Interface Builder. However, it is actually where Flutter shines. If you write codes for UI, resolving merge conflicts becomes much easier and state management becomes much cleaner. If you have some experience with SwiftUI or React Native, it will be very easy for you. Even if you have not done writing codes for UI, I strongly recommend you to try it out since Declarative Style UI programming, like Flutter and React, is a strong trend and it will introduce a new world of UI programming to you. No worries, it is simple and easy.

您必须为UI编写代码。 是的,这是我们唯一的选择。 没有XML,情节提要或界面生成器。 但是,实际上是Flutter发光的地方。 如果为UI编写代码,则解决合并冲突将变得更加容易,状态管理也将变得更加简洁。 如果您有使用SwiftUI或React Native的经验,那么对您来说将非常容易。 即使您尚未编写用于UI的代码,我也强烈建议您尝试一下,因为像Flutter和React这样的声明式UI编程是一种流行的趋势,它将为您带来UI编程的新世界。 不用担心,这很容易。

However, state management in Flutter is where most people get stuck if they came from native mobile developments. There are multiple approaches to manage states. You will need to spend a decent amount of time on reading about Stateful Widget, BLoC, and Provider.

但是,如果Flutter的状态管理来自本地移动开发,那么大多数人就会陷入困境。 有多种方法来管理状态。 您将需要花费大量的时间来阅读有关有状态小部件,BLoC和提供程序的信息。

I won’t say the learning curve is flat since we all have different backgrounds. However, I personally enjoyed learning Flutter a lot and its documentation is apparently easy and beautiful.

我不会说学习曲线是平坦的,因为我们都有不同的背景。 但是,我个人很喜欢学习Flutter,并且它的文档显然很容易而且很漂亮。

生产率 (Productivity)

Once you get familiar with Flutter, Flutter is the clear winner in productivity.

一旦您熟悉Flutter,Flutter无疑是生产力的赢家。

We spend most of the time waiting for builds on the native mobile developments. A large iOS project usually takes more than one minute to build and Android is worse. The incremental build and the instant build improved its speed a lot but it’s still too slow compared to Flutter and React Native. With Flutter’s hot-reload and refresh, it only takes a few seconds.

Flutter vs Native用于移动开发相关推荐

  1. 【Flutter】Flutter 混合开发 ( Flutter 与 Native 通信 | Android 端实现 MethodChannel 通信 )

    文章目录 前言 一.Android 端 MethodChannel 构造函数 二.Android 端 setMethodCallHandler 方法 三.Android 端实现 MethodChann ...

  2. 【Flutter】Flutter 混合开发 ( Flutter 与 Native 通信 | Android 端实现 EventChannel 通信 )

    文章目录 前言 一.Android 端 EventChannel 构造函数 二.Android 端 setStreamHandler 方法 三.Android 端实现 EventChannel 通信步 ...

  3. 【Flutter】Flutter 混合开发 ( Flutter 与 Native 通信 | Android 端实现 BasicMessageChannel 通信 )

    文章目录 前言 一.Android 端 BasicMessageChannel 构造函数 二.Android 端 MessageCodec 子类实现 三.Android 端 setMessageHan ...

  4. 【Flutter】Flutter 混合开发 ( Flutter 与 Native 通信 | 完整代码示例 )

    文章目录 前言 一.Android 端完整代码示例 二.Flutter 端完整代码示例 三.相关资源 前言 前置博客 : [Flutter]Flutter 混合开发 ( Flutter 与 Nativ ...

  5. 【Flutter】Flutter 混合开发 ( Flutter 与 Native 通信 | 在 Flutter 端实现 EventChannel 通信 )

    文章目录 一.EventChannel 简介 二.EventChannel 在 Dart 端的实现 1.EventChannel 构造方法 2.创建广播流 Stream 3.设置监听回调函数 4.Ev ...

  6. 【Flutter】Flutter 混合开发 ( Flutter 与 Native 通信 | 在 Flutter 端实现 MethodChannel 通信 )

    文章目录 一.MethodChannel 简介 二.MethodChannel 在 Dart 端的实现 1.MethodChannel 构造函数 2.invokeMethod 函数 3.MethodC ...

  7. 【Flutter】Flutter 混合开发 ( Flutter 与 Native 通信 | 在 Flutter 端实现 BasicMessageChannel 通信 )

    文章目录 一.BasicMessageChannel 简介 二.BasicMessageChannel 在 Dart 端的实现 1.BasicMessageChannel 构造方法 2.使用 Basi ...

  8. 【Flutter】Flutter 混合开发 ( Flutter 与 Native 通信 | 通信场景 | Channel 通信机制 | Channel 支持的通信数据类型 | Channel 类型 )

    文章目录 一.Flutter 和 Native 应用之间的通信场景 二.Flutter 和 Native 的 Channel 通信机制 三.Channel 通信机制支持的数据类型 四.Channel ...

  9. Flutter 核心原理与混合开发模式

    作者:airingdeng,腾讯QQ前端开发工程师 本文将从 Flutter 原理出发,详细介绍 Flutter 的绘制原理,借由此来对比三种跨端方案:之后再进入第三篇章 Flutter 混合开发模式 ...

最新文章

  1. 为什么你那么努力,却很难突破技术瓶颈?
  2. 腾讯微博即将关停,十年了,你用过吗?
  3. idea教程--使用mave创建普通java项目
  4. Anordighos手绘休闲脚本字体
  5. 蓝桥杯java第六届决赛第三题--显示二叉树
  6. 三、在应用中升级----网络编程部分
  7. C++远航之封装篇——数据的封装
  8. mysql 主键溢出检查_详解MySQL 表中非主键列溢出情况监控
  9. linux vi路径配置,Linux 下 Vi 配置文件 .vimrc 文件
  10. ELK-部署Logstash
  11. 从堂兄平淡人生看人生价值的实现---有感于堂兄54岁成为家乡新闻人物
  12. 目标检测从两阶段R-CNN系列到单阶段YOLO系列精炼
  13. 不断突破道,用道来挣钱才能长稳,才能心安!
  14. linux泰语语言包,linux安装中文语言包(示例代码)
  15. 感悟生活,再来聊聊拼多多
  16. 台式计算机鼠标,台式电脑鼠标怎么选?
  17. sql查询每科成绩的最高分_SQL查询语句: 查询 每科目分数最高的5项(学生姓名,科目,分数)...
  18. Python-Python 2 和Python3
  19. 程序员要注重沟通能力的提升
  20. SNMP采集测试工具使用方法

热门文章

  1. Android 圆形旋转菜单
  2. 11.Moveit 末端坐标系姿态表示形式——四元数
  3. SE:17.网络编程
  4. 集合--Set集合--HashSet类、LinkedHashSet类、TreeSet类及其自然排序
  5. PWA——下一代的web应用模型
  6. linux 列转行函数,GP行转列、列转行函数
  7. 统计学方法机器学习实战(二) K近邻算法
  8. 百度鹰眼android开发,百度鹰眼Android SDK 运行配置
  9. Unity3D网络游戏《僵尸星球》
  10. ubuntu系统20.4搭建c语言环境,ubuntu 20.04 中文环境和英文环境切换