-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
…e according to controller handles http logic while service handles business logic
… according to controller handles http logic while service handles business logic
…ation controller - This is not used in code and need to be further tested
…e with forgot password method
…e with validation reset token
…e with reset password
…e with reset password
I reviewed this PR, and I appreciate the effort you put into this. Thank you for your awesome work. That said, I don't know if I'm fully on board with this PR yet. I'd like to bring this up for discussion - As with other PRs we've seen, this falls in the category of "implementation specific" - this might make perfect sense in your project, but this degree of separation might always be needed. What do you think? |
Thank you for your review,
|
+1 for me! |
I don't think a "service layer" is a good idea, too separated, too much importing and requiring, and it just moves SLOC around to places most people aren't familiar with. |
I like the idea of having a service layer personally, as most projects I have been on avoid business logic in view controllers, though I can see how a 1-to-1 controller/service abstraction may seem trite. That said, it could make sense to do this as a sub-generator that can add services to module(s). |
@lirantal @amoshaviv @roieki @NeverOddOrEven this really just moves the code to another file, which I don't see as necessary. Do you guys have any strong preference for this change? |
When the project is small, this might seem as a redundant overhead, |
@podoler right, but we shouldn't force this on users, especially with such a small codebase. Also, the service layer isn't really decoupling or making this easier to test, it just splits it into 2 functions basically... |
what @NeverOddOrEven suggested sounds right, if you do not want to force this upon users. |
This seems like too much maintenance even for a sub-generator, I would just add a page to the Wiki saying here's a suggestion for larger projects with a code sample. |
honestly speaking this is quite a large PR and I'm unable to review it properly in terms of schedule. I would anyway suggest to do this PR with the 0.4 branch, if at all. |
@lirantal the main idea is whether to move the actual logic into a separate method, and then call that function then do |
@podoler looks like a considerable PR but we can't merge it into master sadly. |
Since there is no active discussion, and not many people are onboard with this idea, I'd suggest we close. If someone wants to bring this back up for discussion, it would be done against the latest version. |
@podoler this an old PR that we can't merge but if you'd like to keep up with PR contributions to the project we'd love to hear more from you. |
Separate controller logic into two separated layers: