Who is this for?
Advanced Android developers, who have used the Dagger dependency injection framework and tool, for their projects, but are looking to improve their DI code, by removing lots of boilerplate code from Dagger, and using Hilt to automatize the process behind injecting dependencies, and building graph components.
This course is also for developers who have used Koin or Kodein, and are looking for different solutions to inject dependencies in their code.
It expects of you to have a good understanding of Android Studio, Android, Kotlin, code structure and SOLID principles. Familiarity with dependency injection libraries and the topic is not required, but is definitely helpful.
- Theory behind code structure and layers in apps
- Using SOLID principles to write code
- Dependency Inversion principle from SOLID
- Dagger DI framework basics
- Modules and Providers
- Hilt fundamentals
- Connecting Hilt dependencies in components
- Injecting dependencies using Hilt
- Applying Scopes to reuse dependencies
Revise why it's important to structure your code in a layered way, and why you need to apply the dependency inversion principle. Learn about Koin, Dagger and Hilt.
Set Up The Project
Learn how to set up your project to use Hilt, and start providing the basic Hilt components, such as the @HiltApplication.
Use @Provides and @Binds annotations and functions to provide dependencies in modules and build factories. Add the @Singleton scope, to bind dependencies to the app-level lifecycle.
Use the @AndroidEntryPoint annotation to provide entries for Hilt to inject dependencies to, and inject code using the @Inject annotation.