play-jongo
play-jongo copied to clipboard
Code Design with Play 2.5
Hi,
I am quite new to the play framework and jongo. My question is how to design your code with Play 2.5. As play uses dependency injection now and therefore a PlayJongo object needs to be injected, I think that static methods like "users()" is the wrong approach. Lets say I have a class User. How should I design the code?
It's a good question. At the moment I'm using static methods and all works fine. But should be better that someone explains exactly how to use PlayJongo using injection.
Please take a look to my comment to How to use PlayJongo from static context? question.