New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better documentation for users inexperienced with DI #5837
Comments
The "why" of dependency injection and Play is described here: https://www.playframework.com/documentation/2.5.x/Highlights24#Dependency-Injection |
This is perhaps a quite specific question in this context, but how can I actually inject my own actor system into |
Also see #4589 |
I think you are missing the point of the people on the mailing list. You're focused on the benefits of using DI, but the confused people in the mailing list concerned with HOW to use play and DI not the benefits of using it, ie. the WHY. If it is now a requirement of using Play to use DI in your application code, then specific documentation of how to use DI with Play that assumes no knowledge of DI is needed. Otherwise, people new to play and/or new to DI will be confused and have trouble using play. |
@nigrij what do you think is the best way for people to learn about dependency injection if they don't know it? How do most people get started? |
The Guice wiki does a good job of explaining DI from the ground up. Even just linking the Guice getting started page and explaining that Play creates an Application from the injector (which depends on the router, which depends on controllers, etc.) would help a lot of people. I also think using field injection in the docs for Java is a bad idea. If the DI magic can easily be replaced by constructor calls it makes DI much easier to understand for beginners. |
Also see #4602 |
I'm seeing a lot of confused users on the mailing list trying to do things like inject static members to their class. I feel like the documentation (especially JavaDependencyInjection) assumes way too much about what people know about dependency injection, it's benefits, and the mechanics of how it works. In addition to that, Play didn't really address why its philosophy changed so much.
The text was updated successfully, but these errors were encountered: