Skip to content
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

[REFACTORING] LoginController only for login flow #549

Closed
slaveek opened this issue Jan 2, 2015 · 9 comments
Closed

[REFACTORING] LoginController only for login flow #549

slaveek opened this issue Jan 2, 2015 · 9 comments

Comments

@slaveek
Copy link
Contributor

slaveek commented Jan 2, 2015

Hi.
Looking through changes in LoginController I began to think about some methods in it.
My impression is that some of the methods like:

showProfile, editUsername, uploadAvatar, changeAccountType
(all which need authentication)

are not quite related to login process.

This methods are created to do user actions after login process (edit, upload, show etc.) and don't have nothing to do with correct, safe login.

IMHO it's worth to consider in future to separate this methods in eg. UserController.
This can:

  • keep LoginController to do login / logout process and make it very tiny
  • let user to do all actions in UserController. It's also good place to put more user actions later.
  • bring more logic in url's:
    • user/editusername instead of login/editusername
    • user/uploadavatar instead of login/uploadavatar
    • user/changeaccounttype instead of login/changeaccounttype

It can be a bit cleaner I think.

Just idea.
Take care.

@panique
Copy link
Owner

panique commented Jan 2, 2015

Hey slaveek, a very very good point! Thanks, I'll do this in the next days.
I have a very good feeling on the new version, things are going into a beautiful direction here!

Have a wonderful evening/day/morning :)

@panique panique changed the title [Suggestion] LoginController only for login flow [2.1][architecture] LoginController only for login flow Jan 2, 2015
@panique panique changed the title [2.1][architecture] LoginController only for login flow [2.1][refactoring] LoginController only for login flow Jan 2, 2015
@M0W93
Copy link
Contributor

M0W93 commented Jan 2, 2015

Oh Yeah this is a nice Idea :D 👍

@Dominic28
Copy link
Contributor

Yes sounds great! I did this with the user profiles on a project, too.

@panique
Copy link
Owner

panique commented Jan 20, 2015

Done! This is just a first preview, everything might change for sure!

@panique panique closed this as completed Jan 20, 2015
@panique
Copy link
Owner

panique commented Jan 20, 2015

in develop branch btw

@slaveek
Copy link
Contributor Author

slaveek commented Jan 21, 2015

Hi Chris
I see that this issue is marked as done and closed but no changes in LoginController. Is not that a bit small mistake ;) ? I think that the idea here was to clean LoginController (look at the issue title).
Maybe that's because of LoginModel changes.

BTW LoginModel looks so good now. The model directory is very clear and easy to navigate. It's extremely easy to find function that you need.

Shouldn't LoginController and controller dir look similar to model?

@panique
Copy link
Owner

panique commented Jan 21, 2015

@slaveek Ah damn, you're right! I've indeed just cleaned the model, not the controller. Okay, ticket is open again. :)

Changes will come around beginning of FEbruary.

@panique panique reopened this Jan 21, 2015
@panique panique changed the title [2.1][refactoring] LoginController only for login flow [3.0][refactoring] LoginController only for login flow Jan 25, 2015
@panique panique added the v3.0 label Jan 25, 2015
@panique
Copy link
Owner

panique commented Jul 9, 2015

Okay, the changes will take a liiiittle bit longer :)

@panique panique changed the title [3.0][refactoring] LoginController only for login flow [REFACTORING] LoginController only for login flow Oct 11, 2015
@panique panique removed the v3.x label Oct 11, 2015
@panique
Copy link
Owner

panique commented Nov 29, 2015

Thanks to everybody, this is now done by slaveek's commit via #747

@panique panique closed this as completed Nov 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants