Android Architecture Components
Google IO 17 has been passed and I couldn’t attend this year. Is it bad thing? Maybe yes. But there was a chance to follow all sessions synchronously and watch them again and again for me.
I was expecting cool components before IO because some googlers were keep tweeting about lifecycles, animations, fragments etc. And they were right. So, what is announced at IO 17 about android?
Biggest thing for developers is Android Architecture Components. They talked about common problems faced by android developers and how they bring solution to us.
Finally they recommended an architecture to us. And they provided libraries to follow it.
No More Leaks
New lifecycle-aware components help you manage your activity and fragment lifecycles. Survive configuration changes, avoid memory leaks and easily load data into your UI using LiveData, ViewModel,LifecycleObserver and LifecycleOwner.
Annotation based ORM
Avoid boilerplate code and easily convert SQLite table data to Java objects using Room. Room provides compile time checks of SQLite statements and can return RxJava, Flowable and LiveData observables.
ArchMovies Sample App
This blogpost is not going to dive deep into these classes and libraries. But I am giving to you a sample project as starting point. Following blogpost will explain them as detail. Here is the link to github.
Press “star” button to let it spread if you like it. Thanks for reading.
Happy coding.