Welcome Guest, Not a member yet? Register   Sign In
Best way to handle authentication with MY_Controller ?
#9

[eluser]n0xie[/eluser]
[quote author="Damien K." date="1253399584"]You should not have to add code to each of your controllers manually. [/quote]
I understand your reasons for doing it with an hook. However the reason 'we' do it this way, is because if we did it with a hook, and a year from now someone else would look at the code, he would have absolutely no idea why or how a controller function is authenticated. I'm not saying your method is better or worse, I'm just saying if you work with a group of people, clearness of intent is one of the key factors to maintainable code.

It's much easier to look at a controller and see that some function is called in the construct (either blacklisting (jedd) or whitelisting (mine)) and figure out that that is the part that does all the work, then having to guess that 'somewhere', 'some' hook is called which automagically does stuff.

Although I have to admit it might be a 'cleaner' solution, I think that it's less 'readable'.


Messages In This Thread
Best way to handle authentication with MY_Controller ? - by El Forum - 09-18-2009, 11:11 AM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-18-2009, 06:40 PM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 05:10 AM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 05:39 AM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 05:43 AM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 09:03 AM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 09:28 AM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 11:33 AM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 08:00 PM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 09:47 PM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-19-2009, 11:46 PM
Best way to handle authentication with MY_Controller ? - by El Forum - 09-20-2009, 05:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB