Hai Rajan,
Please find below inline answers for your questions related to MVC:
Q. How model view and controller are linked?
A. In MVC, Controller is the one from where the processing starts. So the user will call the controller and the controller contains methods and the method calls the Model to get the data. Once he data is retrieved, view gets populated. This is how MVC model works. The Model and View are not directly attached rather than they are partially connected because whatever the model is , the view is the same replica. So if the model contains the Property EmpId, the View will have the field for EmpId.
The controller may or may not connected to model, if there is the data needs from the database, controller will call the model and model will get the data from database, else the controller will never calls the Model.
Q. Why it is called MVC and not VCM or CMV?
A. I think in MVC, as the model and view are the replica to each other so they are always with each other. These patterns also called as MV* patterns(MVC, MVP, MVVM etc). All these patterns have the Model and View together and rest of the things depends which pattern it is.
Hope it will be helpful to you.
Regards,
Pawan Awasthi(DNS MVM)
+91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
pawansoftit@gmail.com