Skip to content
ankit-w edited this page May 25, 2020 · 1 revision

Android-RDX

LLD:

UML

Extras

A lot of the things seen above belong outside the Redux implementation, and are hence explained here:

ReduxViewModel

An extension of the Android ViewModel API. Composes the actual Redux Store & subscribes to it. The core Redux implementation is agnostic of Android lifecycles (for Activities/Fragments). This is the bridge between the Redux world and the Android view layer. It is also responsible for initializing the Store.

ReduxController

API for subscribing to and receiving updates from the 'Store'. Composes 'ReduxViewModel' to hook up & manage things internally. Should be composed inside your Activity/Fragment.

DispatchManager

It's responsibilities include maintaining the middleware chain & handling the flow of actions through it.

DispatchThreadProcessor

Since Android is multi-threaded, we take advantage of it & execute actions on the entire dispatch chain in a background thread. The results are posted back to the main thread, where the Action originated.

StateManager

Handles maintaining multiple instances of the state. A crass object pool with just two values, which it keeps alternating. Debateably necessary for ensuring that no one holds the state/modifies it.

Clone this wiki locally