play-jongo icon indicating copy to clipboard operation
play-jongo copied to clipboard

Code Design with Play 2.5

Open treasan opened this issue 8 years ago • 2 comments

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?

treasan avatar Dec 03 '16 18:12 treasan

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.

morellik avatar Dec 06 '16 11:12 morellik

Please take a look to my comment to How to use PlayJongo from static context? question.

morellik avatar Jan 02 '17 08:01 morellik