PHP Frameworks: FuelPHP
Posted on June 21, 2012
In the last few days I’ve been messing with FuelPHP, a relatively new PHP framework. It’s written by a bunch of guys who used to work on CodeIgniter, and while it shows a lot of promise, right now I don’t quite think it’s ready for large projects. For reference, this writeup is for Fuel 1.2, which was released just a few weeks ago.
Things I Liked
- Data modeling. They really got this one right. It’s simple, easy, and most importantly, object-oriented. There’s no comparison with twiddling arrays in Cake, or dealing with overly large Doctrine models.
- MVVM. View modeling is awesome, and is a setup that I’ve not really worked with in the past. It keeps controllers nice and clean, and provides a discrete separation of logic. I wish more frameworks had this.
- Routing. The routing interface is really clean and fluid, and reminds me of Symfony. Well done there.
- Environments. Some frameworks don’t even have a discrete concept of environment…
- Core extending. If you want to build your own custom version of something (say, authentication), you can just extend the core class and load it. I wrote my own authentication to do a simple login, and it worked fairly well.
Things That I Didn’t Like
- Documentation. The documentation is woefully short and leaves out a whole lot of things. There are hundreds of functions in the actual core classes and other procedural methods that aren’t publicly documented anywhere. See below for a rather good example.
- Configuration. There is a great amount you can do with customization, and it’s just not apparent at all. For example, I was working with fieldsets and was using the built-in rendering, and had no clue in the world that you can overwrite the default behavior (which uses tables). I had to dig through the forums to figure that out.
- Forms. In general, forms are just really wonky to work with.
- Awkwardness. This one is a bit more subjective, but Fuel just doesn’t feel very intuitive to me. It’s hard for me to actually explain, but after messing with it for awhile, I just don’t feel like I’ve got a good grasp on its intricacies – and I can’t really go look for answers anywhere.
The biggest thing for me is that it just doesn’t feel ready for anything larger than small projects. A number of comments from the developers in the forums basically boil down to, “Yeah, that’s a bit of a mess – we’ll have it fixed in version 2.” While it’s encouraging to know that the developers are working hard to get it to be awesome, it’s just not there yet. I mean, I’m excited to see where this goes. I’ll definitely keep an eye on the project and see what advances come in 1.3, and definitely in version 2. Their repo is full of commits in the 2.0 branches, so I’m hoping it gets released sooner rather than later.