Welcome Guest, Not a member yet? Register   Sign In
Redundant Code
#3

[eluser]bretticus[/eluser]
Ah, I get the point finally, you don't want to have to call the login logic for each method that calls write under that model.

I would still keep the login logic out of the model. It's never good practice to put user web logic in your data tier. It just keeps your code more modular which is kinda the point of MVC in the first place.

I would use a MY_Controller (extend Controller) to incorporate your login logic. There are many examples in this forum and on Google that specify how to do it.


Messages In This Thread
Redundant Code - by El Forum - 10-16-2009, 05:46 PM
Redundant Code - by El Forum - 10-17-2009, 01:07 AM
Redundant Code - by El Forum - 10-17-2009, 01:27 AM
Redundant Code - by El Forum - 10-17-2009, 09:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB