What is the most important underlying principle to follow when designing an app with MVVM architecture?
Separation of Concerns
List out 4 Short-Term Hacks that might Provide Technical Debt to project
List out 2 Broad Layer of a Flutter application in MVVM
Which type of logic is acceptable to put inside a View?
It should not contain any Business Logic
List out 3 primary responsibilities of a ViewModel
What is the strictest rule a ViewModel must follow regarding the UI?
ViewModel must not reference any UI components
What is the role of a Repository in MVVM?
Provides a single, clean API to the app by fetching data from network database or cached database data
What is the role of Service?
Sits at the lowest layer and wrap external API endpoints, was used only to isolate data-loading and hold no state
What is the strict rule of multiple Repositories interact with each other?
Repository should never be aware of each other. If data from 2 repositories needs to be combined, it should happen in the ViewModel or Domain layer
List out the 3 reason why we need a good app architecture
What is LiveData and why is it crucial for MVVM?
It is an observable data holder that is lifecycle-aware. It keeps the UI up to date but knows when the device rotates or the app stops, preventing crashes.
List out 3 mandatory components required to build a Floor database