

Ask HN: Best PHP Framework for Web Development - vanwilder77

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.<p>I m actually really confused as there are so many good frameworks with such good features with docs &#38; extensions.
I m really actually looking for a decent framework which is really easy to use.
I ve considered Yii, Zend, CakePHP.<p>Would like to know about your experiences about these frameworks!
======
MattBearman
For starting out I'd definitely recommend CodeIgniter
(<http://codeigniter.com>) simply because the documentation is second to none.

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.

------
gchucky
Until recently at work we've use Symfony1. It's going to end of life at the
end of this year, and I think we're going to shy away from Symfony2 for now.
It's a bit of a mess, I think, and it seems like they're going to correct a
bunch of things in 2.1, but that won't be out for a few months. We'll probably
reevaluate after that.

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.

------
mootothemax
I favour Kohana (<http://kohanaframework.org/>). Very quick and easy to get
the core of your app built. Only (and potentially major) downside is that the
documentation can be tricky to wade through.

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.

~~~
gyardley
Agreed.

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.

------
debacle
I would start with Silex. It's a very small framework, pretty well written,
and very easy to pick up:

<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.

~~~
AjJi
>Cake will lead you down a dark path

Why is that?

------
polyfractal
I don't think it matters too much when starting out. For a beginner (in the
framework, not coding in general), they are all relatively equivalent.

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).

------
dirkdeman
I tried a couple of them and sticked with CodeIgniter. Sure it has some
quirks, but it's powerful, easy to grasp, not bloated (hello, Zend!) and more
than capable to satisfy your web dev needs. Plus it has a great community and
lots of tutorials. But really, my advice is to spend a day or two trying
several of them out. Create a simple project with each of them (the ubiquitous
blog for exampe) and see what works for you. Good luck!

------
kaolinite
Zend Framework is the traditional 'enterprise' framework, you won't go wrong
with it, though there are quite possibly better alternatives. That's what we
use where I work.

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.

~~~
vanwilder77
Sure !! And well thats the confusing thing for me.

Every framework comes with some pros and cons and it is really tricky to
decide which framework to go with.

~~~
kaolinite
I think in that case Zend Framework might be a good choice. It may not be the
sexiest framework but it's developed and supported by Zend, the company behind
PHP. It isn't going to fade away any time soon and there's tonnes of support
and advice around.

------
LarryMade
Depending on what you do your mileage may vary.

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.

------
twog
If you're looking for a modern framework, I would recommend
<http://fuelphp.com>. It doesnt have the size of community that a codeigniter
or cakephp will have, but it leverages a lot of the great MVC framework
features that Rails launches with.

------
bonsai
Have you considered Symfony 2 <http://symfony.com/>?

------
petervandijck
<http://laravel.com/> looks very promising

------
Kmanicka
this blog post seems to cover this topic well
[http://davidjconnelly.wordpress.com/2011/07/03/the-best-
php-...](http://davidjconnelly.wordpress.com/2011/07/03/the-best-php-
framework-of-2011/)

------
rmATinnovafy
I've been working with Slim and it is pretty good.

------
Canada
Yii

