Presented at:
https://www.meetup.com/DCAndroid/events/247962113/
https://www.meetup.com/DCKotlin/events/247847807/
Abstract:
Asynchronous programming, especially for networking, has always been a challenging problem for Android developers. Any good solution has to gracefully handle errors, cancellation, chaining multiple actions together, handle thread swapping, and much more.
Kotlin’s coroutines are yet another option for asynchronous programming. However, unlike other popular contenders on Android, coroutines meet all the previously mentioned requirements out-of-the-box, have a gentler learning curve, and don’t require you to write an absurd amount of boilerplate. In fact, once you start using them, they will fundamentally change how you architect and write asynchronous code in your apps. That said, learning any new asynchronous solution takes time and often comes with a period of trial-and-error until you have all the nuances figured out. This talk serves to introduce Android developers to coroutines:
(1) Lessen the learning curve by getting the subtleties of coroutines out of the way early
(2) Learn how to work coroutines into an existing app: easy places to start transitioning, interop with existing libraries, and reusing existing threading constructs
(3) Learn how to easily support error handling, cancellation, and task chaining with coroutines
(4) Get tips on writing and improving automated tests with coroutines Get a head start on coroutines in your apps and easily write, test, and maintain asynchronous code like never before!