The unfortunate tragedy of my life is that I don’t get to develop in Ruby on Rails all the time. No, unfortunately for me, a large number of my clients need work done in PHP.
Which, as already indicated in several previous nuanced discussions, I hate.
I mean, really really HATE.
But that’s not the point of this post.
After being seriously burnt by the twin miseries of CakePHP’s poor documentation and desperately misguided attempt to mimic Rails I went looking for a new PHP MVC framework for a recent project.
Crucial requirements:
- lack of opinion
- simplicity
- good documentation
- understands PHP is not Ruby
I really wanted something that was pure VC, leaving out the M.
Views, Controllers and Models can go to hell.
PHP’s complete lack of dynamicism (and yes, I know PHP 5 has a crack at it, but whatever) means any attempt at Hibernate or Rails-style ORM is doomed to failure. And after screaming at CakePHP every time a finder returns an array of nested hashes of arrays of hashes and you can never work out how to just iterate through the records I’ve gone back to ADODB. You run a query and are returned a Record Set. I know this just reveals how long I spent in the late 90s hacking ASP, but if any language was still living in the late 90s, it’s PHP. And it’s actually quite good at it.
Where was I?
Right. Clean View/Controller mechanism. No Models.
Enter CodeIgniter.
It’s incredibly simple, the only assumption it makes is that you may never need most of the stuff it includes, so everything is an option, and it has great documentation.
CodeIgniter: I Don’t Hate It.
If you really have to use PHP, it’s worth a look.