[eluser]Unknown[/eluser]
Hey guys,
As $title says, I'm new to this new formatting approach of MVC (though not programming), so I'm a bit confused as to some of the stuff. I'm finding it a little hard to put my question in words, so please bear with me a bit here.
Basically, some parts of the MVC design in general are not making sense to me. I can't really see a practical example of what a Model should be. Or, more specifically .. should I ever use a Model just to access a DB table, or would you do all of that in a view?
A sample scenario I'm thinking of is where you just have a database table that you are reading from and accessing directly. The DB and ActiveRecord functions are quite nice, and make it incredibly simple to read and write data, updating the table records as necessary. I guess that's my question ... if you just need to edit stuff in and out of data rows, would you use the View (fex: parse $_POST from an update form, and set the new data to the variables)?
I can understand using a Model if you need to take a high level approach to a complex database schema, where you don't want to rewrite long queries w/joins and such, but that's the only time I could see using it.
I'm curious what people are using Models for, exactly, or .. how basic of a level they should be applied.
Thanks