moving to flutter and dart. - nofuss · what? • google’s framework and sdk for building native...

22
Moving to Flutter and Dart. 26 November 2018

Upload: others

Post on 25-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Moving to Flutter and Dart.

26 November 2018

Page 2: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Please ask lots and lots of questions as we go along. Otherwise this talk will only be 2 minutes long and I get

paid by the hour. True story.

Page 3: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Topics

• What.• Why.• How.• Resources.• Assorted.• Other.• Miscellaneous.• Terrible Jokes.• Lies.• Alternate truths.

This talk contains language and references that are rated PG-16, or stronger.

Page 4: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

A totally recycled slide from one of my other lame talks.

• Random Software Developer at NoFuss Solutions

• Tweet @EwaldHorn

• https://about.me/ewaldhorn

Page 5: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

What?• Google’s framework and SDK for building native 2D apps.

• Runs on iOS, Android and Desktop (unofficial).

• Based on the Skia rendering engine that powers Chrome.

• Uses the Dart programming language.

• Full control over rendering of widgets.

• Still in Beta but production ready. (Went public in 2017!)

• Designed with development in mind - tooling is great!

Page 6: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

https://flutter.io/showcase

Page 7: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Native?• Builds native apps with a small runtime overhead.

• Allows for interaction with Android or iOS code.

• Does not use native UX components.

• Renders as expected on different platforms.

• The final application does not have any bridge to a different type of runtime.

• Compiles ahead of time to native code, not at runtime.

Page 8: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia
Page 9: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

How does it work?

• Everything is a widget - more on that later.

• Flutter handles all rendering of these widgets @ 60fps.

• Based on a reactive architecture.

• Composition of widgets allows easy customisation.

Page 10: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Widgets? Heh?

• Everything is one. Really.

• Inspired by React.

• Describes desired view.

• Render tree minimises redraw.

See https://flutter.io/docs/development/ui/widgets-intro

Page 11: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Simplest Flutter App

Page 12: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Why though?

• One code base makes code sharing easier.

• Tooling optimised for developer productivity and ease.

• Allows full customisation of widgets.

• Solves many performance problems of cross-platform.

Page 13: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

https://reflect.ly/

https://medium.com/reflectly-engineering/reflectly-from-react-native-to-flutter-2e3dffced2ea

Page 14: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Be a hero.Adopt a dog. Or a cat.

You can do it.

Page 15: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Seriously! Why Flutter?

• Fast development. Nobody wants to spend 5 weeks working on something that lives for 2 days.

• Easy customisation of every part of the user interface.

• Code sharing between mobile, web, desktop and API.

• Did I mention no bridge and low overhead cost?

• Visual Studio Code and Android Studio extensions.

Page 16: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Benefits

• Draws own UI.• Consistent.• Hot reloading.• Stateful reloads.• Reactive design.• Dart is easy to use.• Unit and widget

testing built in.• Theming is easy!

Photo by Artem Bali from Pexels

Page 17: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Alternative Benefits

• Draws own UI.• No native components.• Not as many libraries,

widgets, tutorials or resources as others.

• Debugging is a WIP.• Errors are confusing.• Difficult to involve

designers.• Few patterns and

frameworks like MVP yet.

Photo by Vadim B from Pexels

Page 18: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Flutter Studiohttp://mutisya.com/

Page 19: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Learning Flutter

• https://flutter.io/

• https://flutter.io/docs/get-started/learn-more - Migrating

• https://www.udemy.com/

• https://www.udacity.com/google There’s also lots of awesome videos on YouTube.

Page 20: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

Super Active Community• https://github.com/fluttercommunity/community

• https://github.com/Solido/awesome-flutter

• https://twitter.com/flutterio

• https://twitter.com/r_FlutterDev

Page 21: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

https://itsallwidgets.com/

Page 22: Moving to Flutter and Dart. - NoFuss · What? • Google’s framework and SDK for building native 2D apps. • Runs on iOS, Android and Desktop (unofficial). • Based on the Skia

https://tears.org.za/