General rule - when to use a model (Codeigniter)

Posted by pingu on Stack Overflow See other posts from Stack Overflow or by pingu
Published on 2010-04-20T02:09:58Z Indexed on 2010/04/20 2:13 UTC
Read the original article Hit count: 339

Hi guys,

I was just curious as to what the rule of thumb was for models. Generally, I use them only for situations where I need to add/edit or update database entries for an object.

However, I'm building an app at the moment that has a "config" table which holds various data, such as last updated, which will control when certain features in the app should be displayed. In this instance, I will mostly need to retrieve data from the config table. Is it worth putting these config methods in model?

I'm interested to hear how more experienced coders approach the MVC methodology in CI - example pseudo methods (e.g., what methods relating to the same object you'd use in the model and the controller) would be most helpful.

© Stack Overflow or respective owner

Related posts about mvc

Related posts about codeigniter