Kotlin Coroutines for Android Masterclass

Kotlin Coroutines for Android Masterclass

English | MP4 | AVC 1920×1080 | AAC 48KHz 2ch | 12 Hours | 4.94 GB

Learn Kotlin Coroutines in depth and practice advanced Coroutines use cases in Android application

This course is your complete guide into the world of Kotlin Coroutines in Android. By the end of this course, you will feel confident to use Coroutines to write reliable, maintainable and responsive applications.

The philosophy of this course is “learn by coding”, so you’re going to master Coroutines by solving a series of carefully designed, hands-on exercises. These exercises are built into a tutorial Android application to make them as similar to the “real world” as possible. Therefore, you’ll gain practical experience with Coroutines in various typical scenarios that you’ll surely encounter in your own Android apps.

All aspects of Coroutines framework are covered in this course:

  • Coroutines as concurrency framework
  • Suspending vs blocking functions
  • Coroutine scope, context and jobs hierarchy
  • Coroutines cancellation
  • Exceptions handling inside Coroutines
  • Structured Concurrency
  • Unit testing with Coroutines
  • and more…

Even though the main goal of this course is to give you practical skills, it also covers all the theory required to understand Coroutines framework at a more conceptual level. In particular, you’re going to learn what Structured Concurrency is, what benefits it provides and how Coroutines implement this advanced paradigm.

We will go beyond the functionality of Coroutines framework itself and discuss important design considerations that you need to be aware of to write code that both works right now, and will also be maintainable in the long term.

Given the ever-increasing adoption of Kotlin, it’s evident that Coroutines are the future of concurrency in Android world. Therefore, knowledge of this framework is going to become a mandatory skill for Android developers going forward. After completing this course, you’ll be able to write reliable and maintainable concurrent code in Android projects using Coroutines framework, and you’ll be able to answer even the most tricky questions about this framework at job interviews.

What you’ll learn

  • Use Kotlin Coroutines to implement the most common flows in Android applications
  • Learn the best practices of software design with Coroutines
  • Understand Coroutines cancellation and error handling in details
  • Write unit tests using Coroutines
  • Debug the most common issues in Coroutines-based code
  • Grasp the bigger picture of Structured Concurrency
Table of Contents

Introduction
1 Introduction
2 Tutorial Application
3 Udemy Course Review System

Coroutines Intuition
4 UI Thread Blocking
5 Concurrency
6 Background Threads
7 Coroutines Basics
8 Coroutines Basics Nuances
9 Exercise 1
10 Exercise 1 Solution
11 Coroutines Cancellation Basics
12 Exercise 2
13 Exercise 2 Solution
14 Concurrent Coroutines
15 Suspension vs Blocking
16 Coroutine Scope’s Children Cancellation
17 Exercise 3
18 Exercise 3 Solution
19 Coroutines Intuition Summary

Coroutine Scope Cancellation
20 Coroutine Scope Cancellation
21 Scope Cancellation vs Scope’s Children Cancellation
22 Coroutine Scope Inside ViewModel
23 Coroutine Scope From Kotlin Extensions for ViewModel
24 Coroutine Scope Cancellation Summary

Structured Concurrency
25 Structured Concurrency Intro
26 Fibonacci Computation
27 Concurrent Fibonacci Computation
28 Concurrent Fibonacci Computation with Callback on UI Thread
29 Concurrent Fibonacci Computation Using ThreadPoster Library
30 Structured Concurrency
31 Concurrent Fibonacci Computation Using Coroutines (Callback)
32 Concurrent Fibonacci Computation Using Coroutines (Suspending)
33 Exercise 4
34 Exercise 4 Solution
35 Structured Concurrency Summary

Design with Coroutines
36 The Main Rule of Concurrency in Android
37 Encapsulating Concurrency in Use Cases
38 Exercise 5
39 Exercise 5 Solution
40 Design with Coroutines Summary

Coroutine Dispatchers
41 Coroutine Dispatchers
42 Main Dispatcher
43 Background Dispatchers
44 Unconfined Dispatcher
45 The Best Dispatching Strategy for Android Applications

Coroutines Cancellation
46 Coroutines Cancellation Intro
47 Cooperative Cancellation
48 The Importance of Cancellation Exception
49 Exercise 6
50 Exercise 6 Solution
51 NonCancellable
52 Coroutines Cancellation Summary

Coroutines Mechanics
53 Main Coroutines Building Blocks
54 Coroutines Mechanics Part 1 CoroutineScope and CoroutineContext
55 Coroutines Mechanics Part 2 CoroutineContext Elements
56 Coroutines Mechanics Part 3 withContext Function
57 Coroutines Mechanics Part 4 Jobs Hierarchy
58 Coroutines Mechanics Part 5 Cancellation Propagation
59 Coroutines Mechanics Part 6 NonCancellable vs Job()
60 Exercise 7
61 Exercise 7 Solution
62 Exercise 7 Solution Amendment
63 Coroutines Mechanics Summary

Parallel Decomposition
64 Parallel Decomposition
65 Exercise 8
66 Exercise 8 Solution
67 Shared Mutable State
68 Async Coroutine Builder
69 Exercise 9
70 Exercise 9 Solution
71 Parallel Decomposition Summary

Exceptions Handling
72 Exceptions Handling Intro
73 Uncaught Exception in a Coroutine
74 CoroutineExceptionHandler
75 Cancellation Chain on Uncaught Exception
76 SupervisorJob
77 Exercise 10
78 Exercise 10 Solution
79 Uncaught Exception in Async Coroutine
80 The Best Way to Handle Exceptions in Coroutines
81 Exceptions Handling Summary

Course Summary
82 Course Summary