Setting up the nuts and bolts of our application
In Bonus chapter 2, Object-oriented Programming with PHP, we discussed design patterns and how we can use design patterns to better organize our code. We will use the MVC design pattern to build our student portal application. The MVC pattern or the Model-View-Controller pattern is one of the most used patterns to build web applications. The features of MVC are as follows:
The model is responsible for data management. The model handles the common data operations such as retrieving, updating, and deleting data.
The view is responsible for data presentation. The view will commonly carry the required HTML that would be responsible for displaying the data on the browser.
The controller is responsible for data processing. The controller houses any application logic that has to be performed on the data that has been retrieved by the model, before sending it to the view. A controller can have one or many actions that will serve as a single functional...