2 ms·
Can someone provide a basic introduction to the concept of MVC, for a beginner?
by ph4 13y ago
Can someone provide a basic introduction to the concept of MVC, for a beginner?
- MereInterest 13y agoBasically, you have your program in three parts. Model, view, and controller. The model is the meat of everything. It knows the system, it interacts with other programs, it determines everything. The view is what gets shown to the user. The controller is what the user interacts with. Both the view and the controller should be as minimal as possible, only serving to relay information between the model and the user.
- e12e 13y agoAnd one place that is easy to trip up, is that you'll probably want to model your data, eg do normalization. That is your applications data model. But that is not the same as the model in MVC. The "MVC-model" of a bank account is an account number with a balance attached: the data model of an account is a series of credit/debit transactions that can be summed up to a current balance.