Micro Procedural PHP Framework
This project was an inspiration I got while explaining really simple concepts to a newbie using complex examples, at a point I had to put myself in his shoes and ask myself, ”would I understand anything coming out of my mouth when I was like him?” It didn't take long for me to realize that I was onto something what could pass for a Framework and I haven’t even pulled out the big guns yet.
In a nut shell, Micro Procedural PHP (MPPHP) is a very simple illustration of a PHP framework using just procedural code. Considering the beginners, Procedural Code
is pretty much the way you’ve been coding (assuming you've not been introduced to OOP), which is defining all your functions in a file (e.g. includes.php) and then import it into the environment you wish to make use of those functions. While Object Oriented Programming
involves grouping those functions according to their responsibilities (to avoid stepping all over your feet) in to an Object
or a Class
, now whether your objects are all in the same file is entirely up to you but as much as you would love to exercise your autocratic power, you may want to nourish your soul with some holy words from the book of Best Practices
if you want your code to play well with others.
So your probably thinking...”Micro Procedural PHP is built with just functions, so what? I can do that too”. Well, up on till now PHP frameworks only exist in the world of Object Oriented Programming (OOP), sadly that is where all the fun concepts of PHP are introduced like Model-View-Controller (MVC)
, Object-Relational-Mapping (ORM)
, Templating
, Middlewares
, Separation of concerns
etc., and to be honest, explaining these concepts while still learning OOP can be overwhelming at first and the naming alone would have a beginner thinking "Ok, that is probably for those working at Facebook or Google, definitly not for a beginner like me.", Quick answer "that is not true", infact achieving these techniques with simple codes that every beginner can understand for the purpose of learning is the sole objective of MPPHP.
Did i mention that the fun part of a Framework is having over 60% of the coding done for you? So why not take MPPHP for a spin, you might end up building your next school dissertation on it.
And for the pros reading this and thinking “MVC, Middleware...with procedural code? This dude must be on that ssshhhhh”. Well, why don't you let me amuse you for a bit.
Documentation is available but still under major construction at https://mpphp.github.io/mpphp/index.html