Skip to content
Kaushik Gopal edited this page Dec 5, 2024 · 10 revisions

break into separate sections

USF ‐ architecture for mobile apps

USF is a Unidirectional State Flow architecture pattern that is agnostic of platform and can be used for any mobile application.

usf_animation.gif "diagram showing how the USF pattern works"

  • Talks/presentations on this

Goals of this pattern

1. USF is first an architecture concept, not a library

  • The architecture should be independent of platform (use in Android & iOS) so as to be conceptually similar.
  • Conceptually similar is important because it means you can quickly follow this code and use in other platforms.
  • You'll find the android blueprints & USF are modeled very similarly.

2. Don't rely on any single company for your framework

  • While there are fantastic solutions out there, USF should survive if any company decides to stop supporting or maintaining the library.

3. Generated boilerplate should be similar to what you'd otherwise manually write.

  • We want the generated code (if any) to be very similar to something that you would handwrite yourself.
  • Code will strive for legibility first before performance.

Timeline of pattern's evolution

Year Event
2018 Talked publicly first about USF pattern at MBLT}Dev 2018
2020 Demonstrated conceptual similarity at Mobilization IX conf using iOS & Android app
2021 Google introduces their guide to app architecture
2023 Migrate to Coroutines #29
2023 Use KSP lightweight compiler plugin to reduce boilerplate
2024 Refinements in pattern from prod use at Instacart
Clone this wiki locally