‫Hello my friends, and welcome back.
‫In this video we're going to make a quick recap about the layers.
‫And we'll see the steps we're going to follow to build our amazing app NVM.
‫Which stands for Model View ViewModel, is an architectural design pattern commonly used in Android
‫app development.
‫It's designed to help developers separate concerns and improve their maintainability and testability
‫of their codes.
‫Here's a brief explanation of each component in the mVVM architecture.
‫The first component and the first layer is the modal.
‫The modal represents the data and business logic of the application.
‫It encapsulates the data and provides methods to interact with the data, such as retrieving, storing,
‫or manipulating it.
‫In Android, this can include data sources like databases, APIs, and other back end services.
‫The view.
‫The view is responsible for the user interface and the presentation of the data.
‫It includes XML layout files, activities, fragments, and UI elements like buttons, text, views
‫and widgets.
‫In mVVM, the view observes changes in the view model and updates the UI accordingly.
‫The view model.
‫The view model acts as a bridge between the model and the view.
‫It holds the UI related data and business logic, but doesn't have direct references to the view.
‫It exposes data and commands that the view can bind to, and it responds to user interactions by updating
‫the model or providing data to the view.
‫View models are designed to be easily testable and can help in managing UI state and logic.
‫Let's start with the model.
‫We're going to use the remote data source in our application.
‫So we're going to build a database, create our own API.
‫And from this API we're going to fetch the Json response.
‫And using the retrofit updating the UI and designing the app following this mVVM.
‫So the first step we're going to create our local database using the MySQL.
‫Then we're going to create our own API and using PHP, fetch the Json response from database using this
‫API, using retrofit to create Java objects, display questions in Android app and follow the mVVM architecture.
‫So let's see the steps in more details.
‫First of all, we'll create our own API that fetches the data from our own database and also will create
‫in MySQL.
‫Then we're going to fetch the data and the response in a Json format.
‫And using retrofit, we're going to transform this Json response to plain old Java objects.
‫And these objects will be displayed in the app UI.
‫This is our mission.
‫So I want from you to focus with me because it's a very important application we're going to build together.