Mobile App Development 2021W Lecture 11
Video
Video for the lecture give on February 22, 2021 is now available.
Notes
Lecture 11
----------
Tutorial 4 solutions
Assignment 1 questions
Android!
Android (standard)/iOS Storyboard
- event handlers update display directly or indirectly
iOS SwiftUI/Android Jetpack Compose
- display is updated based on changes in state variables
- programmer doesn't directly control when display is updated
Why use state variables?
- you never have inconsistent display state, as you can with event handlers
With event handlers
- you have to check if the variable has changed
- *if* it has changed, update the display
- so the programmer has to make sure all possible paths that lead
to state changes also update displays
- HUGE source of bugs
- also, requires more code generally