Architecture components

The architecture components are one of the components of Android Jetpack. This is a guideline for application architecture. This component is built on some libraries to do common tasks in an easier way. With the help of this component, a developer can develop their project, which can be robust, maintainable, and testable.

Today we will create an Android offline application where we will use Android components.

Here is the diagram of this architecture:

The following is a brief description of all the components:

  • UI Controller: UI components like activities and fragments are under this component.
  • ViewModel: This fetches data with the help of model and provides it to the UI.
  • LiveData: This class holds the observable data. This is lifecycle-aware, unlike the regular observable.
  • Repository: This manages multiple data sources.
  • Room Database: This is a top database layer, which is from the SQLite database.
  • Entity: This describes a database table.
  • DAO: The full form is a data access object (DAO). It maps SQL queries.
  • SQLite database: Data is stored using this in the device. It is created and maintained by the room.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.76.164