https://kotlinlang.org logo
#dagger
Title
# dagger
c

Colton Idle

07/29/2020, 5:53 PM
What is it called when my Component exposes some type via a field? Aka, instead of using field injection in Android, I can do X instead. I want to call them provision methods... but that sounds weird? Is that what people say when talking on a team? https://dagger.dev/api/latest/dagger/Component.html#provision-methods
s

streetsofboston

07/29/2020, 5:59 PM
Do you mean using your component as a Service Locator, where your code ‘gets’/‘pulls’ the dependency (as opposed to D.I where the dependency is ‘set’/‘pushed’ through the @Inject)?
j

jw

07/29/2020, 9:43 PM
Provision methods++
It's definitely not service location because there's no unsafety in either availability or type safety
👍 2
c

Colton Idle

07/30/2020, 7:46 PM
Thanks Jake. 👍 on the difference of SL. The more you know!