What is a common consequence of making poor app design decisions due to tight deadlines?
The app becomes harder to maintain long-term (technical debt)
List 4 examples of ‘short-term hacks’ in app development.
What is the key benefit of good architecture regarding problem-solving?
It lets you benefit from already-solved problems
What is the key benefit of good architecture regarding teamwork?
Makes it easier for develpers to collaborate
What is the key benefit of good architecture regarding testability?
Makes code easier to test
What is the key benefit of good architecture regarding technical debt?
Saves time and reduces technical debt as you extend the app
Which core design principle separates the UI from the Data Layer?
Separation of concerns.
In the MVVM diagram, what component does the Activity or Fragment communicate with directly?
The ViewModel.
In the MVVM diagram, where does the Repository fetch data from?
The Model (Local DB) and Remote Data Source (Network).
What is the primary responsibility of the ViewModel?
To prepare data for the UI.
And mustn’t reference any UI Component
Why must a ViewModel never reference a UI component (like a Widget)?
To avoid memory leaks and decoupling issues.
How does a ViewModel handle configuration changes like screen rotation?
It survives the change and retains the data.
Survives as long as the scope is alive
What is the primary role of the Repository in app architecture?
To provide a single, clean API for accessing app data.
Is the Repository class part of the official Architecture Component libraries?
No, it is a recommended best practice.
Use 2 repository when there is 2 databases
What logic does a Repository typically handle regarding data sources?
Deciding whether to fetch new data from the network or use cached local data
What is LiveData?
A data holder class that is observable and lifecycle-aware.
What happens when LiveData is observed and the data changes?
It notifies the observer (the UI) to update.
Is lifecycle aware
Why is LiveData considered ‘lifecycle-aware’?
It respects the lifecycle of other components (like preventing updates when an app is stopped)
What is ‘Floor’ in the context of Flutter architecture?
A SQL object mapping library (ORM) that generates SQLite code.
What does an ‘Entity’ represent in the Floor library?
It defines the schema of a database table.
What does a ‘DAO’ (Database Access Object) define in Floor?
It defines the read and write operations for the database.
What does CRUD mean?
In a Floor Entity class, what does a member variable correspond to?
A column name in the database table.
On which thread must database operations NOT run?
The main thread