3 ms·
I have seen many projects use scala-guice [1][2]. If all I have to do is build a module [3] and @Inject[4] in to the top of my controller, I struggle to see the
by kodablah 11y ago
I have seen many projects use scala-guice [1][2]. If all I have to do is build a module [3] and @Inject[4] in to the top of my controller, I struggle to see the benefits of Play supporting it directly.
1 - https://github.com/codingwell/scala-guice https://github.com/codingwell/scala-guice
2 - https://github.com/mohiva/play-silhouette-seed https://github.com/mohiva/play-silhouette-seed
3 - https://github.com/mohiva/play-silhouette-seed/blob/master/app/modules/SilhouetteModule.scala https://github.com/mohiva/play-silhouette-seed/blob/master/a...
4 - https://github.com/mohiva/play-silhouette-seed/blob/master/app/controllers/ApplicationController.scala https://github.com/mohiva/play-silhouette-seed/blob/master/a...
- benmccann 11y agoThe big difference with 2.4 is that Play now uses DI internally. So if you want to replace some Play component with your own version of that component, you can do that. With 2.3 you could use DI with your own app, but couldn't with any Play-provided components.