Chapter 9: Implementing Dependency Injection with Jetpack Hilt
In this chapter, we're continuing our journey of improving the architectural design of the Restaurants app. More precisely, we will be incorporating dependency injection (DI) in our project.
In the first section, What is DI?, we will start by defining DI and understanding its basic concepts, from what a dependency is, the types of dependencies, and what injection represents, through to concepts such as dependency containers and manual injection.
Afterward, in the Why is DI needed? section, we will focus in more detail on the benefits that DI brings to our projects.
In the last section, Implementing DI with Hilt, we will first understand how the Jetpack Hilt DI library works, and how to use it, and finally, with its help, we will incorporate DI in our Restaurants app.
To summarize, in this chapter we will be covering the following sections:
- What is DI?
- Why is DI needed?
- Implementing DI with...