Closed sovaalexandr closed 8 years ago
@sovaalexandr
Agree with you. It was done this way to keep the plugin consistent with Play way of doing stuff. Since Play 2.4 is moving to use DI, we will also release a version of this plugin that favors DI over static methods.
I will really appreciate if you help me with that, but first let me create a new branch (play-2.4.x) to isolate this change from the master until is is ready to be released. The branch will be created as soon as we release a new version with your other pull requests.
@megazord
BTW How about version 2.0 that would be based on Java 8 lambdas? I found it extremely useful for code readability.
@sovaalexandr
What do you mean by based on Java 8 lambdas? Expose an API that is lambda friendly or use them internally? Expose an API that is lambda friendly is not that hard and I think we are already there (based on the fact that the plugin interfaces can be classified as functional interfaces).
@megazord
Yes, I actually meant to use it internally within library and tests
@megazord
I have prepared a proposition branch on versoin-2.0 Would you like to get a pull request with those changes?
@sovaalexandr sorry for the delay to give you an answer. Please, submit a PR with your changes to branch play-2.4.0.
Thanks.
@megazord
Hello. Play 2.4 released after I made those changes and now after it's stable I have progress since Thursday, 28th of May of rewriting this. When it will be ready I'll submit pull request. Shure I'll keep your comments in mind while changing code
Pull request is ready. But while creating it
@sovaalexandr I think that most of this issue was fixed in the version 2.0.0. What do you think?
@marcospereira I agree. This issue should be closed.
I'd suggest to move away from static calls to service methods or to cache. Why it should be done could be read here: http://java.dzone.com/articles/why-static-bad-and-how-avoid What do I want to achieve while/after this improvement:
If you consider it worthwhile I could handle it in backwards-compatible way and send you a pull-request