Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么每个 Android 开发者都应该尝试 Flutter #4187

Conversation

ALVINYEH
Copy link
Contributor

译文翻译完成,resolve #4155

@DateBro
Copy link
Contributor

DateBro commented Jul 26, 2018

校对认领

@fanyijihua
Copy link
Collaborator

@DateBro 好的呢 🍺

@leviding
Copy link
Member

@DateBro 记得校对

DateBro
DateBro previously approved these changes Jul 28, 2018
Copy link
Contributor

@DateBro DateBro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没什么太大的问题,就是有几个算是翻译习惯和语义的问题,总体还是挺流畅的。


I’m sure you’ve already heard a list of arguments as to why Android Developers should care about Flutter (or if you haven’t, let me humbly suggest you check [this](https://proandroiddev.com/why-flutter-will-change-mobile-development-for-the-best-c249f71fa63c) out), but I want to point out a pretty big pro that I haven’t really seen addressed yet, and that is the way that Flutter can make you think completely differently about App development. This starts with the fact that your app will inherently be architectured in a different way — but even more important than that is the fact that the actual UI development is pushed into the foreground by incorporating it into your dart code (instead of xml), thus making it a “first class citizen.” And once your UI code suddenly lives in a non-markup-language, you’ll realize what possibilities you suddenly have for building your apps. To be honest, I started to hate working on UI code on Android after using Flutter; it’s just so much more tedious in Android, and while you can still build reactive applications with tools like databinding, it really is much more time-consuming than in Flutter.
我相信你已经听过一系列关于为什么 Android 开发者应该关注 Flutter 的若干论据(如果你还没有看过,请让我谦逊地建议你瞧瞧[这个](https://proandroiddev.com/why-flutter-will-change-mobile-development-for-the-best-c249f71fa63c)),但是我想指出一个我还没有真正解决的大问题,那就是 Flutter 可以让你对 App 开发有完全不同的看法。首先,你的应用本身将采用不同的方式构建 —— 但更重要的是,实际的 UI 开发通过将其合并到你的 Dart 代码(而不是 XML)中而被推到前台,因此使它成为了“一等公民”。一旦你的 UI 代码突然出现在一种非标记语言中,你就会意识到你突然有了构建应用的可能性。说实话,在使用 Flutter 之后,我开始讨厌在 Android 上编写 UI 代码;因为在 Android 中步骤更加繁琐,虽然你仍然可以使用数据绑定等工具构建反应式应用,但它实际上比 Flutter 中要花费更多的时间。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[虽然你仍然可以使用数据绑定等工具构建反应式应用] -> [虽然你仍然可以使用数据绑定等工具构建响应式应用]
感觉“响应式“更习惯一些,比如经常说的响应式编程。


This argument for Flutter becomes even stronger when you think about incorporating animations and other dynamic data in Android. It can be inconvenient to incorporate animations, and sometimes you may even have to turn down your designer’s request because it’s just too difficult to implement what they’re asking for. Thankfully, Flutter changes that. If you’ve been following Flutter, you may have heard of the **_Flutter Challenges_** from [Fluttery](https://medium.com/fluttery). These challenges show you how fast and intuitive it can be to build complicated UIs with lots of custom widgets and fancy designs, including animations. Implementing such things on Android can get really difficult — especially due to the fact that unlike Flutter, Android’s Views are based on inheritance over composition, which complicates building Views even more.
当你考虑在 Android 中整合动画和其他动态数据时,使用 Flutter 的论点变得更加有力。整合动画可能会不太方便,有时你甚至可能不得不拒绝设计师的要求,因为要实现他们需求的东西太难了。谢天谢地,Flutter 改变了这一切。如果你一直在关注 Flutter,你可能已经从 [Fluttery](https://medium.com/fluttery) 听说过 **Flutter 挑战**。这些挑战展示了构建具有大量自定义组件和精美设计(包括动画)的复杂 UI 的快速和直观性。在 Android 上实现这样的东西会变得非常困难 —— 特别是因为与 Flutter 不同,Android 的视图基于继承而非组合,这使得构建视图变得更加复杂。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[有时你甚至可能不得不拒绝设计师的要求] -> [有时你甚至不得不拒绝设计师的要求]
感觉没必要把每个单词都翻译出来,要不然读起来太长不顺畅


This argument for Flutter becomes even stronger when you think about incorporating animations and other dynamic data in Android. It can be inconvenient to incorporate animations, and sometimes you may even have to turn down your designer’s request because it’s just too difficult to implement what they’re asking for. Thankfully, Flutter changes that. If you’ve been following Flutter, you may have heard of the **_Flutter Challenges_** from [Fluttery](https://medium.com/fluttery). These challenges show you how fast and intuitive it can be to build complicated UIs with lots of custom widgets and fancy designs, including animations. Implementing such things on Android can get really difficult — especially due to the fact that unlike Flutter, Android’s Views are based on inheritance over composition, which complicates building Views even more.
当你考虑在 Android 中整合动画和其他动态数据时,使用 Flutter 的论点变得更加有力。整合动画可能会不太方便,有时你甚至可能不得不拒绝设计师的要求,因为要实现他们需求的东西太难了。谢天谢地,Flutter 改变了这一切。如果你一直在关注 Flutter,你可能已经从 [Fluttery](https://medium.com/fluttery) 听说过 **Flutter 挑战**。这些挑战展示了构建具有大量自定义组件和精美设计(包括动画)的复杂 UI 的快速和直观性。在 Android 上实现这样的东西会变得非常困难 —— 特别是因为与 Flutter 不同,Android 的视图基于继承而非组合,这使得构建视图变得更加复杂。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[因为要实现他们需求的东西太难了] -> [因为要实现他们的需求太难了]
感觉实现需求就已经能很好地表达意思了


With those kind of declarative layouts, we also start thinking differently about architecture. Suddenly the word _reactive_ pops up, and we talk a lot more about state-management than we do about architecture. With Flutter, architectures like MVP and MVVM don’t make that much sense anymore; instead of using them, we think about how the state could flow through our app. State suddenly becomes a big part of the discussion and we devote more and more energy to thinking of new ways to architect our apps. It’s a new journey for all of us and there a lot of things to figure out, and most importantly, it’s an opportunity for us to broaden our horizons.
有了这些声明性布局,我们也开始对架构进行了不同的思考。突然间,**reactive** 这个词出现了,我们谈论了更多的是关于状态管理的,而不是架构。有了 Flutter,像 MVP MVVM 这样的架构已经没有多大有意义了;我们不再使用它们了,而是考虑状态如何流经我们的应用。状态突然成为讨论的一个重要部分,我们将投入越来越多精力去思考构建应用的新方法上。这对我们所有人来说都是一次新的旅程,有许多事情可以解决,但最重要的是,这是我们开阔视野的机会。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[我们谈论了更多的是关于状态管理的,而不是架构] -> [我们谈论的更多是关于状态管理的内容,而不是架构]
感觉这样更通顺一些


To be fair, Flutter is not all sunshine and rainbows. I’m currently working on a bigger project with Flutter to understand what its weaknesses are, and the biggest flaw I’ve come across so far is the lack of infrastructure. This really became apparent to me when I was trying to consume a graphql-api; while there certainly are libraries for doing that, they don’t come close to what Android has with Apollo. The good news, however, is that it’s just a matter of time before Flutter catches up, and it’s not that difficult to extend existing libraries or even build your own in the meantime. Just be aware that you might have to invest some time into the infrastructure of your app, while that normally wouldn’t be the case for Android and iOS — after all, there is no free lunch.
公平地说,Flutter 也不只有阳光和彩虹。我目前正在与 Flutter 合作开展一个更大的项目来了解它的弱点,迄今为止我遇到的最大缺陷是缺乏基础架构。当我尝试使用 Graphql-API 时,这个问题就非常明显;虽然有库确实会这样做,但它们并没有接近 Android Apollo 的关系。不过,好消息是,Flutter 迎头赶上只是时间的问题,在此期间扩展现有的库,甚至建立自己的库并不困难。请注意,你可能需要花一些时间投入在应用程序的基础架构,而对于 Android iOS 来说,情况通常并非如此 —— 毕竟,天下没有免费的午餐。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[公平地说] -> [坦白地说]
感觉这里用坦白地说更符合语义


To be fair, Flutter is not all sunshine and rainbows. I’m currently working on a bigger project with Flutter to understand what its weaknesses are, and the biggest flaw I’ve come across so far is the lack of infrastructure. This really became apparent to me when I was trying to consume a graphql-api; while there certainly are libraries for doing that, they don’t come close to what Android has with Apollo. The good news, however, is that it’s just a matter of time before Flutter catches up, and it’s not that difficult to extend existing libraries or even build your own in the meantime. Just be aware that you might have to invest some time into the infrastructure of your app, while that normally wouldn’t be the case for Android and iOS — after all, there is no free lunch.
公平地说,Flutter 也不只有阳光和彩虹。我目前正在与 Flutter 合作开展一个更大的项目来了解它的弱点,迄今为止我遇到的最大缺陷是缺乏基础架构。当我尝试使用 Graphql-API 时,这个问题就非常明显;虽然有库确实会这样做,但它们并没有接近 Android Apollo 的关系。不过,好消息是,Flutter 迎头赶上只是时间的问题,在此期间扩展现有的库,甚至建立自己的库并不困难。请注意,你可能需要花一些时间投入在应用程序的基础架构,而对于 Android iOS 来说,情况通常并非如此 —— 毕竟,天下没有免费的午餐。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[基础架构] -> [基础设施]
感觉架构这个词总是让人想到 MVP 架构什么的,而不是基础的库


In the end, one of my biggest recent takeaways from using Flutter is just how beneficial it can be to experience this declarative way of building UIs, as well as its implications on state management. I think Flutter is fantastic; still, I caution you to not think of it as the silver bullet that is going to solve all of your problems, but as an innovative new tool to build beautiful, custom UIs faster than on Android. More importantly, it will show you the power of declarative layouts and make you think of your app in rendered state instead of non-cohesive activities, views and viewmodels — and for that reason alone, I would highly suggest giving Flutter a try.
最后,我最近从使用 Flutter 时得到的最大启示之一就是,体验这种构建 UI 的声明方式以及它对状态管理的影响是非常有用的。我觉得 Flutter 太棒了;不过,我告诫你不要把它当作解决你所有问题的银弹,而应该是作为一种创新的工具,它可以比在 Android 上更快地构建漂亮的自定义 UI。更重要的是,它展示了强大的声明性布局功能,并让你将应用视为渲染状态,而不是非连贯性 Activity,视图和视图模型 —— 仅此而言,我强烈建议你尝试去使用 Flutter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[我最近从使用 Flutter 时得到的最大启示之一就是] -> [我最近从使用 Flutter 中得到的最大启示之一就是]
从...时 感觉不大通顺


In the end, one of my biggest recent takeaways from using Flutter is just how beneficial it can be to experience this declarative way of building UIs, as well as its implications on state management. I think Flutter is fantastic; still, I caution you to not think of it as the silver bullet that is going to solve all of your problems, but as an innovative new tool to build beautiful, custom UIs faster than on Android. More importantly, it will show you the power of declarative layouts and make you think of your app in rendered state instead of non-cohesive activities, views and viewmodels — and for that reason alone, I would highly suggest giving Flutter a try.
最后,我最近从使用 Flutter 时得到的最大启示之一就是,体验这种构建 UI 的声明方式以及它对状态管理的影响是非常有用的。我觉得 Flutter 太棒了;不过,我告诫你不要把它当作解决你所有问题的银弹,而应该是作为一种创新的工具,它可以比在 Android 上更快地构建漂亮的自定义 UI。更重要的是,它展示了强大的声明性布局功能,并让你将应用视为渲染状态,而不是非连贯性 Activity,视图和视图模型 —— 仅此而言,我强烈建议你尝试去使用 Flutter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[我强烈建议你尝试去使用 Flutter] -> [我强烈建议你尝试一下 Flutter]
感觉之前的翻译有些重复的意思


To be fair, Flutter is not all sunshine and rainbows. I’m currently working on a bigger project with Flutter to understand what its weaknesses are, and the biggest flaw I’ve come across so far is the lack of infrastructure. This really became apparent to me when I was trying to consume a graphql-api; while there certainly are libraries for doing that, they don’t come close to what Android has with Apollo. The good news, however, is that it’s just a matter of time before Flutter catches up, and it’s not that difficult to extend existing libraries or even build your own in the meantime. Just be aware that you might have to invest some time into the infrastructure of your app, while that normally wouldn’t be the case for Android and iOS — after all, there is no free lunch.
公平地说,Flutter 也不只有阳光和彩虹。我目前正在与 Flutter 合作开展一个更大的项目来了解它的弱点,迄今为止我遇到的最大缺陷是缺乏基础架构。当我尝试使用 Graphql-API 时,这个问题就非常明显;虽然有库确实会这样做,但它们并没有接近 Android Apollo 的关系。不过,好消息是,Flutter 迎头赶上只是时间的问题,在此期间扩展现有的库,甚至建立自己的库并不困难。请注意,你可能需要花一些时间投入在应用程序的基础架构,而对于 Android iOS 来说,情况通常并非如此 —— 毕竟,天下没有免费的午餐。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[你可能需要花一些时间投入在应用程序的基础架构] -> [你可能需要花一些时间投入到应用程序的基础设施中]

@DateBro
Copy link
Contributor

DateBro commented Jul 28, 2018

@ALVINYEH @leviding 校对完成

@tanglie1993
Copy link
Contributor

认领校对。

@fanyijihua
Copy link
Collaborator

@tanglie1993 妥妥哒 🍻

@ALVINYEH
Copy link
Contributor Author

@DateBro 感谢校对~

@@ -2,22 +2,22 @@
> * 原文作者:[Aaron Oertel](https://proandroiddev.com/@aaronoe?source=post_header_lockup)
> * 译文出自:[掘金翻译计划](https://github.com/xitu/gold-miner)
> * 本文永久链接:[https://github.com/xitu/gold-miner/blob/master/TODO1/why-every-android-developer-should-try-out-flutter.md](https://github.com/xitu/gold-miner/blob/master/TODO1/why-every-android-developer-should-try-out-flutter.md)
> * 译者:
> * 译者:[ALVINYEH](https://github.com/ALVINYEH)
> * 校对者:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

校对者信息

@leviding leviding merged commit 799b4aa into xitu:master Jul 30, 2018
@leviding
Copy link
Member

@ALVINYEH 已经 merge 啦~ 快快麻溜发布到掘金然后给我发下链接,方便及时添加积分哟。

掘金翻译计划有自己的知乎专栏,你也可以投稿哈,推荐使用一个好用的插件
专栏地址:https://zhuanlan.zhihu.com/juejinfanyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

为什么每个 Android 开发者都应该尝试 Flutter
5 participants