Rethinking UI: Imperative to Declarative - Joe Birch & Prateek Prasad

Rethinking UI: Imperative to Declarative - Joe Birch & Prateek Prasad

Recorded at Android Summit 2020 https://androidsummit.org UI development on mobile and the web has relied on imperative programming for decades. In this traditional way of programming, both simple and complex user interfaces can become tedious to work with - not only are we more prone to errors and performance issues, but this can also result in a lot of boilerplate. Modern declarative UI frameworks like Jetpack Compose, SwiftUI & React, abstract away the exact implementation and let you describe the UI, it’s behavior and how it is transformed. This not only reduces boilerplate but also makes state-related changes easier and safer by using state for UI composition. In this talk, we will walk you through the differences between declarative and imperative UI development, the benefits they offer, and how these modern frameworks have lowered the learning curve by being behaviourally & structurally similar to each other. We will also cover the shift in a mental model that is required when adopting these frameworks.