Functional Android Development
This session has ended.
Android development took a big leap forward once Kotlin was announced as an officially supported language. That introduced functions as first class citizens and therefore unlocked support and sugar that made the Functional Programming paradigm possible. This is what allowed us to build Arrow. On another note, architecture has always flowed around the concept of cold streams and declarative composition, using libraries like RxJava that took us very close to many concepts of the functional world. Also, declarative UI is about to become a big thing now with a library like Jetpack Compose, and the ideas around immutable view state have been leveraged since long ago by architectures like MVI, Redux or any other implementation of unidirectional data flows. All these things open the door for the functional paradigm in many ways.
In this course you will learn to write fully-fledged Android apps using the Functional Programing paradigm via Arrow, and compare it to other libraries like RxJava or KotlinX Coroutines.
What you’ll learn
- Wrapping side effects to make them pure.
- Modeling network and database queries in a pure way.
- Modeling view states as sealed hierarchies of exclusive immutable states.
- Modeling UI state updates.
- User interactions as a Stream.
- Leveraging Either for railway oriented programming and error control.
- Happy path vs error path. Computing over the happy path.
- Recovering from errors.
- Retry and repeat strategies with Schedule.
- Writing our presentation logic.
- Adding a functional metrics system.
- Switching to background coroutine context and back to Main for rendering results.
- Avoiding memory leaks.
- Surviving configuration changes.
- Scoping our tasks to a coroutine scope for collaborative cancellation.
- Managing shared resources safely.
- Architecture as a Functional Stream.
- Testing our functional app end to end.
- Sneak peek into alternative UI encodings using comonads.
- Sneak peek into Arrow + Jetpack Compose.