Writing your own PHP MVC Framework

By Eugenia Pérez | 30 December, 2013

During this Christmas break I’m trying to improve the PHP contents I usually teach. I tend to structure the course in a way which gives me time enough to explain how an MVC Framework works and, for that purpose, last year I chose Symfony due to it’s one of the most widely used by companies and PHP programmers.

My intention for this year is to keep close to this plan. However I realized that for students is not always easy to move on from programming in pure PHP to a structured MVC Framework, like the one I mentioned before. For that reason, and some others like trying to do the learning more progressive I think that could be beneficial for them to be exposed to a kind of MVC FW made by myself before studying any other.

As a general rule of thumb, an application that wants to keep stuck to my framework has to follow this folder structure:

Apart from following an MVC approach I’m using some others design patterns as well. I will give a brief explanation of the main ones in the next post (I hope so…). To put into practice all these considerations I’m building a sample app which recreates a ToDo List Manager, because despite having a rather simple model behind, it needs all the layers which go from the presentation to the database.

Here you are the home page which was built using bootstrap and following some principals to make it responsive:

facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

Leave a Reply

Your email address will not be published.