颤振稳定性叶瓣图_为什么颤振不是下一件大事

颤振稳定性叶瓣图

重点(Top highlight)

I’ve noticed quite a few articles recently promoting Flutter as the “next big thing.” Several have even explained in detail how Flutter is going to replace React Native as the leading cross-platform technology of choice.

我注意到最近有很多文章将Flutter宣传为“下一件大事”。 一些人甚至已经详细解释了Flutter如何将React Native替代为领先的首选跨平台技术。

It’s not.

不是。

I’ve stuck my toes into Flutter’s clear but cold waters, and in my opinion, it suffers from several critical issues.

我将脚趾插入Flutter的清澈但冷水里,我认为它遇到了几个关键问题。

Note that this article has generated a lot of passionate comments from the Flutter community, both pro and con. I strongly suggest you read the article and then read the comments section below for points and counter-points.

请注意,本文在Flutter社区中引起了很多热情的评论,无论是赞成还是反对。 我强烈建议您阅读本文,然后阅读下面的评论部分以获取要点和反要点。

不是本机React (It’s Not React Native)

You can’t discuss cross-platform technologies without discussing React Native.

您必须先讨论React Native,才能讨论跨平台技术。

React Native is popular because a lot of people believe the hype and think that their front-end JavaScript developers can create first-class apps. They can’t, of course, but that doesn’t stop them from trying.

React Native之所以受欢迎是因为很多人相信这种炒作,并认为他们的前端JavaScript开发人员可以创建一流的应用程序。 他们当然不能,但这并不能阻止他们尝试。

The problem is that many companies already have JavaScript developers. And all too often, the JavaScript folk will tell management, “Yep, we can do that in half the time.”

问题是许多公司已经JavaScript开发人员。 而且,JavaScript人士常常会告诉管理层:“是的,我们可以在一半的时间内做到这一点。”

And as I pointed out, they can’t. Mostly because while it’s true you can get 80% of the app up and running quickly once you get past the learning curve, 80% of the actual time spent will lie in tweaking the app to look and run correctly on each individual platform.

正如我指出的那样,他们做不到。 通常是因为确实可以通过学习曲线快速启动并运行80%的应用程序,所以花费的实际时间的80%在于调整应用程序以使其在每个平台上正常运行。

Speaking of individual platforms…

说到各个平台…

不是本地人 (It’s Not Native)

Flutter’s Skia rendering engine ensures that your app only mimics a native look and feel. It may compile to native code but it’s not using native buttons, fields, toggles, scrollbars, tableviews, or other interface or navigation elements.

Flutter的Skia渲染引擎可确保您的应用仅模仿本机外观。 它可以编译为本机代码,但使用本机按钮,字段,切换,滚动条,表视图或其他界面或导航元素。

Apple and Google tweak and update those interface elements and their behavior on almost every release. As such, any app that ignores them will always lag behind.

Apple和Google几乎在每个发行版上都对这些界面元素及其行为进行了调整和更新。 因此,任何忽略它们的应用程序都会始终落后。

Further, if a bug appears in Flutter on iOS, you’re going to have to wait for Google to get around to fixing it.

此外,如果iOS上的Flutter中出现错误,则您将不得不等待Google解决它。

And speaking of iOS…

说到iOS ...

二等公民 (Second-Class Citizenship)

I should note that I came at Flutter from an iOS perspective, and Flutter definitely makes iOS feel like a second-class citizen.

我应该注意,我是从iOS的角度来Flutter的,Flutter的确使iOS感觉像是二等公民。

Flutter is very much an Android-first development environment, down to its fundamental reliance on Android’s Material Design guidelines. That’s the default look-and-feel.

Flutter在很大程度上依赖于Android的Material Design指导原则,是一个Android优先的开发环境。 这是默认的外观。

So if you want to create something out-of-the-box that looks like an Android app and behaves like an Android app that’s great, otherwise… not so much.

因此,如果您想开箱即用地创建一个看起来像Android应用程序并且表现得像Android应用程序的东西,那就太好了,否则……就不那么多了。

Further, iOS development is expanding to many platforms within the Apple ecosystem (watchOS, tvOS, iPadOS, macOS) and as such Flutter only gets you so far.

此外,iOS开发正在扩展到Apple生态系统内的许多平台(watchOS,tvOS,iPadOS,macOS),因此Flutter只能带您深入。

Of course, you can get around part of that problem that by using Cupertino widgets, but…

当然,通过使用Cupertino小部件,您可以解决部分问题,但是…

您仍然必须两次编写大部分应用程序 (You Still Have to Write Most of Your Application Twice)

As I just pointed out, Android supplies both Cupertino and Material widgets.

正如我刚刚指出的,Android同时提供Cupertino和Material小部件。

That’s cool, but it basically means if you want your application to appear native (which React Native allows, by the way), you still have to use the right widget set for the job. And this may mean writing some portions of your interface twice.

这很酷,但是从根本上讲,这意味着如果您希望您的应用程序显示为本机(顺便说一句,React Native允许),您仍然必须使用正确的小部件集来完成工作。 这可能意味着两次编写界面的某些部分。

Not to mention that you may also have to restructure portions of your app accordingly for each platform in order to maintain platform look and feel (navigation inside tab bars as opposed to tab bars inside navigation, etc.).

更不用说您可能还必须为每个平台相应地重组应用程序的各个部分,以保持平台的外观和风格(在导航栏中的标签栏内部导航,而不是导航内部的标签栏等)。

Yes, you can reuse business logic, but I don’t think that quite makes up for having to write, test, and debug user interface issues and problems on both platforms.

是的,您可以重用业务逻辑,但是我认为这并不能弥补必须编写,测试和调试两个平台上的用户界面问题。

不是HTML (It’s Not HTML)

A few people have also mentioned in the comments that Flutter is available for the web, and as such you get “another” platform for free.

一些人在评论中还提到Flutter可用于Web,因此您可以免费获得“另一个”平台。

And yes, you can use Flutter for the web… although it’s still very much a beta technology and even Google doesn’t recommend it for most use cases.

是的,您可以将Flutter用于网络…尽管它仍然是一种beta技术,甚至Google在大多数用例中都不推荐使用它。

Not every HTML scenario is ideally suited for Flutter at this time. For example, text-rich flow-based content such as blog articles benefit from the document-centric model that the web is built around, rather than the app-centric services that a UI framework like Flutter can deliver.

目前,并非每种HTML方案都非常适合Flutter。 例如,诸如博客文章之类的基于文本的富文本内容受益于Web围绕其建立的以文档为中心的模型,而不是像Flutter这样的UI框架可以提供的以应用程序为中心的服务。

So yes, if you want to do some data visualization, make an online tool like a car configurator, or do some sort of embedded chart (again, Google recommended use cases) feel free.

因此,是的,如果您想进行一些数据可视化,可以制作一个在线工具,例如汽车配置器,或者随意制作某种嵌入式图表(同样,Google推荐的用例)。

Then again, didn’t we just kick some other heavy non-HTML-based app-rendering technology off the internet?

再说一遍,我们不是刚刚将其他一些基于HTML的沉重的非基于HTML的应用程序渲染技术从互联网上排除了吗?

支持微不足道 (Support Is Negligible)

While it is trending upwards slightly, Flutter support and documentation is nowhere near that one can find for native application development on iOS or Android.

尽管Flutter的支持和文档略有上升,但在iOS或Android上进行本机应用程序开发的人却远远无法找到。

Want articles, books, videos, and courses devoted to Swift? Java? Kotlin? Cocoa? There are tons of them out there.

想要有关Swift的文章,书籍,视频和课程吗? Java的? Kotlin? 可可? 有很多吨在那里。

Need help on Stack Overflow? Almost anything you can think to ask has already been asked and answered.

在堆栈溢出方面需要帮助吗? 您几乎想问的任何问题都已经被问到并回答了。

With Flutter? Not so much.

与扑? 没那么多。

This is reinforced by a point from the comments:

从评论中可以看出这一点:

But the support issues alone are abysmal, especially on Android (dependency hell that rivals mid-90s and early 00s “DLL hell” on Windows).

但是仅支持方面的问题就很糟糕,尤其是在Android上(与Windows上的90年代中期和00年代初的“ DLL地狱”相匹敌的依赖地狱)。

Flutter的一生值得怀疑 (Flutter’s Lifetime Is Questionable)

Google notoriously runs hot and cold on technologies. It’s undeniable. And if Google ever thinks that Flutter isn’t going to pay off, it could be dropped like a hot potato.

Google臭名昭著地对技术进行了研究。 不可否认。 而且,如果Google曾经认为Flutter不会取得回报,那么它可能会像土豆一样掉下来。

Google’s pushing Flutter but at the same time they’re also pushing Jetpack Compose on Kotlin and even the Kotlin Native Common module for cross-platform support.

Google推动Flutter,但与此同时,他们也推动Kotlin甚至包括Kotlin Native Common模块上的Jetpack Compose,以提供跨平台支持。

Not to mention that Apple is also pushing their version of a next-generation declarative development technology: SwiftUI. While not directly comparable in that it doesn’t allow the creation of Android apps, SwiftUI does let developers utilize their skills on all of Apple’s platforms: iOS, ipadOS, macOS, watchOS, and tvOS.

更不用说苹果也在推动下一代声明式开发技术的版本:SwiftUI。 尽管不能直接比较,因为它不允许创建Android应用程序,但是SwiftUI确实允许开发人员在所有Apple平台上使用他们的技能:iOS,ipadOS,macOS,watchOS和tvOS。

If both technologies do what they’re expected to do and both dramatically reduce the time it takes to develop native applications… that leaves Flutter with… what advantage, exactly?

如果两种技术都能实现预期的功能,并且都大大减少了开发本机应用程序所需的时间,那么Flutter就可以拥有……确切的优势是什么?

注意你的语言 (Watch Your Language)

One of the biggest drawbacks to Flutter is Dart, its implementation language.

Flutter的最大缺点之一是其实现语言Dart

Dart is one of the languages you can use if you’re running Google’s web or back-end hosting environments. And that’s pretty much it. This means that if you spend the time to learn Dart for Flutter, there’s a good chance that the only thing you’re ever going to be able to use your hard-won experience on is Flutter.

如果您正在运行Google的网络或后端托管环境,则Dart是您可以使用的语言之一。 就是这样。 这意味着,如果您花时间学习Flutter上的Dart,则很有可能唯一可以使用来之不易的经验的东西就是Flutter。

The latter point is probably the hardest one to deal with. I mean, if I wanted to become a mobile developer, I’d probably be learning Swift or Kotlin, as both are modern languages and there’s actually a major job market out there for both of them.

后一点可能是最难处理的。 我的意思是,如果我想成为一名移动开发人员,我可能会学习Swift或Kotlin,因为两者都是现代语言,并且实际上两者都有一个主要的就业市场。

With Dart? Not so much.

用Dart吗? 没那么多。

Strictly speaking Dart isn’t that hard to learn, but that’s primarily because it is a simple language. As another commenter points out:

严格来讲Dart并不难学习,但这主要是因为它一种简单的语言。 正如另一位评论者指出的那样:

After learning Swift and Kotlin, Dart feels like a step back. It lacks many features available in other modern languages. Its type system isn’t great. It seems like the designer(s) had an “easy for the JS crowd” design objective. Dart is also very rough around the edges in a Javascript-like way, while Swift and Kotlin feel polished, mature and complete in all the important details.

学习了Swift和Kotlin之后,Dart感觉像是退了一步。 它缺少许多其他现代语言可用的功能。 它的类型系统不是很好。 设计师似乎对JS人群有一个“轻松”的设计目标。 Dart的边缘也很粗糙,就像Javascript一样,而Swift和Kotlin在所有重要细节上都感觉很精致,成熟和完整。

Dart’s lack of market penetration means that should you need more Dart developers on your team, you’re probably not going to find them. Which in turn means you’re going to have to grow them on your own. That can be done, but you’re still paying for them to ramp up on your dime.

Dart缺乏市场渗透力,这意味着如果您的团队中需要更多Dart开发人员,可能就找不到他们了。 反过来,这意味着您将不得不自己种植它们。 可以做到,但是您仍然需要为他们付出更多的努力。

Finally, remember that at some point you’re probably going to hit the limitations of the framework (or need to target additional platforms) and then you’re going need to drop down and do some sort of native development anyway.

最后,请记住,在某个时候,您可能会遇到框架的局限性(或需要针对其他平台),然后无论如何都要下降并进行某种本机开发。

In which case, you’re still going to need to learn Swift and Kotlin.

在这种情况下,您仍然需要学习Swift和Kotlin。

客户不想要 (Clients Don’t Want It)

We’ve pushed Flutter to clients a couple of times as a possible solution and clients have resisted the notion — especially in favor of attempting to use their in-house JavaScript developers, as demonstrated in my first example.

作为可能的解决方案,我们几次将Flutter推给客户,而客户却拒绝了这个想法,尤其是如我的第一个示例所示,尤其是尝试使用其内部JavaScript开发人员。

But rest assured: Pretty much all of the other issues I’ve listed above were also mentioned.

但是请放心:我上面列出的几乎所有其他问题也都提到了。

底线:Flutter是一项利基技术 (Bottom Line: Flutter Is a Niche Technology)

All of the above may lead you to believe that Flutter may not be the best choice for your project.

以上所有内容可能使您相信Flutter可能不是您项目的最佳选择。

And that’s not true at all.

那根本不是真的。

You just have to recognize its limitations.

您只需要认识到它的局限性即可。

In my opinion, Flutter is best suited for a small internal development team that needs to quickly create a proof-of-concept app that’s fundamentally non-native in appearance and design.

在我看来,Flutter最适合小型内部开发团队,这些团队需要快速创建概念验证应用程序,该应用程序在外观和设计上基本上是非本地的。

An example might be a kids game or app that’s graphically unique and decidedly non-native in appearance. In that case, it doesn’t really matter that Flutter doesn’t exactly mimic the experience of iOS and Android. It also lets you off the writing-interface-twice hook I mentioned above.

一个例子可能是儿童游戏或应用程序,它们在图形上是独特的,而且在外观上显然非本地。 在那种情况下,Flutter并不完全模仿iOS和Android的体验并没有关系。 它还使您摆脱了我在上文中提到的两次书写界面挂钩。

Oh, and you also need a team that doesn’t mind learning an entirely new platform and language to do so.

哦,您还需要一个不介意学习全新平台和语言的团队。

So… yeah.

嗯是的。

Flutter’s a cool technology, but in most cases, it’s simply not going to fly.

Flutter是一项很酷的技术,但是在大多数情况下,它根本不会飞。

Again, this article is an opinion. You’re welcome to disagree with me and leave your counter-arguments in the comments section below. (In fact, several of those points have made their way back into the article.)

同样,本文是一种见解。 欢迎您不同意我的意见,并在下面的评论部分中留下您的反对意见。 (实际上,这些观点中有几点已经回到了文章中。)

Also note that I am not endorsing React Native. React suffers from many of the same issues and then piles some significant performance penalties on top of them.

另外请注意,我认可React Native。 React遇到许多相同的问题,然后在这些问题上增加了一些重大的性能损失。

Finally, and just for the record: I’m not saying that there isn’t a use case for Flutter. But like everything else in the known universe, there are tradeoffs and known limitations and in the end you have to to decide if you and your organization are willing to place long-term bets on this specific technology.

最后,仅作记录:我并不是说Flutter没有用例。 但是,与已知宇宙中的所有其他事物一样,也存在一些折衷和已知局限性,最终您必须决定您和您的组织是否愿意对该特定技术进行长期押注。

Thanks for reading.

谢谢阅读。

翻译自: https://medium.com/better-programming/why-flutter-isnt-the-next-big-thing-e268488521f4

颤振稳定性叶瓣图

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值