Reinventing a PHP MVC framework
This article series contains 4 articles, written between 28 Apr 2015 and 26 May 2015.
Reinventing a PHP MVC framework, part 1 of 4
This is the first article in a series where I build a functioning "replica" of ASP.NET MVC in PHP 7. I go through the expected results, and start writing unit tests for the behavior I want to see in the MVC framework.
Reinventing a PHP MVC framework, part 2 of 4
Now I start working on the request and response mechanisms of my PHP MVC framework. Little by little, the framework grows in a test-driven way, and the things I haven't made yet are mocked for now.
Reinventing a PHP MVC framework, part 3 of 4
In this article, I explore the class loading mechanism in PHP, and use it to automatically load the correct Controller class for my MVC implementation. This uses reflection, which is notoriously difficult to unit-test in PHP, so unfortunately I break TDD principles for now.
Reinventing a PHP MVC framework, part 4 of 4
In this fourth part, I end up with a framework that is useable, although there is still a long way to go before it is practical. I explore URL rewriting in Apache and Microsoft IIS for creating much nicer URLs.