In my free time I've been playing around with some different tools for development and I've sort of come up with a Potluck PHP Framework of sorts. It's actually not bad and stays pretty lightweight while giving some decent functionality. Keep in mind, I've not spent extensive time with this setup, but I am liking what I'm encountering so far. Here's what I've pieced together:
Slim: PHP5 Micro Framework
It's pretty lightweight and you're not going to find tons of functionality built into it. But don't let it fool you. It is pretty easy to extend or build upon and has some important pieces of functionality that a framework should have already built in.
My only "beef" with Slim is probably that it doesn't give a great Controller structure if you're going to take an MVC approach to things. But I'm still just starting to play with the framework so I might find a way to build in something more like what I'm expecting. I typically like the CodeIgniter approach on controllers/routes. I'd like to see if I can figure out a way to minimally recreate that functionality so I can make a new route just by dropping a file/class/method into the appropriate place(s). For a small site this would be a non-issue anyhow.
Twig: Template Engine
This is rather easily integrated into Slim and gives you a nice template engine for your views. I'm typically not a fan of mustache templating systems but Twig is a pretty robust engine. In my playing around with it, I am finding myself willing to deal with the mustaches in order to gain the advantages Twig is providing.
phpDataMapper
phpDataMapper is more or less a port of the Ruby DataMapper project. This is the one I've had the least time spent with of the 3 items on this list. But I definitely enjoy not having to worry about escaping things for the database, etc., and being able to quickly establish a database back end for the app I'm using this setup with. I went from no database connection to pulling data out and displaying it on my page in about 5 minutes with phpDataMapper.
Could I have done all of this with something like CodeIgniter? Sure. I'm a big fan of CodeIgniter so I'm not making this list as an argument against CI or other PHP frameworks. I will say that I was able to integrate Slim, Twig, and phpDataMapper in about 15 minutes of Googling and typing.
One advantage I could see to using a setup like this is that you get to very explicitly choose where you want to put weight into the framework you're piecing together for your application. I'm not sure how light-weight Twig and phpDataMapper would be considered, but Slim is definitely light-weight. Database interactions and rendering are areas that I was ok with adding weight to the application for because of what they provide me.





