MVC for simple app : <p>I have been working on a simple payment calculator, which I have working correctly via a html front end and a php back end. The html passes user inputs as variables to the PHP via AJAX calls and the PHP returns a result to the html page. Now that I have it functioning as expected, I'm trying to figure out exactly how I might convert this to an MVC pattern. In my understanding, the html is the view component, the PHP, which contains all the logic for calculation, is the model, but I'm really unsure what would go in the controller? If the controller's job is to co-ordinate between the view and the model, then should I be passing my input data to the "controller" which then passes it to the php and then pass the result back via the same route? I understand this pattern in principle but this seems extraneous in this case. I have been looking into several MVC frameworks (.NET, Laravel) but really want to get a more fundamental understanding without having everything scaffolded. Any advice appreciated! </p>
