flutter 优缺点_使用Flutter进行移动开发的优缺点

flutter 优缺点

flutter 优缺点_使用Flutter进行移动开发的优缺点

Flutter is a new open source framework created by Google that assists in developing native Android as well as iOS apps with one codebase. It is more than just a framework as it is a full software development kit that has everything you require for building cross-platform apps. This Flutter review will look into the advantages and disadvantages of the tool.
Flutter是Google创建的一种新的开源框架,可帮助开发具有一个代码库的本机Android和iOS应用程序。 它不只是一个框架,还因为它是一个完整的软件开发工具包,其中包含构建跨平台应用程序所需的一切。 这篇Flutter评论将探讨该工具的优缺点。

优点 (Advantages)

1.高性能 (1. High Performance)


Numerous factors impact the performance of an app, including CPU usage, frame number per second, average response time, request number per second, and more. Flutter offers a consistent 60fps, which is the rate at which contemporary screens display a smooth and clear picture.
许多因素都会影响应用程序的性能,包括CPU使用率,每秒帧数,平均响应时间,每秒请求数等等。 Flutter可提供稳定的60fps,这是当代屏幕显示平滑清晰图像的速率。
Developers attempt to keep motion at this level since any lag in this frame rate can be identified by the human eye. When compared to React Native and Xamarin, this framework was ahead with 220-millisecond launch time and 58fps.
开发人员试图将运动保持在此水平,因为人眼可以识别出该帧速率中的任何延迟。 与React Native和Xamarin相比,此框架的启动时间为220毫秒,速度为58fps。

2.可访问性和国际化 (2. Accessibility and Internationalization)


As a result of advocating for inclusivity and diversity, Google offers integrated opportunities to make apps that can be accessed by a broad spectrum of users. Normally, when you need your app to operate in different regions and languages, you want to get your code ready for localized content, which is usually created later. This process is referred to as internationalization.
倡导包容性和多样性,因此Google提供了整合的机会来制作可被广泛用户访问的应用程序。 通常,当您需要使应用程序在不同的地区和语言中运行时,您希望为本地化的内容准备好代码,这些内容通常是在以后创建的。 此过程称为国际化。
Flutter for mobile development natively offers widgets that are based on the Dart intl package, which makes this process more straightforward. It now supports 24 languages, but also units of measure, layout options, currencies, and dates.
用于移动开发的Flutter原生提供基于Dart intl程序包的小部件,这使此过程更加简单。 现在,它支持24种语言,还支持度量单位,布局选项,货币和日期。

3.立即更新 (3. Immediate Updates)


Flutter’s architecture has been engraved with hot reload function to allow for instant updates without the need for plugins. With hot reloading, you can view updates in real time. If you experience an error as you run the code, the framework allows you to fix it immediately and to carry on without having to restart it.
Flutter的体系结构上刻有热重载功能,无需插件即可立即进行更新。 通过热重装,您可以实时查看更新。 如果您在运行代码时遇到错误,则该框架允许您立即对其进行修复并继续运行而不必重新启动它。
Returning to normal programming where it takes many minutes for deployment can be a problem. Hot reload improves your productivity, allows for experimentation without lengthy delays, and assists with fast iterations.
返回到需要花费几分钟时间进行部署的常规编程可能是一个问题。 热重装可提高您的生产率,允许进行实验而不会造成长时间的延迟,并有助于快速迭代。

4.温和的学习曲线 (4. Mild Learning Curve)


If learning Dart is simple, then familiarizing yourself with this tool will be easier. Many people with little coding knowledge can develop prototypes and apps with the framework. Also, you don’t need any mobile development experience to use it.
如果学习Dart很简单,那么熟悉此工具将更容易。 许多没有编码知识的人都可以使用该框架开发原型和应用程序。 另外,您不需要任何移动开发经验即可使用它。
Moreover, Google is popular for developing well-structured and detailed documentation, which is something that React Native has an issue doing. You can go through these documents as well as video lessons and Codelabs’ practical lessons. Courses are available on Udacity and Udemy, and you can even join Facebook communities.
此外,Google因开发结构合理且详细的文档而受到欢迎,这是React Native遇到的问题。 您可以阅读这些文档以及视频课程和Codelabs的实践课程。 在Udacity和Udemy上提供课程,您甚至可以加入Facebook社区。

5.用于快速UI编码的自定义和现成的小部件 (5. Custom and Ready-made Widgets for Quick UI Coding)


This tool uses ready-designed widgets. With these building blocks, the tool assists you in creating a user interface. While many approaches utilize different objects like controllers, views, and layout, this framework features a unified and consistent object model. Every object in this tool is a widget, including fonts, buttons, and paddings. You can combine widgets to form layouts, and you can decide to utilize widgets on any customization level.
该工具使用现成的小部件。 使用这些构建块,该工具可以帮助您创建用户界面。 尽管许多方法利用不同的对象(例如控制器,视图和布局),但是此框架具有统一且一致的对象模型。 该工具中的每个对象都是一个小部件,包括字体,按钮和填充。 您可以将小部件组合为表单布局,并且可以决定在任何自定义级别使用小部件。
Widgets in this framework are arranged in trees, which assists in rendering. But they can lead to excessive sophistication of the complete structure. Big applications can need as many as ten layers of code to form a basic object. Hence adequate planning of the structure is needed in advance.
该框架中的小部件排列在树中,这有助于渲染。 但是它们可能导致整个结构过于复杂。 大型应用程序可能需要多达十层代码才能形成一个基本对象。 因此,需要事先对结构进行适当的规划。

缺点 (Disadvantages)

1. iOS问题 (1. Problems with iOS)


Since Flutter for mobile development has been created by Google, developers are right to worry about its iOS implementation. Because Google has a direct interest in the quick fixing of bugs, creating Android apps on the framework is enjoyable and fast. The latest update to the tool includes a pixel-perfect iOS appearance.
由于Google开发了用于移动开发的Flutter,因此开发人员无需担心其iOS实施。 由于Google对快速修复错误有直接的兴趣,因此在框架上创建Android应用程序既愉快又快速。 该工具的最新更新包括完美的iOS外观。
IPhone settings were created on the framework to allow for possibilities of Cupertino widgets. But these and other design features were updated later and were based on iOS 10 features even though iOS 11 had already been released for a while. Hence it is not clear if the updates will continue to be released as quickly as those of the Android’s version after the tool leaves the beta phase.
在框架上创建了iPhone设置,以允许Cupertino小部件的可能性。 但是这些和其他设计功能后来进行了更新,并且基于iOS 10功能,即使iOS 11已经发布了一段时间。 因此,尚不清楚在该工具离开Beta阶段后,更新是否将继续以与Android版本相同的速度继续发布。

2.大量文件 (2. Massive File Size)


Developers go through massive lengths to reduce an app’s size. Users have restricted phone storage, and it is better to release an app that will prevent them from deleting it in favor of their favorite images and songs. To minimize the size of the code, programmers normally avoid animations, compress images, and reduce the number of packages and libraries.
开发人员要竭尽全力来减小应用程序的大小。 用户的电话存储空间受到限制,最好发布一个应用程序,以防止用户喜欢的图像和歌曲将其删除。 为了最大程度地减少代码的大小,程序员通常避免使用动画,压缩图像并减少程序包和库的数量。
The framework has massively disappointed developers after the Hello world app got to 6.7MB. Even when it was dropped to 4.7MB, it remained significantly bigger than Kotlin that is 550KB and native Java that is 539KB.
在Hello world应用达到6.7MB之后,该框架使开发人员大为失望。 即使将其降至4.7MB,它仍然比550KB的Kotlin和539KB的本机Java显着更大。

3.Dart (3. Dart )


Dart is used for Flutter’s development and has both benefits and drawbacks. It is a programming language and is object-oriented as well as fast. However, it is not as great as programming languages like C#, Java, Objective-C, and JavaScript.
Dart用于Flutter的开发,既有优点也有缺点。 它是一种编程语言,既面向对象又快速。 但是,它不像C#,Java,Objective-C和JavaScript这样的编程语言出色。
Not many novice developers will come across Dart on their learning journey, and it can be challenging to get new developers for your team. This is an essential factor to keep in mind when going for a cross-platform approach.
在Dart的学习过程中不会遇到很多新手开发人员,因此为您的团队招募新开发人员可能是具有挑战性的。 这是跨平台方法时要牢记的重要因素。

4.没有第三方库 (4. No third-Party Libraries)


Third-party packages and libraries have a significant role in automating software development for developers and relieving the requirement to program everything from the start. These libraries are normally open source, pre-tested, and easily available. For most popular and older technologies, getting the required package is easy.
第三方软件包和库在自动进行开发人员软件开发以及减轻从一开始就对所有程序进行编程的要求方面都发挥着重要作用。 这些库通常是开源的,经过预测试的并且易于使用。 对于大多数流行和较旧的技术,获取所需的软件包很容易。
However, since Flutter for
但是,由于Flutter用于mobile development is new, it is not easy to find such free packages and libraries. Its official resource of free packages is still improving, and its tool list is still experiencing growth. You will hence need to wait before deciding to use it for long-term development. 移动开发是新的,因此要找到这样的免费软件包和库并不容易。 它的免费软件包的官方资源仍在改善,其工具列表仍在增长。 因此,您需要等待,然后再决定将其用于长期开发。
If you are looking for a mobile app development tool that has a mild learning curve, high performance, accessibility and internationalization, ready widgets, and immediate updates, Flutter is for you. However, take note of its drawbacks so that you can know where you stand.
如果您正在寻找一种具有温和学习曲线,高性能,可访问性和国际化,现成的小部件以及即时更新的移动应用开发工具,那么Flutter就是您的理想之选。 但是,请注意其缺点,以便您知道自己的位置。

翻译自: https://habr.com/en/post/455020/

flutter 优缺点