Welcome Guest, Not a member yet? Register   Sign In
controllers design
#1

[eluser]AtlantixMedia[/eluser]
Hi,

I have a login controller whose functions handle 3 different actions:

1) login
2) logout
3) lost password requests

is it better to have one distinct controller for each action or should I leave it as it is? what's goog practice?

thanks
#2

[eluser]nmweb[/eluser]
Leave it as is, the methods belong together so should be in one controller. I'd abstract the actual login/logout stuff to a library though.
#3

[eluser]AtlantixMedia[/eluser]
also,

I grouped several functions having the same "theme" in helper files(date_helper, email_helper, etc). is this proper design practice or should I group them inside classes?

thanks




Theme © iAndrew 2016 - Forum software by © MyBB