<h2>Learn Coroutines in Kotlin and Android!</h2><p>Executing background tasks has always been a big challenge in every environment and, in particular, on mobile devices where resources are limited. Kotlin has simplified the way you can write code improving your productivity with a new programming pa
Kotlin Coroutines by Tutorial: Mastering Coroutines in Kotlin and Android
β Scribed by raywenderlich Tutorial Team, Filip BabiΔ, Nishant Srivastava
- Publisher
- Razeware LLC
- Year
- 2019
- Tongue
- English
- Leaves
- 333
- Edition
- 2
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Learn Coroutines in Kotlin and Android!
Executing background tasks has always been a big challenge in every environment and, in particular, on mobile devices where resources are limited. Kotlin has simplified the way you can write code improving your productivity with a new programming paradigm, enhancing object-oriented and functional programming with with simple, powerful and new constructs. Coroutines are one of these!
Who This Book Is For
This book is for intermediate Kotlin or Android developers who already know the basics of UI development but want to learn coroutine API in order to simplify and optimize their code.
Topics Covered in This Book
One thing you can count on: After reading this book, youβll be prepared to take advantage of all the improvements coroutines have to offer!
About the Tutorial Team
The Tutorial Team is a group of app developers and authors who write tutorials at the popular website raywenderlich.com. We take pride in making sure each tutorial we write holds to the highest standards of quality. We want our tutorials to be well written, easy to follow, and fun. If you've enjoyed the tutorials we've written in the past, you're in for a treat. The tutorials we've written for this book are some of our best yet - and this book contains detailed technical knowledge you simply won't be able to find anywhere else.
β¦ Table of Contents
What You Need
Book License
Book Source Code & Forums
Book Updates
About the Cover
Introduction
About Kotlin
About Coroutines
How to read this book
Chapter 1: What Is Asynchronous Programming?
Providing feedback
Why multithreading?
Interacting with the UI thread from the background
Handling work completion using callbacks
Indentation hell
Using reactive extensions for background work
Diving deeper into the complexity of Rx
A blast from the past
Explaining coroutines: The inner works
Variations through history
Key points
Where to go from here?
Chapter 2: Setting Up Your Build Environments
Choosing the build environments
Installing the IntelliJ IDEA
Building the Android environment
Importing a project
Key points
Where to go from here?
Chapter 3: Getting Started with Coroutines
Executing routines
Launching a coroutine
Building coroutines
Explaining jobs
Canceling Jobs
Digging deeper into coroutines
Posting to the UI thread
Key points
Where to go from here?
Chapter 4: Suspending Functions
Suspending vs. non-suspending
Elaborating continuations
Creating your own suspendable API
Key points
Where to go from here?
Chapter 5: Async/Await
The async/await pattern
Learning from the past
Using async/await
Deferring values
Combining multiple deferred values
Being cooperative and structured
Key points
Where to go from here?
Chapter 6: Coroutine Context
Contextualizing coroutines
Providing contexts
Key points
Chapter 7: Coroutine Contexts & Dispatchers
Work scheduling
Coroutine dispatcher types
Using dispatchers
Key points
Chapter 8: Exception Handling
Exception propagation
Handling exceptions
Callback wrapping
Key points
Where to go from here?
Chapter 9: Manage Cancellation
Cancelling a coroutine
Key points
Where to go from here?
Chapter 10: Building Sequences & Iterators with Yield
Getting started with sequences
Enter: Sequence
Generators and Sequences
SequenceScope is here to stay
Yield and YieldAll at your service
Key points
Where to go from here?
Chapter 11: Channels
Getting started with channels
Pipelines
Buffered channel
Comparing send and offer
Comparing receive and poll
Error handling
Comparing Channels to Java Queues
Key points
Chapter 12: Broadcast Channels
Getting started with broadcast channels
ConflatedBroadcast channel
ReactiveX vs. BroadcastChannel
Key points
Where to go from here?
Chapter 13: Producer & Actors
Producing and consuming data
Producer-consumer problem
Acting upon data
Key points
Where to go from here?
Chapter 14: Beginning with Coroutines Flow
Streams of data
Limitations of streams
A new approach to streams
Flow Constraints
Key Points
Chapter 15: Testing Coroutines
Getting started
Writing tests for Coroutines
Setting up the test environment
Summing it up
Key points
Chapter 16: Android Concurrency Before Coroutines
Getting started
Does Android need coroutines?
Coroutines
Introducing Anko
Key points
Where to go from here?
Chapter 17: Coroutines on Android - Part 1
Getting started
Whatβs in the context?
Converting existing API call to use coroutines
Coroutines and Android lifecycle
Key points
Where to go from here?
Chapter 18: Coroutines on Android - Part 2
Getting started
Debugging coroutines
Exception handling
Donβt forget testing
Anko: Simplified coroutines
Key points
Conclusion
β¦ Subjects
Kotlin, Coroutines
π SIMILAR VOLUMES
Kotlin coroutines have revolutionized JVM development, especially on Android and the backend, as they let us easily implement efficient and reliable multithreading. Their cutting-edge design and features are ideally suited to modern use cases. In this book, we will explore how Kotlin coroutines work
<div><p>Android development is so vast that mastering this mobile operating system can seem daunting--particularly now that Kotlin has become the official Android development language. This book helps Android developers make the transition from Java to Kotlin and shows them how Kotlin provides a tru