To prevent web developers from doing the same things over and over again, many client and server-side frameworks have emerged in the last few years. Some of them have become so successful, that for many people it is nearly impossible to work without them.
In the case of PHP, frameworks such as Zend, Kohana and CakePHP, to name just a few, allow programmers to quickly build web applications based on the Model-View-Controller design pattern. Still, they’re only a part of a long list that includes other valuable software stacks. Having so many frameworks available to choose from nowadays, is it really worthwhile to learn how to build one on your own?
While at first sight this seems to be a pointless task, going through the entire development process can be really educational, whether you want to learn how to apply the MVC pattern in PHP, or gain a basic understanding of the inner workings of well-established frameworks.
So, if you’re interested in grasping the basic concepts that surround the creation of an MVC-based framework in PHP 5, then you should start reading this series of articles. In it, you'll learn in a step-by-step fashion how to create a stack of extensible classes that can be put to work together under the schema followed by the Model-View-Controller design pattern.
Speaking of classes, you’ll surely recall that I left off the last tutorial adding to the framework being constructed a class that sanitizes user-supplied input in a pretty basic way. However, it’s necessary to add to it many other features, including the ability to render HTML forms. So, in the following lines I’m going to build a form helper class, which will perform the aforementioned rendering task in a painless manner.
Now, to learn how this form helper class will be developed, jump ahead and start reading!