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

USF ‐ Unidirectional State Flow Pattern ‐ Architecture for mobile apps

Overview

  • What is the pattern
  • Talks/presentations on this
  • Diagram

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.

Common FAQ

how do we do x

why do we do y

is this used in production anywhere?

  • point to examples
  • Sample Android app
  • Sample iOS app

Detailed FAQ

  • if you have questions on how something would work the USF way, raise an issue
  • i'll try to add more questions

Timeline of pattern's evolution

  • MVI inspiration
  • iOS & Android (conceptual similarity)
  • Shift to Kotlin (& Coroutines)
  • KSP plugin to reduce boilerplate
  • Instacart inspired challenges and specifics of changes
Clone this wiki locally