Sunday 28th Oct, 2018
[This is Draft, will be updating...] docs.google.com/presentation/d/1W9SSQHmqj5l1BU7_XlStluB7nTmIInPIlNttWlvHO3Q/edit#slide=id.p1 What is Async Programming - Current Solutions (Android) - Threads (How many is enough?) -use of callbacks --callback hell -- exceptions propagation and handling - Promise/Futures/Rx Java - We Transform each function in Object(Promise) which promises result once avail and also provides chaining to avoid callback hell(#compare function in Thread with RxJava operators) - Handling Failure? - so many Operators(even diff for lang)? - Learning curve and readability - - Kotlin Coroutines - just add suspend to function - IDE tells you suspension points - No need to remember operators -Loop, try-catch works with suspensions - everything looks imperative code -Suspension Functions -await and sync calls - Compositions in suspension can always write higher order functions - Coroutine builders - suspension functions can only be called from other suspension functions - so its a chicken and egg problem, how to initiate coroutines (Coroutine builders) - launch(fire and forget) - result doesn't matter - async/await - runblocking
Discussion

Be the first to post a message!