Android Architecture Components
Android Architecture Components are the collection of libraries & a part of Android Jetpack.
As the Android Jetpack components are a collection of libraries that are individually adoptable and built to work together while taking advantage of Kotlin language features that make us more productive.
These software components have been arranged in 4 categories in which one of the categories is Architecture Components. Other categories are Foundation Components, Behavior Components and UI Components.
Android architecture components are a collection of libraries that help us in:
- Building a robust Android application.
- Building the testable Android application.
- Building the maintainable Android Apps.
Android architecture components help in managing our UI component lifecycle and handling data persistence.
The Android Architecture Components are as follows:
Data Binding: It helps in declaratively binding UI elements in our layout to data sources of our app.
Lifecycles: It manages activity and fragment lifecycles of our app, survives configuration changes, avoids memory leaks and easily loads data into our UI.
LiveData: It notifies views of any database changes. Use LiveData to build data objects that notify views when the underlying database changes.
Navigation: It handles everything needed for in-app navigation in Android application.
Paging Library: It helps in gradually loading information on demand from our data source.
Room: It is an SQLite object mapping library. Use it to Avoid boilerplate code and easily convert SQLite table data to Java objects. The room provides compile-time checks of SQLite statements and can return RxJava, Flowable, and LiveData observables.
ViewModel: It manages UI-related data in a lifecycle conscious way. It stores UI-related data that isn’t destroyed on app rotations.
WorkManager: It manages every background jobs in Android with the circumstances we choose.
There is a whole new set of components out there, start experimenting and using classes in your apps.
Thanks for reading.