https://kotlinlang.org logo
Title
j

jackmiras

03/16/2017, 2:04 AM
Hey everyone, what are you guys using for dependency injection?
d

deviant

03/16/2017, 7:56 AM
kodein, dagger2
u

uhe

03/16/2017, 8:09 AM
dagger 2
m

mg6maciej

03/16/2017, 9:23 AM
my own micro-framework
j

jackmiras

03/16/2017, 12:57 PM
Can I use dagger2 in a web project?
@mg6maciej Your micro-framework is public? Can I take a look in to him?
m

mg6maciej

03/16/2017, 12:59 PM
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

deviant

03/17/2017, 8:00 PM
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 🙂