Please enable JavaScript.
Coggle requires JavaScript to display documents.
DI - DEPENDENCY INJECTION, image - Coggle Diagram
DI - DEPENDENCY
INJECTION
CONCEPT
HOW WORKS
REF
ANDSROID ABOUT DI
https://youtu.be/bbMsuI2p1DQ?t=50s
IT IS DESIGN PATTERN
build on top of dagger2
REDUCE BOILERPLATE
ADVANTAGES
MAINTAINABILITY
LOOSELY COUPLED
SINGLE RESPONSIBILITY
TESTABILITY
EASY USING MOCKITO LIBRARY
READABILITY
EXTENSIBILITY
REF ANDROID
RECOMMENDED GOOGLE ARCHITECTURE
LIBS
DAGGER HILT
FROM GOOGLE
INSTALL
KOIN
The pragmatic Kotlin & Kotlin Multiplatform Dependency Injection framework
SCOPES
https://www.youtube.com/watch?v=465JBv3g6XI
@
Module
providing dependencies
InstallIn
(SingletonComponent::class)
one instance of each provided dependency within the application's lifetime.
REF
https://tomas-repcik.medium.com/dependency-injection-with-hilt-in-android-development-e23fc636d65c