Welcome Guest, Not a member yet? Register   Sign In
What is the best way to write organize your code?
#1

[eluser]Mareshal[/eluser]
I am asking this, because I am not a php expert. But since I started to write my scripts in CodeIgniter is a bit difficult until I'll fully understand MVC coding.

I saw I can work most of the time only with model < - > view , and use controller only for a few things(different URLs, easy stuff). Is this good for security of the script?

For example I make all database queries inside a model using functions, then I simply return the array with results(and I use the array directly in view file). Is this ok or I should make several view files for almost each function from model, then access it with controller, and then $this->load->view('view1') and so on.

Please tell me, and tell other who maybe will read this topic: how do you organize your code? What do you write in controller? what do you write in model? Views?

I am some security maniac. I want the highest level of security in my scripts.


Messages In This Thread
What is the best way to write organize your code? - by El Forum - 06-19-2009, 10:00 AM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 11:31 AM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 11:48 AM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 11:52 AM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 12:12 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 12:24 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 12:26 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 03:10 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 03:52 PM
What is the best way to write organize your code? - by El Forum - 06-19-2009, 03:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB