In the third video of this series, we’ll add ViewModel to our application. Instead of calling the repository or other components directly from the Activity or Fragment, we can put some of that code in the ViewModel. As a result, our application will become much cleaner and it will be more testable.

Basic knowledge or experience building Android applications is recommended.

For the More Curious...

ViewModel | Google Developer
BNR Guide to Android
Android & Kotlin Courses

Subscribers Only

Transcripts are for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Subscribers Only

Project files are only available for subscribers. Create an account today to access our collection of screencasts, skill packs, and more.

Need Help?

If you get stuck, try starting a discussion with Big Nerd Ranch experts in the community tab.

Android Architecture

This screencast is part of a skill pack called Android Architecture.

Room Architecture

6 minutes

While Android SDK provides the APIs for using SQLite databases, they force developers to write a lot of boilerplate code. Room solves this problem by creating the glue code that saves objects to SQLite and reads them into memory. In addition, it performs some compile-time checks to ensure correctness of SQL queries.

LiveData

7 minutes

In the previous video you learned about Room, the object persistence architecture component but we had to use the AsyncTask to perform database access in a background thread. LiveData makes it easier to perform Room's database queries on Android, since it takes care of the activity lifecycle.

ViewModel

6 minutes

In the third video of this series, we’ll add ViewModel to our application. Instead of calling the repository or other components directly from the Activity or Fragment, we can put some of that code in the ViewModel. As a result, our application will become much cleaner and it will be more testable.

WorkManager

5 minutes

In this screencast, we’ll cover a new background work library introduced at Google I/O 2018 - WorkManager. This release will have a huge impact on most Android apps. Background work has always been painful in Android. There are many different ways to schedule a background work and of course they are different

Navigation

8 minutes

The Navigation Architecture Component was introduced at Google I/O 2018. This new library aims to simplify navigation from one screen to another. In this screencast, we’ll see how to apply the navigation component to an existing app and review the major pieces and parts.

Related Screencasts

Explore other screencasts related to this topic.

Importing Models into CoreML

9 minutes

Apple released Core ML framework at WWDC 2017, which allowed developers to integrate machine learning into their iOS applications. In this screencast, we’ll show you how to import Keras image classification models into CoreML

Room Architecture

6 minutes

While Android SDK provides the APIs for using SQLite databases, they force developers to write a lot of boilerplate code. Room solves this problem by creating the glue code that saves objects to SQLite and reads them into memory. In addition, it performs some compile-time checks to ensure correctness of SQL queries.

LiveData

7 minutes

In the previous video you learned about Room, the object persistence architecture component but we had to use the AsyncTask to perform database access in a background thread. LiveData makes it easier to perform Room's database queries on Android, since it takes care of the activity lifecycle.

Dagger and Kotlin

8 minutes

Dagger is a dependency injection framework. In this screencast you will learn how to set up Dagger in a Kotlin Android app and some best practices.

Android Studio Keyboard Shortcuts

6 minutes

In this screencast, you'll learn how to be more productive with these useful navigation and editing keyboard shortcuts in Android Studio.

Kotlin Class Extensions

8 minutes

Class extensions are a powerful feature of Kotlin that allow you to add behavior to classes without extending them. In this video we will take a look at how to work with class extensions, some of the subtleties of how class extensions work with custom objects, and how to define your own class extensions to simplify your code.