Welcome Guest, Not a member yet? Register   Sign In
How should this function be achieved using MVC
#11

[eluser]pawz[/eluser]
It seems to me that there's at least three possible locations for your general purpose functions:

1. private functions in the controller
2. functions in a library
3. functions in a model

I thought that more people would recommend option 1, as I've seen code that works like this, but so far this seems unpopular.
Option 2 is what I've been doing currently but it's a little messy because it requires the use of get_instance to get the codeigniter object.
Option 3 is one I hadn't really considered, but the comments so far make it sound more attractive. This involves using the model for general processing functions instead of just database functions which is something I hadn't considered.

After the posts here so far, I'm leaning towards option 3. Comments appreciated


Messages In This Thread
How should this function be achieved using MVC - by El Forum - 01-24-2008, 10:52 PM
How should this function be achieved using MVC - by El Forum - 01-24-2008, 11:03 PM
How should this function be achieved using MVC - by El Forum - 01-24-2008, 11:15 PM
How should this function be achieved using MVC - by El Forum - 01-24-2008, 11:19 PM
How should this function be achieved using MVC - by El Forum - 01-24-2008, 11:39 PM
How should this function be achieved using MVC - by El Forum - 01-24-2008, 11:40 PM
How should this function be achieved using MVC - by El Forum - 01-24-2008, 11:46 PM
How should this function be achieved using MVC - by El Forum - 01-24-2008, 11:51 PM
How should this function be achieved using MVC - by El Forum - 01-24-2008, 11:59 PM
How should this function be achieved using MVC - by El Forum - 01-25-2008, 12:05 AM
How should this function be achieved using MVC - by El Forum - 01-25-2008, 12:12 AM
How should this function be achieved using MVC - by El Forum - 01-25-2008, 12:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB