MVC : Is this the correct sequence to initialize & invoke MVC layers

前端 未结 2 685
感动是毒
感动是毒 2020-12-22 10:12

I am trying to learn php MVC based webpage development.At first i literally thougt that it\'s just decoupling the project into 3 classes Model, View, Controller.But with hel

2条回答
  •  清酒与你
    2020-12-22 10:50

    In my opinion coming from PHP and Javascript Model - Where you data lives, and is manipulated for extraction. Controller - Pulls in data from model(s) and anything else and is moulded into something for the user, could be a view or and endpoint. View - UI which gets data from Controller and all passes data to controllers i.e forms. View never interacts with Model. A concept i like is Top heavy Models, light Controllers. I personally don't think their is a hard rule, just guides

提交回复
热议问题