By now, you should be able to develop web applications with PDO. However, our example application is manageable when it has been kept rather small with limited functionality. Soon you will realize that mixing all the data access, user input, and display logic in one file can become a hassle to manage.
To write a more manageable code and to allow more than one developer to work on a project, the data access user input processing, and page rendering should be separated. You have probably heard of the Model-View-Controller programming paradigm (MVC), which is widely used for big web applications. The idea is to keep the data access and modification modules, which is the Model, separate from data presentation, which is the View. The view can be very complex, so a template engine is usually used. Finally, the controller is a PHP script that receives user input, accesses the model, and prepares the view.
In addition to making the code base more manageable, such division...