In this next-to-last part of the series, I finish building a MySQL-driven application that uses the functionality of the framework we've created to perform CRUD operations on a database table populated with user-related data.
Learning how to successfully implement a number of design patterns is definitely a great idea for PHP coders whose main goal is to develop solid and efficient web applications. This includes using the popular Model-View-Controller triad, or expressed in programming jargon, the MVC pattern.
True to form, this pattern is a helpful paradigm that will let you build programs that keep their application and business logic isolated from their visual presentation. This implies that they can be scaled up much more easily as they grow both in size and complexity.
However, grasping the theoretical concepts that surround the application of this pattern, especially in the terrain of web development, is only half of the whole learning process. It's necessary to demonstrate how it can be used in a real-world project as well.
This series of articles attempts to tackle this last point. It shows you how to leverage the power of the MVC design pattern to construct an extensible framework in PHP 5, which you can use as the starting point to create your own, or simply to understand more clearly the internal functioning of other well-consolidated frameworks available nowadays.
If you’ve reached this point you probably have an excellent idea not only of how to build a framework like the one mentioned above, but how to use many of its components for developing a basic MySQL-driven application capable of performing CRUD operations on a database containing records about some fictional users.
Speaking more specifically, I left off the last part of the series explaining how to build a controller class that first used the API of the framework’s model to run the aforementioned operations, and then to generate the appropriate outputs on the browser by way of a view class.
But as you’ll surely recall, the view files responsible for outputting formatted data to the screen weren’t created yet. In the next few lines I’m going to code them, so you can see how to use the HTML form helper class included in the framework.
Ready to tackle this penultimate installment of the series? Then begin reading now!