Hey everyone, what are you guys using for dependen...
# announcements
j
Hey everyone, what are you guys using for dependency injection?
d
kodein, dagger2
u
dagger 2
m
my own micro-framework
j
Can I use dagger2 in a web project?
@mg6maciej Your micro-framework is public? Can I take a look in to him?
m
It's public. It's not a library. There is like 5 lines of code that would be in such a library.
You can take a look at: https://github.com/mg6maciej/fluffy-octo-rotary-phone (my little repo) or here: https://github.com/elpassion/el-peon-android (actual real project made by my ex-coworkers)
Search for
Provider
.
And most importantly look into UI tests how it's used.
But I don't think doing this for a web app would make much sense. It works well with Android's restrictions.
d
Can I use dagger2 in a web project?
sure. but probbly guice or spring di will fit better
dagger2 force you to write annoying boilerplate 🙂