Welcome Guest, Not a member yet? Register   Sign In
newbie: Seperating Controllers Properly
#1

[eluser]matt_a[/eluser]
Hello everyone!

I'm quite familiar with PHP, however I just came to CodeIgniter and this is my first experience with the MVC pattern. So please, bare with me!

I'm concerned that my controller(s) are not designed properly. For example, controller functions that simply display a view vs. controller functions that process the data.

To make things a little more clear, I'm creating a "User" controller that interacts with my "User_model." Inside the controller, I have functions such as login(), which simply display the login view. When submitted, the data is passed to the User controller to a function called "verify_login." For some reason, it strikes me that login() should be doing both jobs.

As I'm typing this I see that my way of doing this probably isn't "wrong." I'm just a really paranoid programmer who likes to do things the most efficient way.

Does anyone have any suggestions?


Messages In This Thread
newbie: Seperating Controllers Properly - by El Forum - 08-12-2010, 08:14 AM
newbie: Seperating Controllers Properly - by El Forum - 08-12-2010, 08:51 AM
newbie: Seperating Controllers Properly - by El Forum - 08-12-2010, 01:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB