A model is a code representation of your base objects. Although some of the less data intensive systems may be lightweight at the end of the MVC model, I am sure you will always find the applicable application.
Take the invented (but realistic) example of the utility of the model:
Say I'm making a blog. There are Post objects on my blog. Messages are now used in and around the site and are added by many users to the system. Our system was encoded so that people injected HTML into their posts, but low and lo, people are starting to add the inserted text. This text uses the character "\ n" as the newline character.
With a model, this is a relatively simple fix. We just do a getter that overrides postText:
public function get postText() { return this.postText.replace("\n", "<br />"); }
Suddenly, we can affect the behavior of the entire site with a few lines of simple code. Without a model implementation, we would need to find and add similar functionality when using postText.
The model in MVC is all about encapsulation and the flexibility of the code base, as it evolves over time. The more you work with him and think about it this way, the more you will discover other cases that would otherwise be a nightmare.
- EDIT (you added your question above):
Take the same example and use your controller to invoke the database. We have 9 controller classes for vulnerable pages / systems that use Post objects. It was decided that in our table "Mail" will now be delete_fl . We no longer want to download messages using delete_fl = 1 .
With the correct implementation of our Post model, we simply edit the loadPosts() method, instead of looking for all cases on the site.
An important implementation is that in any large system, a model is a collection of files rather than a single monolith. Typically, you will have a model file for each of your database tables. User, message, etc.