Android Jetpack is a set of component tools and guidance provided by Google for Android developers to make create android apps in the very efficient and effective manner. We have divided Jetpack component into four major categories as Foundation, Architecture, Behaviour
In this blog, I’m going to explain android architecture components. Android architecture components collection of party libraries that help you to design and build robust, testable and maintainable apps. Most importantly, You use architecture component you will have favour amount of boilerplate code hence your code should be cleaner and readable.
Architecture Components
- Data Binding
- LifeCycle Awareness
- ViewModel
- LiveData
- Room
- Navigation
- Work Manager
- Paging Library
Data Binding
Data Binding library allows us to bind to UI component in our layout data sources using a decorative format. This allows UI values to update automatically without manual intervention, which reduces a lot of boilerplate code in your app. Read More
LifeCycle Awareness
Every activity or Fragment in an Android application has a life cycle. Life cycle status of activity to fragment always changes. When we can create separate classes with life cycle aware component we can create separate classes to observe the changes in life cycle state and act accordingly. This helps to create better organised and lightweight code, it is easier to maintain. Read More
ViewModel
The ViewModel is the modal class for a View which keeps data for View. if it is required you can create separate ViewModel for each Activity and Fragment in your application. this class is designed to store and manage UI related data in a life cycle constancy. the ViewModel class allows data to service configuration changes. Such as screen rotation, keyboard changes language changes and enables multi-window mode. Read More
Live Data
Live Data- is an observable data holder class. We can user live data to get real-time update user the using interfaces. Live Data only updates app component observers data in an active life cycle state. Live data does not replace RxJava but it allows us to perform some task done by RxJava in much easier manner. Read More
Room Persistence Library
It is a database persistence library is a great alternative to SqliteOpenHelper which have been used by Android developer for many years to work with SQLite database. Room access the wrapper around
Navigation
It Helps developers to design the interactions that allow
Work Manager
There are lots of background processing task in an android application, likes and looks, upload data and sync database with remote
Paging Library
Paging Library makes it easier to load data to RecyclerView, step by step in your app using live data. It supports to bounded and unbounded list both. Read More