Short version: I ported FW/1 to PHP.
I’ve been using Sean Corfield’s Framework/1 as a teaching tool for ~18 months. It’s been going well, as I find FW/1 is one of the few frameworks that doesn’t suck. It’s easy to set up, easy to configure, and it mostly stays out of your way.
This month, we switched things around a bit at the University. The server-side classes have been, well, rotated. Instead of one term of in-depth PHP followed by one term of in-depth ColdFusion, we now teach one term of entry-level PHP and ColdFusion, followed by one term of advanced PHP, ColdFusion, and other server-side languages and frameworks. Long story short, I needed a good MVC framework to use to show off the PHP side of things.
Unfortunately, it seems like most PHP MVC frameworks are big, lumbering beasts. (To be fair, so are most CF MVC frameworks.) CodeIgniter, for example, is a couple hundred files.1 It may be an awesome framework, but I can’t very well spend more class time installing and configuring the thing than actually building something with it.
I also needed to sharpen my PHP skills, as I haven’t done any serious PHP work in years. So, as an exercise, I started porting FW/1 to PHP. I thought I would eventually hit a wall, but I didn’t. It turns out that FW/1 is simple enough that even my rusty PHP skills could make it work.
The code has now undergone enough revisions, and I’m using it in a couple of internal projects, such that I feel it can be released. I’ve set up a GitHub repo here:
There are a few minor changes, mostly owing to nitpicking language differences, and a few big ones, such as the lack of subsystem code.2 But it works, and I think it works surprisingly well. YMMV, of course.
An install of Cake is almost 1000 files. WTF? Seriously?
There’s nothing bad about the subsystem code in the original version, I just didn’t need it.