Re:Spring vs. Java EE
by gbersac on Sunday April 09, 2017 @04:24PM
(#14074183)
Same here, Scala rocks ! Too bad play 2 is now using guice and promots runtime dependency injection like in Java world. Compile dependency injection is much better, I fear they'll try to mimick spring more and more in order to attract java crowds.
[ Parent
| on HN ]
Hi, I'm on the Play team. We've got a number of projects showing compile time injection:
Java compile time DI:
https://github.com/playframework/play-java-compile-di-exampl...
Java compile time DI using Dagger 2:
https://github.com/playframework/play-java-dagger2-example
Scala compile time DI:
https://github.com/playframework/play-scala-compile-di-examp...
Scala compile time DI with Macwire:
https://github.com/playframework/play-scala-macwire-di-examp...
Thanks!
I got the same feeling here. Implicits in Scala can act as statically checked dependency injection, I don't know why they are going for this runtime dependant injection instead.
Play supports static DI aka cake pattern or macwire aswell.