![]() ![]() ![]() Then, they transform the results to screen-specific presentation models for the ViewModels to store as state. Presenters put work on background threads and use interactors (one or more) to access business logic.They start coroutines for every task they have to perform (triggered by input events), and forward calls to their presenters. ViewModels store the current state of the UI, handle UI related logic, and update the state based on results received from presenters.They also forward input events to the ViewModel, and may receive state updates or one-time events in return. They observe immutable state from their respective ViewModels and display it on the UI. Views (Fragments or Activities) represent application screens.Make offloading work to background threads trivial.Ī brief description of the architecture’s layers, for a start:.Handle configuration changes (and even process death) gracefully,.Always keep views in a safe and consistent state with ViewModels,.Clearly separate concerns between different layers and components,.Just like Jetpack - which it essentially extends - RainbowCake is both a set of dependencies that contain classes and other constructs to use in your applications, and guidance on how these applications should be implemented. You’ll find a lot of the same ideas in Google’s official Guide to app architecture as well, which is updated more actively. Note: RainbowCake is stable and maintained, but it’s a framework from 2019, so browse and use it with that in mind. RainbowCake relies heavily on Kotlin languages features and the Google Jetpack libraries. This is the documentation of the RainbowCake architecture concept for Android applications. Navigation RainbowCake A modern Android architecture framework Introduction ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |