Phil on Fuel - An interview with Phil Sturgeon on emerging Fuel framework
I follow Phil Sturgeon since I met him on CodeIgniter forum, in charge of driving newborn Reactor branch of the project. I like Phil since, as I do, he rants a lot. But unlike me, he often rants with good reasons! :)
Beside fighting a little war to migrate CodeIgniter community from the client mindset to the social developer one, contributing as hell to CodeIgniter itself, and traveling the world as a code gipsy, he also found the time to join a bunch of PHP geeks in the development of yet another™ PHP framework: Fuel.
I initially took Fuel as some sort of spinoff of CodeIgniter, but as far as it took shape it became clear to me that it was kind of different beast.
Recently the project reached production stage and version 1.0 has been released. As always there has been a great deal of controversial reactions, from "This crap sucks, use <put something here> instead!" to "Wow, this stuff rocks!".
Even if Fuel takes some approach that doesn't entice me that much (configuration over convention, for example), my opinion is that it definitively deserves a place in the crowded panorama of PHP frameworks. I'll try to explain why in an extensive review in the near future. In the meantime I decided to annoy Phil with a silly interview to dig into Fuel reasons to be from a more human or philosophical perspective.
I want to thank Phil a lot for taking the time to reply my questions. I hope this post will help giving Fuel's more momentum.
Enough blahblah, here we go:
PHP is maybe the language with the highest number of framework available. Does Fuel enter this crowded world filling an empty niche or it is meant to be "yet another option" for PHP developers?
PHP has a bazillion frameworks but there is always room for improvement. Fuel was developed because while frameworks like CodeIgniter and Kohana did a brilliant job of staying simple and providing useful tools, there were upper limits on their original architecture and design that meant certain hacks need to be employed for various things like REST API's, HMVC, etc. Fuel is just keeping in line with how some of the best frameworks do things but with a fresh start, meaning we could build it just how we wanted and not worry about breaking thousands of applications.
I wrote extensively on this subject on my blog: http://philsturgeon.co.uk/blog/2011/04/why-write-a-new-framework
You already explained "Why you did what" (http://www.fuelphp.com/blog/2011/05/why-did-you-do-that), but the post had a technical scope. What about your "human" reasons?
Everyone wants to develop as fast as they can so they can get to the pub, see the wife or climb a mountain right? Fuel helps us make websites the fastest so we shared it with the internets and the internets like it.
"Fuel" name seems to wink at "CodeIgniter" one. You (like other members of Fuel core team) are a well known contributor of CI. Is there an intentional flirt going on between the two groups or is this just a sheer coincidence?
I'm not sure about all this flirting business, but yes there is an obvious connection between the two frameworks. I am and will continue to be a contributer to CodeIgniter. The two frameworks are very similar and we love the simplicity, we just wanted to have the ability to throw around crazy ideas at our own pace and not worry about angering an entire community with features we were working on.
Beside mere codebase, so talking about philosophy and mindset also, what makes Fuel stand up compared to well known alternatives (say CodeIgniter, Symfony or Zend)? How would you depict the average Fuel hardcore adopter?
Developers in any community vary. Fuel so far seems to attract smart, Git-learned, happy-to-contribute developers who are looking to play with some PHP 5.3 features instead of being stuck in a 5.2 world.
What does Fuel borrow instead, and from which framework?
The most noticeable inspiration on the framework is the Cascading File System. We initially took it directly from Kohana but have since re-written it. It works really nicely with some namespace aliasing so we managed to remove the need for hundreds of empty class Foo extends Kohana_Foo {} files.
We've also lifted the View library and the Database class from Kohana, which we have of course attributed.
From the CodeIgniter world we've not taken any actual code but the inspiration is clear. We have the same simplicity and users will feel at home, but everything is using PHP 5.3.
Other than that we have a RoR inspired command line utility for running migrations, installing packages (similar to gems) etc. We even have a copy of the IRB for interactive debugging. That was fun to build!
You say that Fuel pattern-based architecture is aimed to make "senior" developers happy and "junior" developers savvier. This is a refrain that Symfony community is singing loud a lot recently, but Fuel and Symfony2 architectures have very few in common. Symfony2 is also said to embrace "PHP standards". Fuel doesn't seem to bother with them.
So in the end it seems there is more then "one right way". As a Fuel insider, what's your position on these topics?
There are plenty of ways to skin a cat and whichever works for you is great. For us standards for the sake of standards are pointless, especially if they get in the way of a sweet architecture like PSR-0. Theres an article on that here: http://fuelphp.com/blog/2011/04/classnames-autoloading-namespaces
You're driving a lot of successful projects with CodeIgniter and you have experience in Ruby on Rails also. Now that you've got "your baby", will it be your only choice from now on? If not, what will drive your choice?
I will never commit to a single framework, doing so is pointless. You should always use the right tool for the job and sometimes that is Rails, CodeIgniter or Zend.
While I more productive developing in Fuel some clients, development teams and hosts will be less happy with it. CodeIgniter has huge learning resources and is incredibly easy to learn. It works everywhere that supports PHP 5.1.6 and up (and who doesn't support that?!) and means anyone can pick it up and run with it. Fuel is simple too, but the requirements on developer skill and PHP numbers is higher.
Another point of contemplation to think about is third-party code. For example right now there is NOTHING that can compare to OmniAuth in PHP-land so for some projects using Rails makes sense.
One thing that really grinds my gears in PHP-land is that everyone is a fanboy. Don't pick you stick and beat everyone with it, just make great websites and get on with something more fun.
Some closing questions now.
Every projects has goals, are they stated out loud or totally unspoken. When could Fuel be said to having reached its goal?
If an open-source project is finished then it's dead. Our goal was to get an awesome v1.0 stable product out and we did that. The goal now? Keep releasing awesome quality versions until we are all rich, famous and married to large-chested actresses or models.
What do you expect from the community? Do you aim to create a well identified one for Fuel or you'd rather be somehow ubiquitous across the whole PHP audience?
I have no expectations of the Fuel community other than Pull Request or STFU. I have a t-shirt that says somewhere.
Is there something I didn't ask about Fuel that you feel everybody should know?
If you run $ oil r robots you see a big robot. That's pretty important in a framework.
Name a PHP framework that you'd never use unless tortured and say why.
If somebody offered me a double salary to work on a CakePHP code-base I might not accept the job.
This blog is about rant, so you have space for a final rant. You won't be censored. Have fun! :)
To be honest I've done enough typing already (good nested rant, Master! ;) a.n.), but what I will say is that learning Fuel wont hurt you. Anyone looking for somebody to tell them why they should use a framework is doing it wrong, but everyone should try out a few options.
Also if you don't like it then thats fine - none of us honestly care what framework you use - but I would like the general PHP community to stop complaining about "another new framework" without even looking at it. If you look at the comments on Reddit or NetTuts the only negative comments are from those who only spent a few minutes looking at it. Everyone who has used it to build anything is either a convert, or certainly happy they had the experience.
Now to you. Have you got some experience with Fuel already? If not, aren't you eager to clone Fuel repo and start coding like crazy? ;)