the business logic associated with it. View, same as other architecture patterns, is the interface for displaying/rendering information to the end user by listening to the outputs of the model or state. Intent (≠Android Intents) is an action or event from either the end user interacting with the user Interface or the system with a desired result. And, Last but not the least, User; Either the actor interacting with the software system or the system itself. user(view(model(intent(user()))))
is updated based on some interactions from user or the system and the view is updated based on states emitted from the model. Finite State Machine (FSM) Consider this to be finite state machine that has a limited or finite no of possible states.
architecture is the ViewModel. - Nevertheless, the concept of model defined in MVC pattern is not being followed religiously. - The view is not driven by the model, directly. View can observe multiple observable properties from ViewModel for state changes which causes state overlapping issues - Sometimes two different states are shown unexpectedly, both error and loader state).
by adding the actual ‘model’ layer which is observed by view for state changes. As this model is an immutable and single source of truth for the current view state, overlapping of states will not happen.
Data flow. Some of the benefits of unidirectional flow are: 1. It reduces Edge Cases. 2. It solves the State Problem. 3. It enforces Single Responsibility Principle (refer S.O.L.I.D Principles). Hence, MVI provides a more decoupled architecture pattern.
which is more predictable. Also, it simplifies logic surface, enhancing maintainability and testability of the project. With Single Entry and Exit Point, MVI also consolidates points for : 1. Validation 2. Analytics collection 3. Debugging.
by the user/system are considered as a part of MVI architecture. In layman terms, our View observes and reacts to any change in the state of the model as a result of some action either by the user or the system.
and finally the boilerplate with Android LiveData based approach. It may seem like adding more complexity than straight forward processing of the actions. But, in the long run, it will pay off as debugging cum tracking down the root cause of any issue/crash will be super easy as we can add or track new features easily.