I think it's too individual. Really depends on what kind of application is built. Let's think out of the CodeIgniter or Kohana, but for your individual framework, with individual application.
If you have simple login system, where the user is nothing but a Name and an ID, and all the interactions are between the other stages of the application, instead interactions between the users, your User Class which only contains information about the user (simple queries to the db which retrieves certain information from users
table), can be a helper.
But in some applications (platforms in this case), the user might be an equal to any other object in it.
For example building a Forum-like application, you might want to have Warn level, Reputation, various logs of user actions, etc.
Also the user is an equal object like a 'topic', which also have for example likes/dislikes, priority, etc.
In this case you build a model and a controller for the user. For example in your Model you will have methods like
createUser(), getUser(), getUserWarnActions(), updateUserActions(), logUserActionChange()
, etc, etc.
All of that methods, will be in a class called i.e. UserModel
which extends the Model main class
where for example UserActions are the warn level, the email change, username change, reputation change.
In your controller, you might want to have
updateWarnLevel()
=> which interracts with updateUserActions()
, tells the model it's action = warn level, and updates it, by the given value
so these methods will be in a class i.e. called UserController
which extends the Controller main class
But at all it really depends how you look on your User class as. According to me it will be bad practice to have Controller/Model called Warn level, since it's a part of another abstraction, but not individual one.
To assume which is a child or a parent, I would try to make a structure, like a db one, and then create models/controllers/helpers.
If you have the following database tables:
- users
- user_reputation
- user_warnlevels
- topics
- topic_votes
- warn_levels // contains i.e. id | level | something_which_depends_on_the_level
It definately means that Users
and Topics
would be Models/Controllers in your application, where warn_levels
won't be, since they are separate table only because they have some logic, but they are no parent table, only child one