Ask HN: Best PHP Framework for Web Development
I have been working with PHP for almost a year now. And I m quite familiar with the language.
So I was thinking to start using a framework for my next project.
I m actually really confused as there are so many good frameworks with such good features with docs & extensions. I m really actually looking for a decent framework which is really easy to use. I ve considered Yii, Zend, CakePHP.
Would like to know about your experiences about these frameworks!
(
20 comments
| 6 points
| on HN
)
Since learning CodeIgniter I've tried CakePHP and Zend, and found CodeIgniter is easier to use, and just as powerful, so I've stuck with it. In fact the BugMuncher (http://bugmuncher.com) back end & API is built on my custom version of CodeIgniter
Also check out the datamapper ORM plugin (http://datamapper.wanwizard.eu/) if you want Rails-like Active Record goodness.
Our other goto framework is Cake. People do have a lot of good/bad things to say about Cake, but I rather like Cake 2. It's a little more mature now, and I don't really think it's as hugely complex as Symfony.
I use Zend on my own, but I'm becoming disillusioned with it. It seems to be overengineered and, after using Doctrine for as long as I have, its modeling leaves a lot to be desired.
Recently I've been researching FuelPHP (http://fuelphp.com/) and it seems to have potential. It's a little better designed than CodeIgniter and its ORM seems interesting.
Hope that helps.
I'd run away from CakePHP. Caveat: last version I worked with was 1.3. The weird way it uses arrays in its ORM to kinda-sorta-but-not-quite work on the database always hurts my head. In fact, the whole way of going about things in CakePHP hurts my head.
Kohana's tutorials are pretty bad, but the API browser is solid and the code of the framework itself is very readable.
As a beginner, having to dig under the hood of Kohana to fully understand it initially turned me off, but I came away with a much better understanding of how MVC frameworks work.
http://silex.sensiolabs.org/
It's also supported by Sensio, who has a good track record. I'd pick it over Symfony because it's more lightweight and over Kohana or CI because it has better documentation.
Cake will lead you down a dark path, and ZF is bloated and unwieldy. Yii seems nice, but I think they lack direction.
Why is that?
Pick a framework and begin using it. After a few projects, you'll quickly learn what you like and don't like about the framework.
I'm a fan of CodeIgniter, but mostly because it is what I'm familiar with. It has some irritations and kludgy things required, but they don't annoy me enough to warrant a change (yet).
I've heard very good things about Kohana but don't have much experience with it. Just try and pick something with a good set of documentation and a decent community.
Every framework comes with some pros and cons and it is really tricky to decide which framework to go with.
What I was doing didn't fit in with what the then current frameworks offered - so I made my own... and that's how all those frameworks got their start as well.
My suggestion is to look at the various framework features and see which one best suits your needs.