Chapter 7: Building Data Sources
In this chapter, we will continue focusing on the data layer by discussing how we can implement local and remote data sources and the roles they play in clean architecture. First, we will look at how remote data sources can be built and how they can fetch data from the internet through calls to Retrofit. Then, we will look at implementing local data sources and how they can interact with Room and Data Store to persist data locally. In the chapter's exercises, we will continue the previous exercises and add the data sources discussed in the chapter, seeing how we can connect them to Room and Retrofit.
In this chapter, we will cover the following topics:
- Building and using remote data sources
- Building and integrating local data sources
By the end of the chapter, you will have learned the role of data sources, how to implement remote and local data sources that use Retrofit, Room, and Data Store to manage an application&apos...