Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Flutter: a journey of productivity and happiness

Jorge Coca
October 20, 2020

Flutter: a journey of productivity and happiness

Flutter is an open-source user interface toolkit developed by Google that allows you to create beautiful applications in record time without sacrificing code quality nor developer productivity.

With such an ambitious premise, I was very skeptical back at the beginning of 2018 when I tried Flutter for the first time that Flutter could check all the boxes; after all, there were already plenty of cross-platform solutions for mobile that promised all the gold in the world but ended up not quite meeting the expectations. However, this time, Flutter brought a big simile to my face immediately! Flutter is fun to learn, easy to test, highly performant, completely open-source, and has an incredibly community that is warm, welcoming, supportive, and incredibly active!

In this talk, I’d like to share with you my experience working with Flutter for more than two years: from big projects with hundreds of developers contributing daily to the codebase to small and fast-paced startups that need to validate their product as soon as possible.

Jorge Coca

October 20, 2020
Tweet

More Decks by Jorge Coca

Other Decks in Programming

Transcript

  1. What were we doing? → Company iOS first (more resources,

    earlier releases) → Client Java (and Kotlin later...)
  2. What were we doing? → Company iOS first (more resources,

    earlier releases) → Client Java (and Kotlin later...) → Patterns MVVM (custom), Dagger 2...
  3. What were we doing? → Company iOS first (more resources,

    earlier releases) → Client Java (and Kotlin later...) → Patterns MVVM (custom), Dagger 2... → Testing only unit tests
  4. What were we doing? → Company iOS first (more resources,

    earlier releases) → Client Java (and Kotlin later...) → Patterns MVVM (custom), Dagger 2... → Testing only unit tests → Backend no access/influence over APIs
  5. → No collaboration between teams → Completely different release schedules

    → No Android internal dogfood → 100% oriented APIs towards iOS
  6. → No collaboration between teams → Completely different release schedules

    → No Android internal dogfood → 100% oriented APIs towards iOS → Zero confidence in success
  7. A new opportunity was presented to us: A redesign was

    coming that would allow us to challenge business processes and technology choices
  8. We want to be able to regularly release our products

    across all brands, all platforms and all regions simultaneously, with the same feature capabilities.
  9. What can we do better? → Robust and predictable APIs

    → Never say no to designers → Be full stack and open to collaboration
  10. What can we do better? → Robust and predictable APIs

    → Never say no to designers → Be full stack and open to collaboration → Better understanding of business goals
  11. What can we do better? → Robust and predictable APIs

    → Never say no to designers → Be full stack and open to collaboration → Better understanding of business goals → Shorter feature cycle times
  12. What can we do better? → Robust and predictable APIs

    → Never say no to designers → Be full stack and open to collaboration → Better understanding of business goals → Shorter feature cycle times → Improve our developer experience
  13. Our mantra Create a platform that is developer friendly, scalable

    and performant, which provides safe experimentation and continuos deployment.
  14. What is Flutter? Flutter is Google's UI toolkit for building

    beautiful, natively compiled applications for mobile, web and desktop from a single codebase.
  15. void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override

    Widget build(BuildContext context) { return MaterialApp(home: MyHomePage()); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Counter')), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('You have pushed the button this many times:'), Text('$_counter'), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, child: Icon(Icons.add), ), ); } }
  16. void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override

    Widget build(BuildContext context) { return MaterialApp(home: MyHomePage()); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Counter')), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('You have pushed the button this many times:'), Text('$_counter'), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, child: Icon(Icons.add), ), ); } }
  17. void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override

    Widget build(BuildContext context) { return MaterialApp(home: MyHomePage()); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Counter')), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('You have pushed the button this many times:'), Text('$_counter'), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, child: Icon(Icons.add), ), ); } }
  18. void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override

    Widget build(BuildContext context) { return MaterialApp(home: MyHomePage()); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Counter')), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('You have pushed the button this many times:'), Text('$_counter'), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, child: Icon(Icons.add), ), ); } }
  19. void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override

    Widget build(BuildContext context) { return MaterialApp(home: MyHomePage()); } } class MyHomePage extends StatefulWidget { @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { int _counter = 0; void _incrementCounter() { setState(() { _counter++; }); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Counter')), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ Text('You have pushed the button this many times:'), Text('$_counter'), ], ), ), floatingActionButton: FloatingActionButton( onPressed: _incrementCounter, child: Icon(Icons.add), ), ); } }
  20. ...but why Flutter? Flutter was chosen not only because we

    thought it was going to meet the needs, but because it was a risk mitigation strategy. We were considerably more likely to be successful and deliver the product we were asked to deliver by using Flutter. — Larry McKenzie, Tech Lead @ eBay Motors
  21. When we tried Flutter in 2018 → Fast development: Hot

    Reload → Expressive UIs: Highly composable widgets
  22. When we tried Flutter in 2018 → Fast development: Hot

    Reload → Expressive UIs: Highly composable widgets → Native performance: 60fps
  23. When we tried Flutter in 2018 → Fast development: Hot

    Reload → Expressive UIs: Highly composable widgets → Native performance: 60fps → Testing: incredible tooling out of the box
  24. When we tried Flutter in 2018 → Fast development: Hot

    Reload → Expressive UIs: Highly composable widgets → Native performance: 60fps → Testing: incredible tooling out of the box → Works on any UI environment
  25. Flutter is like Picasso you can ask it to paint

    anything, anywhere, and it will deliver outstanding results
  26. What about Dart? → Client-optmized language for fast apps on

    any platform → Feels natural and familiar
  27. What about Dart? → Client-optmized language for fast apps on

    any platform → Feels natural and familiar → Future API (async-await)
  28. What about Dart? → Client-optmized language for fast apps on

    any platform → Feels natural and familiar → Future API (async-await) → Isolate-based concurrency
  29. Future<void> fetchTemperate() async { final response = await http.get('weather.com'); if

    (response.statusCode == 200) { print('Temperature: ${response.body}'); } else { throw Exception('Failed fetching temperature'); } }
  30. What about the Dart & Flutter community? → Vibrant and

    welcoming community → Started Chicago Flutter
  31. What about the Dart & Flutter community? → Vibrant and

    welcoming community → Started Chicago Flutter → Incredible documentation and tutorials
  32. What about the Dart & Flutter community? → Vibrant and

    welcoming community → Started Chicago Flutter → Incredible documentation and tutorials → Amazing conferences
  33. ... and many other benefits → UI described as a

    tree (widget tree) → Multiple state management solutions
  34. ... and many other benefits → UI described as a

    tree (widget tree) → Multiple state management solutions → 3 levels of testing without 3rd party dependencies
  35. Very Good Ventures is... → 100% focused on Flutter →

    First in Flutter: Hamilton. The Musical
  36. Very Good Ventures is... → 100% focused on Flutter →

    First in Flutter: Hamilton. The Musical → Experts in Flutter: Google, The New York Times, Betterment, Policygenius, Good Money...
  37. How do we use Flutter? → 3-tier architecture (data, domain,

    UI) → flutter_bloc → 100% test coverage
  38. How do we use Flutter? → 3-tier architecture (data, domain,

    UI) → flutter_bloc → 100% test coverage → Strong focus on automation
  39. I have worked with Ruby on Rails, Angular, iOS (Objective-C

    & Swift), Android (Java & Kotlin)... and nothing has brought more happiness to me than Flutter
  40. It has been a pleasure! → Very Good Ventures ([email protected])

    → Google Developer Expert (GDE) for Flutter
  41. It has been a pleasure! → Very Good Ventures ([email protected])

    → Google Developer Expert (GDE) for Flutter → Instructor @ Caster.IO (Testing Fundamentals of Flutter)
  42. It has been a pleasure! → Very Good Ventures ([email protected])

    → Google Developer Expert (GDE) for Flutter → Instructor @ Caster.IO (Testing Fundamentals of Flutter) → Chicago Flutter Meetup